May 30

Print this Post

MacOSX – jDownloader reconnect script (TG787)

Recently I started using this fantastic Java-based program that allows me to download things easily from Rapidshare and a-like services.

These are some things I didn’t like about these sites:

  • the ammount of time needed to wait before starting downloads
  • that time increases as you download more files
  • the download limit per user a day
  • the size limit, that leads to file *parts (sometimes I had to download 40+ files)
  • one download at a time

Well, there are some tricks to bypass some of these limitations, for example, the second one, if you renew your IP address you can save time, because the waiting time will be shorter.

Then I found jDownloader, that can save a list of links and can be configured to run a script after each download. The script is used to restart the Internet connection of the router.

Note: This only works if your ISP supports dynamic IP.

Of course, this differs if your router is not Thomson TG787, but it is likely to work on most Thomsons that allow Telnet access.

Here it is:

sleep 1
echo -e "*USERNAME*\r"
sleep 1
echo -e "*PASSWORD*\r"
sleep 1
echo -e "ppp ifdetach intf=Internet\r"
sleep 2
echo -e "ppp ifattach intf=Internet\r"
sleep 2
echo -e "exit\r"
) | telnet | tee /dev/null 2>&1

You just have to replace *USERNAME* and *PASSWORD* with your own credentials. That user must have privileges to run those commands.

You save this in a file, give it a name, and remember its path… Lets say we save it as “restart.sh” in the folder “/Users/ricardo/”

Now, its time to test our script.
Firstly, go to http://www.whatismyip.com/ and take a look at your IP address.
Then, open a Terminal window and run that command…

  • cd /Users/ricardo/
  • ./restart.sh

Make sure it is working and that your IP has changed by refreshing the webpage I gave you in the first step.

If it is working, then we only need to tell jDownloader where this script is:

  • Open jDownloader
  • Go to Settings > Modules > Reconnection
  • Chose “External” and then give the full path to your script. In this case, just write

Test it, by clicking the Change IP button and see it working!

I hope this will help someone. ;)

About the author

Ricardo Dias

Ricardo Dias was born in Entroncamento, Portugal and is studying Electronic and Telecommunications Engineering at University of Aveiro. He is a researcher in robotics and is currently the Team Leader of CAMBADA@MSL team. As a hobby, he is also a freelancer Stage Lighting Designer.

Permanent link to this article: http://ricardo-dias.com/2010/05/30/macosx-jdownloader-reconnect-script-tg787/

Leave a Reply

Your email address will not be published. Required fields are marked *