Administrators chain Posted September 13, 2011 Administrators Report Share Posted September 13, 2011 TORRENT VIEWER Script by Dark-Neko Nom: Torrent Viewer Version: 2.0 Description: Affiche les torrents actifs dans BitTorrent et Utorrent /!\ installation de WebUI obligatoire /!\ Tester avec BitTorrent 6.3 (Build 16973) Utilisation: Modifier les variables dans l'alias torrent.load puis taper /torrent.load pour charger la configuration. Taper /torrent pour utiliser le script. vous pouvez aussi l'utiliser aussi avec un timer. Information: Tester sur vista, BitTorrent 6.3 (Build 16973). Pour installer WebUI, télécharger http://www.utorrent.com/webui/webui.zip puis déplacer le fichier webui.zip dans C:\Users\\AppData\Roaming\BitTorrent pour BitTorrent ou C:\Users\\AppData\Roaming\Utorrent pour utorrent. Ouvrer BitTorrent ou Utorrent, aller dans Options > Preferences > Web Ui, cocher "enable web ui", modifier Username et Password si vous le voulez. Et cocher "Alternative listening port". ------------ Version 2.0 Listage des torrents: /torrent.list Action sur les torrents: /torrent.action [start/stop/pause/unpause/forcestart/recheck/remov e/removedata] [hash] /torrent.action [dl/up] [] [hash] >1.###################################2.## Script by Dark-Neko ##3.## Nom: Torrent Viewer ##4.## Version: 2.0 ##5.## Description: ##6.## Affiche les torrents actifs ##7.## dans BitTorrent et Utorrent ##8.## /!\ Installation de WebUI ##9.## obligatoire /!\ ##10.## Tester avec BiTorrent 6.3 ##11.## (Build 16973) ##12.## Utilisation: ##13.## Modifier les variables dans ##14.## l'alias torrent.load puis ##15.## taper /torrent.load pour ##16.## charger la configuration ##17.## Taper /torrent pour utiliser ##18.## vous pouvez aussi l'utiliser ##19.## aussi avec un timer ##20.###################################21.alias torrent.load {22. ;### Configuration23.24. ;#Adresse IP (Ne pas toucher si BitTorrent sur votre ordinateur)25. set %torrent.adresse.ip localhost26.27. ;#Port du WebUI (8080 par défaut)28. set %torrent.adresse.port 808029.30. ;#WebUI Pseudo31. set %torrent.webui.pseudo admin32.33. ;#WebUI Mot de passe34. set %torrent.webui.mdp 10109435.36. ;#Chan (ne pas modifier sauf si vous voulez utiliser un timer)37. set %torrent.chan $chan38.39. ;### Echo40. echo Chargement Ok41.}42.43.alias torrent {44. ;#Chargement45. sockclose torrent46. sockopen torrent %torrent.adresse.ip %torrent.adresse.port47.}48.on *:sockopen:torrent:{49. sockwrite -n torrent GET /gui/?list=1 HTTP/1.150. sockwrite -n $sockname Host: %torrent.adresse.ip51. sockwrite -nt $sockname Authorization: Basic $encode(%torrent.webui.pseudo $+ : $+ %torrent.webui.mdp,m)52. sockwrite -nt $sockname $crlf53.}54.on *:sockread:torrent:{55. var %torrent.x56. sockread %torrent.x57. if ($gettok(%torrent.x,2,44) == 201) {58. set %torrent.pr $calc($calc($gettok(%torrent.x,6,44) / $gettok(%torrent.x,4,44)) * 100)59. if (%torrent.pr >= 0) { set %torrent.statbar 15|||||||||| }60. if (%torrent.pr >= 20) { set %torrent.statbar 9||15|||||||| }61. if (%torrent.pr >= 30) { set %torrent.statbar 9|||15||||||| }62. if (%torrent.pr >= 40) { set %torrent.statbar 9||||15|||||| }63. if (%torrent.pr >= 50) { set %torrent.statbar 9|||||15||||| }64. if (%torrent.pr >= 60) { set %torrent.statbar 9||||||15|||| }65. if (%torrent.pr >= 70) { set %torrent.statbar 9|||||||15||| }66. if (%torrent.pr >= 80) { set %torrent.statbar 9||||||||15|| }67. if (%torrent.pr >= 90) { set %torrent.statbar 9|||||||||15| }68. if (%torrent.pr >= 100) { set %torrent.statbar 9|||||||||| }69. msg %torrent.chan $remove($gettok(%torrent.x,3,44),") 15-7 $round($calc($calc($gettok(%torrent.x,6,44) / $gettok(%torrent.x,4,44)) * 100),1) $+ % [ %torrent.statbar ] 6 $round($calc($calc($gettok(%torrent.x,4,44) - $gettok(%torrent.x,6,44)) / 1048576),2) MO restant 15[[2 $round($calc($gettok(%torrent.x,6,44) / 1048576),2) 14/12 $round($calc($gettok(%torrent.x,4,44) / 1048576),2) 15]] 5DL: $round($calc($gettok(%torrent.x,10,44) / 1024),1) KB/s 3UP: $round($calc($gettok(%torrent.x,9,44) / 1024),1) KB/s 15|| Encore:6 $duration($calc($calc($calc($gettok(%torrent.x,4,44) - $gettok(%torrent.x,6,44)) / 1024) / $calc($gettok(%torrent.x,10,44) / 1024)),3)70. }71.}72.# Torrent.list73.alias torrent.list {74. window @torrent75. ;#Chargement76. sockclose torrent.list77. sockopen torrent.list %torrent.adresse.ip %torrent.adresse.port78.}79.on *:sockopen:torrent.list:{80. sockwrite -n torrent.list GET /gui/?list=1 HTTP/1.181. sockwrite -n $sockname Host: %torrent.adresse.ip82. sockwrite -nt $sockname Authorization: Basic $encode(%torrent.webui.pseudo $+ : $+ %torrent.webui.mdp,m)83. sockwrite -nt $sockname $crlf84.}85.on *:sockread:torrent.list:{86. var %torrent.list.x87. sockread %torrent.list.x88. if ($gettok(%torrent.list.x,2,44) == 201) {89. aline @torrent 12#################################90. aline @torrent Nom: $remove($gettok(%torrent.list.x,3,44),")91. aline @torrent Etat: Actif / Download92. aline @torrent Hash: $gettok(%torrent.list.x,2,34) 93. } 94. if ($gettok(%torrent.list.x,2,44) == 200) {95. aline @torrent 4#################################96. aline @torrent Nom: $remove($gettok(%torrent.list.x,3,44),")97. aline @torrent Etat: Fini / Seed98. aline @torrent Hash: $gettok(%torrent.list.x,2,34) 99. } 100. if ($gettok(%torrent.list.x,6,44) == $gettok(%torrent.list.x,4,44) && $gettok(%torrent.list.x,2,34) != torrentc && $remove($gettok(%torrent.list.x,3,44),") != $null) {101. aline @torrent 14#################################102. aline @torrent Nom: $remove($gettok(%torrent.list.x,3,44),")103. aline @torrent Etat: Fini / Stop104. aline @torrent Hash: $gettok(%torrent.list.x,2,34) 105. }106. if ($gettok(%torrent.list.x,6,44) != $gettok(%torrent.list.x,4,44) && $gettok(%torrent.list.x,2,44) != 201) {107. aline @torrent 3#################################108. aline @torrent Nom: $remove($gettok(%torrent.list.x,3,44),")109. aline @torrent Etat: Pause110. aline @torrent Hash: $gettok(%torrent.list.x,2,34) 111. }112.}113.# Torrent.action114.alias Torrent.action {115.116. if ($1 != set) {117. if ($2 != $null) {118. set %torrent.action $1119. ;#Chargement120. set %torrent.action.hash $2121. sockclose torrent.action122. sockopen torrent.action %torrent.adresse.ip %torrent.adresse.port123. }124. else {125. echo Erreur ! Entrer le hash du torrent126. }127. }128. if ($1 == set && $2 == dl) {129. set %torrent.action.hash $4 $+ &s=dlrate&v= $+ $calc($3 * 1024)130. set %torrent.action setprops 131. sockclose torrent.action132. sockopen torrent.action %torrent.adresse.ip %torrent.adresse.port133. }134. if ($1 == set && $2 == up) {135. set %torrent.action.hash $4 $+ &s=ulrate&v= $+ $calc($3 * 1024)136. set %torrent.action setprops 137. sockclose torrent.action138. sockopen torrent.action %torrent.adresse.ip %torrent.adresse.port139. }140.}141.on *:sockopen:torrent.action:{142. sockwrite -n torrent.action GET /gui/?action= $+ %torrent.action $+ &hash= $+ %torrent.action.hash HTTP/1.1143. sockwrite -n $sockname Host: %torrent.adresse.ip144. sockwrite -nt $sockname Authorization: Basic $encode(%torrent.webui.pseudo $+ : $+ %torrent.webui.mdp,m)145. sockwrite -nt $sockname $crlf146.} Link to comment Share on other sites More sharing options...