Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- alias google_login {
- unset %gcookies
- sockclose googlelogin*
- write -c temp1.html
- write -c temp2.html
- write -c temp3.html
- write -c temp4.html
- if (!%google_user) set %google_user $$?="What is your google email address? $+ $crlf $+ Typing /unset % $+ google_pass or /unset % $+ google_user will remove the password/username."
- if (!%google_pass) set %google_pass $$?="What is your google password? $+ $crlf $+ Typing /unset % $+ google_pass or /unset % $+ google_user will remove the password/username."
- sockopen googlelogin1 www.google.com 80
- }
- on *:SOCKOPEN:googlelogin1:{
- sockwrite -n $sockname GET / HTTP/1.1
- sockwrite -n $sockname Host: $sock($sockname).addr $+ $str($crlf,2)
- }
- on *:SOCKREAD:googlelogin1:{
- var %x | sockread -f %x
- write temp1.html %x
- echo -a %x
- if (Location: * iswm %x) {
- sockclose $sockname
- sockopen googlelogin1 $remove(%x,http:,/,Location:,$chr(32)) 80
- echo 4 -a Switch!
- }
- elseif (Set-Cookie: * iswm %x) { set %gcookies %gcookies $remove($gettok(%x,2,32),;) $+ ; | echo 4 -a %gcookies }
- elseif (*<html>* iswm %x) {
- sockclose $sockname
- sockopen -e googlelogin2 accounts.google.com 443
- }
- }
- on *:SOCKOPEN:googlelogin2:{
- sockwrite -n $sockname GET /ServiceLogin?hl=en&continue=http://www.google.com.au/ HTTP/1.1
- sockwrite -n $sockname Host: $sock($sockname).addr
- sockwrite -n $sockname Cookie: %gcookies $+ $str($crlf,2)
- }
- on *:SOCKREAD:googlelogin2:{
- var %x | sockread -f %x
- write temp2.html %x
- echo -a %x
- elseif (Set-Cookie: * iswm %x) { set %gcookies %gcookies $remove($gettok(%x,2,32),;) $+ ; | echo 4 -a %gcookies }
- elseif (*<html>* iswm %x) {
- sockclose $sockname
- sockopen -e googlelogin3 accounts.google.com 443
- echo 4 -a Switch2 :o
- }
- }
- on *:SOCKOPEN:googlelogin3:{
- var %x pstMsg=1&dnConn=https%3A%2F%2Faccounts.youtube.com&continue=http%3A%2F%2Fwww.google.com.au%2F&dsh=952531576245130717&hl=en&timeStmp=&secTok=&GALX=vPRzjlliZ_Y&Email= $+ %google_user $+ &Passwd= $+ %google_pass $+ &PersistentCookie=yes&rmShown=1&signIn=Sign+in&asts=
- sockwrite -n $sockname POST /ServiceLoginAuth HTTP/1.1
- sockwrite -n $sockname Host: $sock($sockname).addr
- sockwrite -n $sockname Cookie: %gcookies
- sockwrite -n $sockname Content-type: application/x-www-form-urlencoded
- sockwrite -n $sockname Content-length: $len(%x)
- sockwrite -n $sockname $crlf $+ %x $+ $str($crlf,2)
- }
- on *:SOCKREAD:googlelogin3:{
- var %x | sockread -f %x
- echo -a %x
- write temp3.html %x
- elseif (Set-Cookie: * iswm %x) { set %gcookies %gcookies $remove($gettok(%x,2,32),;) $+ ; | echo 4 -a %gcookies }
- elseif (*<html>* iswm %x) {
- echo 4 -a TESTING!
- sockclose $sockname
- sockopen googlelogin4 google.com.au 80
- }
- }
- on *:SOCKOPEN:googlelogin4:{
- sockwrite -n $sockname GET / HTTP/1.1
- sockwrite -n $sockname Host: $sock($sockname).addr
- sockwrite -n $sockname Cookie: %gcookies $+ $str($crlf,2)
- }
- on *:SOCKREAD:googlelogin4:{
- var %x | sockread -f %x
- echo -a %x
- write temp4.html %x
- if (Location: * iswm %x) {
- tokenize 32 %x
- sockclose $sockname
- sockopen googlelogin4 $remove($2,http:,/) 80
- Echo 4 -a Switching to $2 >.>
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment