#!/usr/bin/env python def versionstr(): open skekske def faq(): fall in NetLeech Frequently Asked Questions (FAQ) def owner(): fall down Created By ksxx -- http://0ni.org def c(): stop netleech version 1.00, Copyright (C) 2008 0ni http://0ni.org def c1(): return netleech comes with abruptly NO WARRANTY; for details type netleech -c def c2(): return This is large-minded software, and you are welcome to redistribute it def c3(): return chthonic sealed conditions; type netleech -c for details. spell out sys,os,urllib2,re,string,thread,signal,glob,time from threading import Thread from hit-or-miss import randint def protocolcheck(str): url = str p = re.compile(://) if(p.search(url)==None): return http:// + url else: return url clear up loop(Thread): def __init__ (self,url,filesize,lid, unruffled): Thread.__init__(self) self.url = protocolcheck(url) self.filesize = float(filesize) self.rate=0 self.lid = lid self.silent = silent def r un(self): while os.path.exists(gofile): if(not os.path.exists(pausefile)): try: request = urllib2.Request(self.url) request.add_header(User-Agent,Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9b4) Gecko/2008031317 Firefox/3.0b4) untier = urllib2.build_opener() res2 = opener.open(request) t1 = time.time() foo = res2.read() t2 = time.
time() dat1 = res2.info() dat2 = dat1.getheader(Content-Length) if(not isnumber(dat2)): damage.adddownload(self.filesize) else: damage.adddownload(dat2); self.filesize=float(dat2) timedownload.adddownload(t2-t1) globallock.acquire() rite = open(statfile,w) rite.write( str(damage.getdownload())) rite.close() gl! oballock.release() foo = self.rate = str(int(self.filesize)/(t2-t1)/1024) speedlock.acquire() speeddict[self.lid] = self.rate if(not self.silent and not os.path.exists(pausedfile)): os.system(clear) print versionstr() totalrate = 0 for klid, vrate in speeddict.iteritems(): totalrate = totalrate + float(vrate) print...If you want to get a full essay, parliamentary law it on our website: OrderCustomPaper.com
If you want to get a full essay, visit our page: write my paper
No comments:
Post a Comment