USER=YOUR_USERNAME_EMAIL
PASS=YOUR_PASSWORD
rm cookie-dyn-com
sleep 1
MULTIFORM=$(curl -k -A "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6" -e "https://account.dyn.com/entrance/" -b cookie-dyn-com -c cookie-dyn-com "https://account.dyn.com/entrance/" | grep -m1 multiform | tr '=' '\n' | tail -1 | cut -d "'" -f 2)
sleep 1
curl -k -A "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6" -e "https://account.dyn.com/entrance/" -b cookie-dyn-com -c cookie-dyn-com -d "username=$USER&password=$PASS&iov_id&multiform=$MULTIFORM" "https://account.dyn.com/entrance/"My first problem is how do I replicate the -U parameter (agent string) and my second problem is how does one go about handling cookiesWhat you'll want to look at is the for loops. They run through the headers and look for cookies. Any cookies are pushed into an array which is then joined with semicolons and put in the cookie field for the POST. If I recalled from when I made this, I needed a junk cookie in the first GET to let the page know I was accepting cookies.
You may want to write the headers out to a global so you can see how they're formed.
BalanceFetcher (98)
A1: Notify Cancel [ Title:Balance Warn Not Exist:Off ]
A2: Notify [ Title:Balance Text:fetching... Icon:ipack:holdlightmd:av_replay Number:0 Permanent:On Priority:3 ]
A3: HTTP Get [ Server:Port:https://m.wellsfargo.com Path:mba/signOff/g.fullSite.do Attributes: Cookies:c=g Timeout:10 Mime Type: Output File:aaabala.html Continue Task After Error:On ]
A4: For [ Variable:%headeritem Items:%header() ]
A5: If [ %headeritem ~ *Set-Cookie* ]
A6: Variable Split [ Name:%headeritem Splitter:Set-Cookie: Delete Base:Off ]
A7: Variable Section [ Name:%headeritem2 From:2 Length:100 Adapt To Fit:On Store Result In: ]
A8: Variable Split [ Name:%headeritem2 Splitter:; Delete Base:Off ]
A9: Array Push [ Name:%wfcookie Position:255 Value:%headeritem21 Fill Spaces:Off ]
A10: End If
A11: End For
A12: Variable Join [ Name:%wfcookie Joiner:; Delete Parts:Off ]
A13: HTTP Post [ Server:Port:https://online.wellsfargo.com Path:signon Data / File:destination=AccountSummary
userid=********
password=********
screenid=SIGNON
origination=WebCons
LOB=Cons Cookies:%wfcookie Timeout:10 Content Type:application/x-www-form-urlencoded Output File:aaabalb.html Continue Task After Error:On ]
A14: HTTP Post [ Server:Port:https://online.wellsfargo.com Path:signon Data / File:destination=AccountSummary
userid=*********
password=********
screenid=SIGNON
origination=WebCons
LOB=Cons Cookies:%wfcookie Timeout:10 Content Type:application/x-www-form-urlencoded Output File:aaabalc.html ]
A15: For [ Variable:%headeritem Items:%header() ]
A16: If [ %headeritem ~ *Set-Cookie* ]
A17: Variable Split [ Name:%headeritem Splitter:Set-Cookie: Delete Base:Off ]
A18: Variable Section [ Name:%headeritem2 From:2 Length:100 Adapt To Fit:On Store Result In: ]
A19: Variable Split [ Name:%headeritem2 Splitter:; Delete Base:Off ]
A20: Array Push [ Name:%wfcookie Position:255 Value:%headeritem21 Fill Spaces:Off ]
A21: End If
A22: End For
A23: Variable Join [ Name:%wfcookie Joiner:; Delete Parts:Off ]
A24: HTTP Get [ Server:Port:https://online.wellsfargo.com Path:das/cgi-bin/session.cgi Attributes:screenid=SIGNON_PORTAL_PAUSE Cookies:%wfcookie Timeout:10 Mime Type:text/* Output File:aaabald.html ]
A25: Variable Set [ Name:%wfchsbalance To:%HTTPD Do Maths:Off Append:Off ]
A26: Variable Clear [ Name:%HTTPD Pattern Matching:Off ]
A27: Variable Convert [ Name:%wfchsbalance Function:HTML to Text Store Result In: ]
A28: Variable Split [ Name:%wfchsbalance Splitter:Personal Checking XXXXXXXXXX Delete Base:Off ]
A29: Variable Split [ Name:%wfchsbalance2 Splitter: Delete Base:Off ]
A30: Notify Cancel [ Title:Balance Warn Not Exist:Off ]
A31: Notify [ Title:Balance Text:Checking: %wfchsbalance22 %DATE Icon:hd_aaa_ext_creditcard Number:0 Permanent:On Priority:3 ]