#1
|
|||
|
|||
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]]] |
#2
|
|||
|
|||
|
#3
|
||||
|
||||
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! |
#4
|
||||
|
||||
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%%%
__________________
|
#5
|
|||
|
|||
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. |
#6
|
|||
|
|||
script for TB-link:TD-W8951ND
i really need script for this modem TB-link:TD-W8951ND
thanks |
#7
|
|||
|
|||
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** |
Thread Tools | |
Display Modes | |
|
|