DynDns login help wanted

73 views
Skip to first unread message

Baz 8755

unread,
May 24, 2013, 5:12:59 AM5/24/13
to tas...@googlegroups.com
Hi,

Due to DynDns now insisting that you log into your account once a month I decided to try and get tasker to do this job.

I have tried HTTP GET with "https://account.dyn.com/entrance/" -post-data "username=USER&password=PASS"

but the response I am getting back seems to suggest this is not working.

Ideas anyone

Cheers

Baz

Jenny Hawkins

unread,
May 24, 2013, 10:15:13 AM5/24/13
to tas...@googlegroups.com
There are often hidden fields in a website's form. Look at the full source of the page and find all the fields. This is easiest on a desktop, but tasker's HTTP Get will work also. Its also possible you need to use cookies. You can get them from the headers.

Jenny Hawkins

unread,
May 24, 2013, 10:16:16 AM5/24/13
to tas...@googlegroups.com
Oh, you'll probably need to do a POST to send the form data rather then a GET.

Baz 8755

unread,
May 24, 2013, 11:18:41 AM5/24/13
to tas...@googlegroups.com
Hmm....

I tried HTTP Post but made no difference

I found a solution someone wrote for LINUX (I am fluent in LINUX but HTML :( ). I also has a LINUX NAS box but it's implementation of wget does not support HTTPS. Anyhow here is their LINUX solution

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 cookies

Baz

Jenny Hawkins

unread,
May 24, 2013, 6:57:46 PM5/24/13
to tas...@googlegroups.com
Here's a task I'm using to fetch my balance.

What 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 ]

Michael Starks

unread,
May 24, 2013, 7:00:44 PM5/24/13
to tas...@googlegroups.com
On 24.05.2013 17:57, Jenny Hawkins wrote:
> Here's a task I'm using to fetch my balance.
...

I bow to you!


Reply all
Reply to author
Forward
0 new messages