Cutter on the Tomato Firmware

Discussion in 'Tomato Firmware' started by schoergei, Oct 7, 2009.

  1. schoergei

    schoergei Addicted to LI Member

    Hello, I am reading a time now the forum here.

    But now I have some trouble, I own a WRT54GL with Tomato Firmware flashed on it.

    Now I want to use the "cutter" tool which allows me to cut tcp connections right in the shell.

    Heres a link:

    The program is only avialable in binary for the Ipcop but I want to use it on the WRT.

    So, can you tell me how to compile the program? Or has anybody already compiled it?

    And next question, is it even possible to copy the program on the WRT? I know I have a jffs2 partition I could make but tell me pls.

    Looking forward to your answers.
  2. mstombs

    mstombs Network Guru Member

    To compile it install the tomato toolchain and

    export PATH=/opt/brcm/hndtools-mipsel-uclibc/bin:/opt/brcm/hndtools-mipsel-linux/bin:$PATH
    mipsel-uclibc-gcc -Os -Wall cutter.c -o cutter
    mipsel-uclibc-strip -s  cutter -R .comment
    add the time library to get ride of the time() error

    #include <time.h>
    and comment out the unused variables to get rid of some warnings, not sure about the format errors - to get to

    $ ls -laF cutter
    -rwxr-xr-x 1 user user 14116 2009-10-08 00:36 cutter*
    will need some testing to check
  3. schoergei

    schoergei Addicted to LI Member

    Stupid question, but where to get the toolchain?

    And if you compiled it already you could upload it to some file hoster please. :)
  4. bogderpirat

    bogderpirat Network Guru Member

    the toolchain is part of the WRT54GL-source, which you can get from the linksys site.
    i have however compiled and tested the program, it seems to work just fine:

    to get it on your router, ssh to it, enable jffs2, cd /jffs2/ and wget <above url>.
  5. schoergei

    schoergei Addicted to LI Member

    Ok I got this now, another question, how to change the "path" where linux looks for programs? Is it that env_path in the nvram?
  6. bogderpirat

    bogderpirat Network Guru Member

    that would be the PATH variable. you can adapt it live to add a new directory (e.g. /tmp/) to it like so:

    export PATH

    the env_path nvram-variable seems to work similarly without the above commands if you just do:

    nvram set "env_path=/tmp/" and nvram commit afterwards.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice