1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Tomato interacting with Twitter

Discussion in 'Tomato Firmware' started by nobugme, Mar 28, 2009.

  1. nobugme

    nobugme Network Guru Registered

    Let's say we have this code that will be run everytime the router reboots
    Code:
    wget --http-user=username--http-passwd=password \ --post-data="status=Hello World!" \ http://twitter.com:80/statuses/update.xml
    what other possibilities do you guys see? I'm not a code guru, just like to experiment with stuff.
     
  2. bogderpirat

    bogderpirat Network Guru Member

    tomato's wget is a pretty stripped down version that comes with busybox.

    you might want to take a look at the two wget packages (probably the one without ssl support will suffice) here. you could store the binary on a web server and have the tomato box download it upon startup like so:
    Code:
    wget http://server.com/wget -O /tmp/wget
    chmod +x /tmp/wget
    /tmp/wget --post-data="blah" http://twitter.com/statuses/update.xml
    (init script - maybe prefix it with a "sleep 30" to wait till your WAN is up)
     
  3. nobugme

    nobugme Network Guru Registered

    The wget needs libgcc.so.0.1, so as I do not have a share to put it, I think the only option would be to compile a version with libgcc in it.

    Another thing I tested in a vm linux machine, was trying to use curl to post to twitter

    Code:
    #!/bin/bash
    # Login information.
    USERNAME="username"
    PASSWORD="password"
    
    URL=http://twitter.com/statuses/update.xml
    
    # Post to Twitter.
    result='curl -u $USERNAME:$PASSWORD -d status="Hello World!" $URL'
    I thought of this after I saw some guys send power consumption to the web in realtime, so I thought it would be nice to send some information to the web from the router without running a 24/7 server.

    Any tips or ideas.
     

Share This Page