Jump to content

Report Host Name to tracker


Recommended Posts

I have been a long time user of azureus up to about 2 months ago when I changed to utorrent. I have been using dyndns to report my hostname to the trackers, but have not been able to do so now that I have switched to utorrent. Due to a crappy ISP I am behind a transparent proxy (tpg.com.au) and I was hoping if this feature could be implemented, or at least someone could show me a workaround.

Link to comment
Share on other sites

0. Schedule task to start a script/program to:

1. Find IP; if it's unchanged, quit.

2. Look for utorrent process, if it's running close it.

3. Open utorrent config file (settings.dat), and modify the setting for net.bind_ip. Don't forget the length!

4. Save config.

5. Reopen utorrent, which will automatically restart your torrents.

I can give you detailed directions in a dozen languages, but this is the basic idea. C++ is a very bad idea for this, but if you're familar with it you may want to try jscript. Otherwise I'd suggest python/php.

Link to comment
Share on other sites

how would I do that? send the keys, what happens if someone is typing at the time of update? I can't use Jscript, because I want it to run without a virtual machine, I don't know pearl or python, and the only other language I know that is suitable, apart form c++, is vb, which I am most comfortable with. Any suggestions? BTW what is utorrent written in?

Link to comment
Share on other sites

Oh, come on ppl. Changing config files and restarting ?! Scripting by sending GUI messages ?! It should take 10 minutes for the developer to implement this feature, and i am sure, eventually he will, and that would be the right way to do it.

Link to comment
Share on other sites

Heres the code.

Things to note

1: utorrent is in c:\program files

2: c:\ip.txt must exist for this to work

3: you must install dynamicwrapper to be able to call the blockinput function

4: this would go nicely scheduled in task manager

5: if you use alternative upload rate while downloading, use another tab key in there

here goes:

Dim UserWrap

Set UserWrap = CreateObject("DynamicWrapper")

const URL = "http://xml.showmyip.com/"

'discover wan ip and compare to file

Dim System, FSO, fs1, oldip

Set fso = CreateObject("Scripting.FileSystemObject")

Set fs1 = fso.OpenTextFile("c:\ip.txt", 1)

oldip = fs1.readline


set xmldoc = CreateObject("Microsoft.XMLDOM")



for each x in xmldoc.documentElement.childNodes

if x.NodeName = "ip" then

myip = x.text

end if


if (oldip = myip) Then


Set fso = CreateObject("Scripting.FileSystemObject")

Set fs1 = fso.OpenTextFile("c:\ip.txt", 2)

fs1.Write myip


' Call Blockinput(), first register the API function

UserWrap.Register "USER32.DLL", "BlockInput","i=l"

' now call the function and freeze keyboard/mouse

UserWrap.BlockInput True

'Send The Keys Into utorrent

Set WshShell = WScript.CreateObject("WScript.Shell")

WshShell.Run "c:\progra~1\uTorrent.exe"

WshShell.AppActivate "µTorrent"

Wscript.Sleep 1500

WshShell.SendKeys "{ESC}{ESC}{ESC}"

Wscript.Sleep 10

WshShell.SendKeys "^p"

Wscript.Sleep 1000

WshShell.SendKeys "n"

Wscript.Sleep 100

WshShell.SendKeys "{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}"

Wscript.Sleep 10

WshShell.SendKeys "^a"

WshShell.SendKeys "{DEL}"

Wscript.Sleep 10

WshShell.SendKeys myip

WshShell.SendKeys "{ENTER}"

'unlock and return to normal status

UserWrap.BlockInput False

end if

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...