Jump to content

Python script: Sending torrent file using ?action=add-file


chunk1970

Recommended Posts

Hi, I am rewriting a python script that i wrote for the xbox/xbmc. That enables remote control of the majority of uTorrent features although I do have a problem when attempting to send a torrent file.

My script works when I run the script on my PC but for some reason on the xbox the connection gets cut-off and i get a HTTP 200 response back before all the data has finished transmitting. What i would like to know is is there a specific format that the file has to be in for uTorrent to

accept it ok. The pc is obviously doing what i expect but I think there must be some differences in the way that binary files are handled in python on the xbox..

Here is a partial dump of what Wireshark reports when the script is run, as you can see mid way through the transfer uTorrents Webui responds with a HTTP200 before the file has been fully received..

Any help would be much appreciated..

------------------------------------------------------------------------------------------

\......V=..)@.{...)T.....~j..|...m.....6!.u..'.

'3~))..~.........

......@s.V.@.....z(.uq.D..b.....cZ@\C..iB...a..*...To.]qv0...l.6zR....i.....YF........%.,L..F..K.Wj+.AQ..3g0UTuIj.N.HP$.L.Q.$..77.g.].C..1.m.Z*..PZ.

...?.........K..9NBo..A.......vWiv..!...s....Kp..`e..Y.v..).....0.....[...c....xO..............Y.Rx..L.ZW.R.8z.[..$.T..N...'..}..........._....O..bI5....R!......G..2...f.....4..Qn-d...,u.....(.........LW.IP...0...NL-..a..8...moM....Z.Z..k .q..tJ..]l....P7.zJ.O.....'.......e.s.`..uD.!Ds

._:........Q...7'&..u#G>.......U.......F.t4.~}d.Z! ..5....E7.xF..k..iR..r......0......%..Q|...:e.cQB~.....r........P...V..D

....s..8.NH...1;..ak,...8g....b.......f.n....31...Ri..4n....."...._o.%..?........X...... .r

d..5.o..".7.W...k..S........C.~.H..huX_....3b*/...xx....2 ./..ig....P...R.w..&......IB.R.1Vh..a.......p>..s

].....Tr#....)..o....tNy2.....p .B.\@.'....p .......(..>..

c....V.vI..X0*.@..W..d.....C....."...R..G.0M.. .`.1.......w1h+..S...7..$T......K0.|J.qW.....n4e....+.o....q.......i(G...Y...z9...W..H7.X......S5..\.x...:....e...qgJ..U.x..3..?.+#.J.5.7."

.

..Z....8Kh.......]\.....9X.;.66r.g.U4.4<.r.8E..Dc.k.WO*.^.r=).}..N../..h.G.2.~.o..u.u8.z.v!"..

._:...~...

.,...).zkEy..!/.:v......]...q....N..\......T.I*..?K<}..,.Z{R^*..(.#..=..M.vK..E!....,....4=$.p..k.....:o.v'?...z..

..KF:.

m...E?......@.8.V.'7..Ob....Q..[..3.md..:.oF..N...

HTTP/1.1 200 OK

Connection: keep-alive

Content-Length: 25

Content-Type: text/html

Cache-Control: no-cache

{"":"","error": "Error"}

...h....;.v..%r.n...-@.H.Z..Q@...`.......r}Z..@:..#G...O........e..+o{Im

.q...Z..5..h.h.....+..J....s{.t8.=,.GC...V.a.*...\R...)i...K..75...(.......&..Hav......!....

}...2..... .....*..%n#.%eh..B..t.p,.`ia2..}...T......h.>;...._......9.eN....(..^.H~.......1.c.e.t.....L"........<O\se.$.m.......xGM.Q.j.........I:n.....?..g.....8.AX.ET...et.@...Nu.....(...F`....6.De......l_.?.....6(|".E...nq..<.\...kT.....Y..ZL.LZ......AHa..v...G0.)yA....+...K.=.0..k$..k.4...........3...

..aO ...J.OP...............Bc&.).g...q..<c...2.e......:Rh.......,k.]..

.......V.C..!1.Dd.......J6.\1...akp..,A.n..c!+...m8.4d..K.*&B./K.Z.dU$k.X{

5........P..STl`5..!..EP.T..1i.....-Z...!`wB:.).[|..N...#R.u..@.B@...t.....N......|....<G#......Gsb!...B"y.a..

....!C?...*!0.. Z.....x...5.2....$. I...K^6......./..p..Y.......OaPn 3%4.Cd+J..c...;..w.)j.5..M|^P

..Oh.d..o=^.X>......Y0..q.-..- ..`."...........'.$.flJK.?.......^...+2.Of..S.fn"|.....'.?.o..wT..%.d1ZA`Nv.g]...5jP..?..T\!..7...+..r.8....[u....3J.k9....[.d......Pd...].(.L.w.@Y.d.....)?.:..u3..

.g..M..rlUd......B..u+..N..).8........R.]J..:0..~K&....g.]j..w.(.y@D[.l.E.&...T.0..E3..>G...y..`*..c~..>..,D?.*RR6..M0c.L.#./.y...t....qsAG.Q*...X%'1/M.......o..;y.....f.5q

O.D.........b.W]9G5..J.yR..S.B.B..}........o~/!.L..eM

,$Y.u:......}.).tZ[.../{1.Z..!.O.9.Ye...E.yi4x......k

....o.......{.......V......[.q>...Df_<..D.j./...!....g......]........

..{..v..W.A.n.....S5...H...S...g.../.4I...D.F(..o?.c....h...c.$O...m..`....[...&.X.E..p(.;..2...])....5.~...".5.8<y!..Tm....Pqy...~k..W..F.....U..t..Lw........@...`.H..aUGb,..b7.p....7..........v...Z.......M.6...P..p.uU.?........mk{..[....O..s8..g..5.*

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...