JDownloader Community - Appwork GmbH
 

Reply
 
Thread Tools Display Modes
  #1  
Old 29.10.2011, 15: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
  #2  
Old 29.10.2011, 15:24
remi
Guest
 
Posts: n/a
Default

Nice trick.

drbit's described another trick in "Random values at MAC spoofing on LiveHeader".
Reply With Quote
  #3  
Old 30.10.2011, 10:43
Think3r's Avatar
Think3r Think3r is offline
Community Manager & Admin (inaktiv)
 
Join Date: Apr 2009
Posts: 3,700
Default

Thank you very much for the script!
Greetz
__________________
Bitte die Regeln lesen! | Please read the forum rules!

REGELN: Bugreports | RULES: Bugreports


Erste Schritte & Tutorials | Self Help Index | Read Me | JD 2 Beta - FAQ

Support Chat

Keep smiling, it's simple!
Reply With Quote
  #4  
Old 26.10.2012, 18:21
coalado's Avatar
coalado coalado is offline
JD Manager
 
Join Date: Feb 2009
Posts: 1,981
Default

Old Thread....
I Have a nice trick for jd2:


use %%%random:<length>:<possiblechars>%%%

Example:

Randomnumber length 20:

%%%random:20:0123456789%%%

Random hex 8 byte:

%%%random:16:0123456789ABCDEF%%%
Random MAC:


%%%random:2:0123456789ABCDEF%%%-%%%random:2:0123456789ABCDEF%%%-%%%random:2:0123456789ABCDEF%%%-%%%random:2:0123456789ABCDEF%%%-%%%random:2:0123456789ABCDEF%%%-%%%random:2:0123456789ABCDEF%%%
__________________
Reply With Quote
  #5  
Old 05.07.2013, 00:52
SebastianJu
Guest
 
Posts: n/a
Default

Can someone explain what this command is doing:

n: [0-9]+:[0-9]+:([0-9][0-9])

It creates a 2 digit number i believe and the author claims it takes the randomness from a websites seconds. But i dont see how it finds the seconds on that side.

I cant use this like it is now because my router (LinkSys E3200) has the rule, that the second digit of every mac-number has to be one of these values: 02468ACE
If i force another value i cant access the router anymore to change it and i dont get internet access.

So i would have to change the var somehow. Maybe take it * 2 so its an even number for sure and somehow making sure its 2 digits only

I dont like the double change approach shown in other thread because it takes double the time.

And im not sure if i should change to JD2 since its new and many complaints seem to be there still.

So i think this solution here would be best if i could adapt it.
Reply With Quote
  #6  
Old 24.05.2014, 23:49
mohamed2010
Guest
 
Posts: n/a
Default script for TB-link:TD-W8951ND

i really need script for this modem TB-link:TD-W8951ND
thanks
Reply With Quote
  #7  
Old 27.05.2015, 12:31
supaman
Guest
 
Posts: n/a
Default

similar solution via external batch-file: https://board.jdownloader.org/showthread.php?t=29493

if you have a modem, that only changes his IP on a different MAC,
you need to do this:

1) logon your router
2) change MAC
3) reboot router

4.1) logon modem
4.2) reboot provider modem
(or buy a LAN controlled powerswitch to turn on and off)

depending on your modem/router and firmware, you need to figure out the **External links are only visible to Support Staff**
Reply With Quote
Reply

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 20:00.
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 - 2024, Jelsoft Enterprises Ltd.