1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How Do I Auto Renew My IP For D`S`L?

Discussion in 'BlackHat Lounge' started by deeguy1, May 9, 2010.

  1. deeguy1

    deeguy1 Junior Member

    Joined:
    Mar 4, 2009
    Messages:
    197
    Likes Received:
    13
    Anybody know a free way that I can have my DSL box automatically turn off and on every [X] seconds? Will give rep for some help
     
  2. netfish

    netfish Junior Member

    Joined:
    Mar 5, 2010
    Messages:
    106
    Likes Received:
    33
    Occupation:
    Software Engineering: Javascript, CSS, HTML5, PHP,
    Location:
    Baltimore, MD
    At the command prompt, type:

    ipconfig /release all [ENTER]
    ipconfig /renew -all [ENTER]

    Copy the commands sequentially into your CMD prompt, without typing in [ENTER] but pressing it when you need it to do what you want. This is manual, but does the job.

    You can use PowerShell to automate the process, ie:

    Code:
    http://powershellscripts.com
    has some introductory documentation

    And you'll find an example here on using it to make loops, etc.

    Code:
    http://pshscripts.blogspot.com/search/label/system.net.ipaddress
    Some devices will allow you to do something this simple (Pseudocode-ish):

    Code:
    Telnet 192.168.1.1
    WAIT "Login:"
    SEND "admin\m"
    WAIT "Password:"
    SEND "\madmin\m"
    WAIT
    WAIT
    SEND "reboot\m"
    WAIT
    WAIT
    WAIT
    SEND "reboot\m"
    WAIT
    WAIT
    WAIT
    SEND "reboot\m"
    WAIT
    WAIT
    WAIT
    
    I don't know what DSL box you have so it's hard for me to write the exact script you need. Good luck!
     
    • Thanks Thanks x 1
    Last edited: May 9, 2010
  3. angelas111

    angelas111 Jr. VIP Jr. VIP Premium Member

    Joined:
    Jan 4, 2009
    Messages:
    1,570
    Likes Received:
    1,016
    Location:
    ohio
    what is the model number of your modem?
     
  4. CoolStoryBro!

    CoolStoryBro! Newbie

    Joined:
    May 6, 2010
    Messages:
    0
    Likes Received:
    0
    omg rep!~
     
  5. deeguy1

    deeguy1 Junior Member

    Joined:
    Mar 4, 2009
    Messages:
    197
    Likes Received:
    13
    I'm using an Actiontec GT704-WG. Thanks netfish I will be trying that out.

    If anybody knows how to automatically clear your internet cache/cookies or automatically run the CCleaner program every [X] amount of seconds I would also really l like to know. I'm sure others would benefit from knowing as well
     
    Last edited: May 10, 2010
  6. winner383

    winner383 Newbie

    Joined:
    Dec 22, 2009
    Messages:
    20
    Likes Received:
    5
    If your modem has a login page and a modem reboot page, you can also use a batch file with the following code:
    Code:
    start firefox http://admin:password@192.168.1.1/rebootpage.xxx
    
    ping google.com -n 15 -w 150
    
    
    :start
    ping yahoo.com
    if %errorlevel% == 1 (
    goto fail
    ) else (
    echo Connected to network
    
    exit
    )
    :fail
    echo Not connected to network, retrying...
    goto start
    
    Replace the Username and password with your modem username and password. Also, replace the IP address and the reboot page path with your modem's.

    The above code will open the reboot page via firefox, and will then ping google/yahoo until the modem starts back and it receives a reply. Once it starts receiving a reply, it will close the batch file.