JDownloader Community - Appwork GmbH
 

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 29.10.2011, 14:09
lurker
Guest
 
Posts: n/a
Exclamation Method for reconnects requiring a MAC address change; Example for SMC 2804WBR

Hey,

to obtain a fresh IP from my provider I need to change my MAC. I wanted to do this using only LiveHeader. This was somewhat troublesome, since there is no easy way to get a random number and I didn't find a good solution on the forum. However I figured out a way to do this that I would like to share.

The idea is to load a page containing a pseudo-random value from the router (In this case I use the seconds of the current time). Then parse it to set a random variable and use that to set the mac to a random value. This is steps 2, 3 and 4 of my script.

I hope this information is of some use to people with a similar setup. I think it would be a good addition to LiveHeader to have a variable that gets replaced with a random number. I could submit a patch if a dev tells me how to do it.

Code:
[[[HSRC]]]
    [[[STEP]]]
        [[[DEFINE routername="SMC*2804WBR"/]]]
    [[[/STEP]]]
    [[[STEP]]]
        [[[REQUEST]]]
            POST /login.htm HTTP/1.1
            Host: %%%routerip%%%
            Cookie: %%%Set-Cookie%%%

           page=login&page=login&year=111&month=10&day=28&hour=12&minute=16&second=6&pws=<password>
        [[[/REQUEST]]]
    [[[/STEP]]]
    [[[STEP]]]
        [[[REQUEST]]]
            GET /status_main.htm HTTP/1.1
            Host: %%%routerip%%%
            Cookie: %%%Set-Cookie%%%
        [[[/REQUEST]]]
    [[[/STEP]]]
    [[[STEP]]]
        [[[PARSE]]]
            n: [0-9]+:[0-9]+:([0-9][0-9])
        [[[/PARSE]]]
    [[[/STEP]]]
    [[[STEP]]]
        [[[REQUEST]]]
            POST /wan_dhcp.htm HTTP/1.1
            Host: %%%routerip%%%
            Cookie: %%%Set-Cookie%%%
            Referer: **External links are only visible to Support Staff**

            page=dhcpc&HostName=&MACaddr1=8c&MACaddr2=a9&MACaddr3=82&MACaddr4=73&MACaddr5=fc&MACaddr6=%%%n%%%
        [[[/REQUEST]]]
    [[[/STEP]]]
    [[[STEP]]]
        [[[REQUEST]]]
            POST /system_reset.htm HTTP/1.1
            Host: %%%routerip%%%
            Cookie: %%%Set-Cookie%%%

           page=system_reset
        [[[/REQUEST]]]
    [[[/STEP]]]
[[[/HSRC]]]
Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +2. The time now is 22:05.
Provided By AppWork GmbH | Privacy | Imprint
Parts of the Design are used from Kirsch designed by Andrew & Austin
Powered by vBulletin® Version 3.8.10 Beta 1
Copyright ©2000 - 2023, Jelsoft Enterprises Ltd.