Normal net ile çalıştırmalısınız. Bunun haricinde Bloodshot.py ile aynı klasörde çalıştırmalısınız.
PHP Kod:
#-*-coding:utf8;-*-
#qpy:2
#qpy:console
import time, re, base64, os
import androidhelper, threading
try:
import urllib2
kip="ab"
except:
import urllib.request as urllib2
kip="a"
print("\033[94m==============================\x1b[m")
print("\033[94m=='QPYTHON.NET' Proxy Tarama==\x1b[m")
print("\033[94m==============================\x1b[m")
CUSTOM_HOST = "wap.turkcell.com.tr"
d=androidhelper.Android()
v = '/sdcard/com.hipipal.qpyplus/scripts/'
v2 = '/sdcard/qpython/scripts/'
try:
if not os.path.isdir(v+"BloodShot/"):
os.mkdir(v+"BloodShot/")
for i in os.listdir(v+"BloodShot/"):
os.remove(v+"BloodShot/"+i)
yol = v
except:
if not os.path.isdir(v2+"BloodShot/"):
os.mkdir(v2+"BloodShot/")
for i in os.listdir(v2+"BloodShot/"):
os.remove(v2+"BloodShot/"+i)
yol = v2
########## PROXY TARAMA FONKSIYONLARI ############
proxyliste = []
zaman=time.ctime()
tbl = []
ValidIPRegex = '(\d+\.\d+\.\d+\.\d+).*?(\d{2,5})'
tekrarsayisi = 1
maxthreads = 50
LOADURL = 'http://ip.jsontest.com'
time_out = 3
network = True
def bga():
try:
print(base64.decodestring(set))
except:
print(str(base64.b64decode(set.encode("ascii")).decode("ascii")))
def wtf(ip):
dosya=open("/sdcard/proxylist.txt", kip)
dosya.write(ip+"\n")
dosya.close() #taranan proxyler kaydedildi
dosya2 = open(yol+"BloodShot.py").read()
_phost, _pport = ip.split(":")
_exhost = dosya2.split("self.PHOST = '")[1].split("'\n")[0]
_export = dosya2.split("self.PPORT = ")[1].split("\n")[0]
dosya3 = dosya2.replace("self.PHOST = '"+_exhost, "self.PHOST = '"+_phost)
dosya4 = dosya3.replace("self.PPORT = "+_export, "self.PPORT = "+_pport)
with open(yol+"BloodShot/B_Shot_"+ip+".py","w") as b_shot:
b_shot.write(dosya4)
#bloodShot 'a kaydedildi
set="QnUgS29kIHFweXRob24ubmV0IEFkcmVzaW5lIEFpdHRpci4="
bga()
def is_OK(ip):
global network
try:
proxy_handler = urllib2.ProxyHandler({'http': ip})
opener = urllib2.build_opener(proxy_handler)
urllib2.install_opener(opener)
req = urllib2.Request(LOADURL)
req.add_header("Host",CUSTOM_HOST)
t = time.time()
res = urllib2.urlopen(req, timeout=time_out)
t2 = time.time() - t
if str(res.read()).find('{"ip": "') > -1:
print(ip+' çalışıyor '+str(t2)[:4]+' saniye')
#wtf(ip, t2)
proxyliste.append(ip)
else:
print(ip+' proxy gereken cevabı yollamadı, atlanıyor.')
network = True
except Exception as e:
if str(e) == '<urlopen error [Errno 101] Network is unreachable>':
print('Ağ hatası, 1 saniye sonra tekrar denenecek')
network = False
time.sleep(1)
is_OK(ip)
else:
network = True
def baslat():
sayac = 0
while sayac < tekrarsayisi:
print("\033[94m"+str(sayac + 1) + '. Tarama başlatıldı\x1b[m')
for x in tbl:
while not network:
time.sleep(1)
while threading.activeCount() >= maxthreads:
time.sleep(0.1)
threading.Thread(target=is_OK,args=(x,)).start()
sayac = sayac + 1
##########################################################################################
def webproxy(url):
a=urllib2.Request(url)
a.add_header("User-Agent","")
a.add_header("Referer","http://sslproxies.org/surf/")
return str(urllib2.urlopen(a).read())
def ssl():
try:
print("\033[92mTarama yapılacak...\x1b[m")
urllib2.install_opener(urllib2.build_opener(urllib2.ProxyHandler({})))
oku = webproxy("http://www.sslproxies.org/")
clp = oku.replace(' ', ':')
clp2 = re.findall(ValidIPRegex, clp)
for x in clp2:
a = x[0] + ':' + x[1]
if not a in tbl:
tbl.append(a)
baslat()
time.sleep(4)
d.makeToast("Proxyler, /sdcard/proxylist.txt dosyasına kaydedildi.")
except:
print("\ninternet baglantisi yok!\n")
d.makeToast("internet bağlantısı yok")
def bloodshot():
d.dialogCreateAlert("Proxy secin")
d.dialogSetMultiChoiceItems(proxyliste)
d.dialogSetPositiveButtonText("Tamam")
d.dialogShow()
d.dialogGetResponse().result
r = d.dialogGetSelectedItems().result
for i in r:
prx = proxyliste[i]
wtf(prx)
dosya=open("/sdcard/proxylist.txt", kip)
dosya.write("\n#######"+str(zaman)+"#######\n")
dosya.close()
ssl()
time.sleep(1)
bloodshot()
Turbobit Premium Link Çeviri | Turbobit Link Generator | http://turbobit.qpython.club



