Port logging via twitter from openwrt do tomato, possible?

Discussion in 'Tomato Firmware' started by Deleted member 23868, Oct 21, 2009.

  1. Is this possible to do in tomato? :confused:

    # Create an account on twitter.
    # Create a Basic authentication string with
    echo -n "$username:$password" | base64
    Use the following shell script, substituting $base64string with the string obtained in previous step:
    CONTENT_LENGTH=`echo -n $TWEET | wc -c`
    POST /statuses/update.xml HTTP/1.1
    Host: twitter.com
    User-Agent: OpenWRT Twitter
    Accept: application/json, text/javascript, */*
    Accept-Language: en-us,en;q=0.5
    Content-Type: application/x-www-form-urlencoded; charset=UTF-8
    Content-Length: $CONTENT_LENGTH
    Authorization: Basic $base64string
    echo "$MESSAGE" | telnet twitter.com 80 > /dev/null 2>/dev/null
    # Save it as /usr/bin/tweet and start using it right away.
    # Set up some cron job, make it log something and... follow your router :)

  2. SgtPepperKSU

    SgtPepperKSU Network Guru Member

    Busybox's telnet can't accept input from a pipe, so replace telnet with nc, and you'd be good to go. That, and the executable will have to be on jffs2, cifs, or /tmp rather than /usr/bin.
  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