Jump to content

utorrent and wget problem


jsaray

Recommended Posts

Hello everyone,

I install the utserver in a debian-based machine, I edit the configuration file putting admin as user and password. And i disabled the cookie authentication by setting token_auth_enable

: false

I am trying to use wget to add a torrent file and initiate a download, however it rejects it saying unauthorized user: I am introducing the following command

wget --http-user=admin --http-password=admin http://machinewhereutorrentis.com:8080/gui/?action=add-url&s=http://genepi-19:6881/metainfo.torrent

And the answer is :

Resolving genepi-19... 172.16.16.19

Connecting to genepi-19|172.16.16.19|:8080... connected.

HTTP request sent, awaiting response... 401 Unauthorized

Connecting to genepi-19|172.16.16.19|:8080... connected.

HTTP request sent, awaiting response... 400 ERROR

2011-11-11 18:34:08 ERROR 400: ERROR.

However, if I put directly the command on a web browser it executes it and the download begins. I think i am missing some option in either the config file or the wget because other actions like gettsettings work propertly.

Any ideas ?, thanks in advance.

Link to comment
Share on other sites

Hello,

Yes according to what I have read you can set this flag to false to disable defenses against the cross forgery attack, however I have inspected the GET message with Mozilla Tamper Data, and i noticed that it uses cookies, so maybe this is the problem. I have added --keep-session-cookies option to wget but the result is the same.

Any ideas ?

Link to comment
Share on other sites

Hello,

I finally switched to CSFR protection, now i am doing this (user=admin, password=admin) :

wget --http-user=admin --http-password=admin http://adonis-11:8080/gui/token.html

what retrieves :

<html><div id='token' style='display:none;'>rVIbokt9nW1fJnSmpUMmhSry0w3Z0CNvkTqB33xhZy98j-7Z6AsBisZnvk4=</div></html>

And then i used this token in :

wget --http-user=admin --http-password=admin http://adonis-11:8080/gui/?token=rVIbokt9nW1fJnSmpUMmhSry0w3Z0CNvkTqB33xhZy98j-7Z6AsBisZnvk4&action=add-url&s=http://adonis-12:6881/metainfo.torrent

However the answer is the same :

Connecting to adonis-11|172.16.16.141|:8080... connected.

HTTP request sent, awaiting response... 401 Unauthorized

Connecting to adonis-11|172.16.16.141|:8080... connected.

HTTP request sent, awaiting response... 400 ERROR

2011-11-12 13:37:09 ERROR 400: ERROR

It is anything i am doing wrong ?

Link to comment
Share on other sites

I succeeded to correct this error by using wget -S option to retrieve the headers sent by the server, I copy - paste the cookie value in the next request using using wget --header option, now it successfully answers with the torrent ID but, when i inspect it on the web browser the torrent do not appear. Nor seems to be seeding

Any suggestions ?

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...