He.net

From Kyle's Wiki
Jump to: navigation, search

He.net is an ipv6 tunnelbroker, DNS provider, and ipv6 certification provider.

Automating Submissions

Once you complete the standard tests, you can submit ipv6 pings, whois, dns, etc to get extra points. I have created this script (IPv6.sh) to do it automatically, set it up with cron. I wouldn't call it cheating, I would call it a tool.

#!/bin/bash
DOMAIN=$1
USERNAME="your he.net username"
PASSWORDHASH="the MD5 hash of your password"
IPV6=`dig -t AAAA +short $DOMAIN | tail -n 1`

echo Doing $DOMAIN which has the IPv6 address $IPV6

echo -n "Logging In..."
WGETOPTS="-q -O - --keep-session-cookies --load-cookies=.cookies.txt --save-cookies=.cookies.txt"
wget $WGETOPTS http://ipv6.he.net/certification/login.php --post-data="f_user=$USERNAME&clearpass=&f_pass=$PASSWORDHASH&Login=Login"  | html2text | grep "Name:"
#set -vx

sleep 1s
echo -n  "Doing a traceroute... "
TRACEOUTPUT=`traceroute6 $DOMAIN 2>&1 | sed -f urlencode.sed | sed -n '1h;2,$H;${g;s/\n/%0D%0A/g;p}'`
wget $WGETOPTS http://ipv6.he.net/certification/daily_trace.php --post-data="trtext=$TRACEOUTPUT&submit=Submit"  | html2text | grep -e "Sorry" -e "Result"

echo "Doing a Dig AAAA"
DIGOUTPUT=`dig $DOMAIN AAAA | sed -f urlencode.sed | sed -n '1h;2,$H;${g;s/\n/%0D%0A/g;p}'`
wget $WGETOPTS http://ipv6.he.net/certification/dig.php --post-data="digtext=$DIGOUTPUT&submit=Submit"  | html2text | grep -e "Sorry" -e "Result"

echo "Doing a Dig PTR"
DIG2OUTPUT=`dig -x $IPV6| sed -f urlencode.sed | sed -n '1h;2,$H;${g;s/\n/%0D%0A/g;p}'`
wget $WGETOPTS http://ipv6.he.net/certification/dig2.php --post-data="digtext=$DIG2OUTPUT&submit=Submit"  | html2text | grep -e "Sorry" -e "Result"

echo "Doing a ping6"
PING6OUTPUT=`ping6 -c 4 -n $DOMAIN| sed -f urlencode.sed | sed -n '1h;2,$H;${g;s/\n/%0D%0A/g;p}'`
wget $WGETOPTS http://ipv6.he.net/certification/ping.php --post-data="pingtext=$PING6OUTPUT&submit=Submit"  | html2text | grep -e "Sorry" -e "Result"

echo "Doing a whois on the ipv6"
WHOISOUTPUT=`whois $IPV6| sed -f urlencode.sed | sed -n '1h;2,$H;${g;s/\n/%0D%0A/g;p}'`
wget $WGETOPTS http://ipv6.he.net/certification/whois.php --post-data="whoistext=$WHOISOUTPUT&submit=Submit"  | html2text | grep -e "Sorry" -e "Result"

You need a sed script to urlencode your submission, urlencode.sed:

s/%/%25/g
s/!/%21/g
s/"/%22/g
s/#/%23/g
s/\$/%24/g
s/\&/%26/g
s/'\''/%27/g
s/(/%28/g
s/)/%29/g
s/\*/%2A/g
s/+/%2B/g
s/ /\+/g
s/,/%2C/g
#s/-/%2D/g
#s/\./%2E/g
s/\//%2F/g
s/:/%3A/g
s/;/%3B/g
s/</%3C/g
s/>/%3E/g
s/?/%3F/g
s/@/%40/g
s/\[/%5B/g
s/\\/%5C/g
s/\]/%5D/g
s/\^/%5E/g
s/_/%5F/g
s/`/%60/g
s/{/%7B/g
s/|/%7C/g
s/}/%7D/g
s/~/%7E/g
s/      /%09/g

And optionally, a script to actually run and pull an IPv6 domain out of a list, submit it, then delete it from the list:

#!/bin/bash
cd /root/he.net
DOMAIN=`head ipv6sites -n 1`

./IPv6.sh $DOMAIN

#delete first line
sed -i '1d' ipv6sites
Personal tools
Namespaces

Variants
Actions
Efforts
Toolbox
Meta