def sys(self, ph, mm): self.driver.implicitly_wait(180) self.driver.find_elements_by_id(self.element_json[u'微信四个主按钮ID'])[0].click() config_data = self.check_62() if config_data[0] == "True": self.start_yz() if token().get_jurisdiction(TokenYZ.pdtoken(), self.deviceid) != None: for i in range(0, 5): self.visualization('开始提62') logging.info(self.deviceid + u'-开始提62') data_62 = self.get_qr_image() for j in range(0, 3): os.system('adb -s %s shell input swipe 500 1200 500 1600' % self.deviceid) self.driver.implicitly_wait(5) if self.driver.find_elements_by_id('com.tencent.mm:id/co5')!= []: if self.driver.find_elements_by_name('Mac 微信已登录') != []: self.driver.find_element_by_name('Mac 微信已登录').click() time.sleep(2) if self.driver.find_elements_by_name('iPad 微信已登录') != []: self.visualization('提62成功') logging.info(self.deviceid + u'-提62成功') file().write('%s----%s----%s----%s----%s\n' % (ph, mm, data_62, self.wxid, datetime.datetime.now().strftime('%Y-%m-%d')), '提62成功列表.txt') token().huojian_t62(self.deviceid, TokenYZ.pdtoken()) return data_62 if i == 4: self.visualization('提取62失败') logging.info(u'%s-提取62失败' % self.deviceid) file().write('%s|\n' % ph, '提62失败列表.txt') break if config_data[1] == "True": os.system('adb -s %s shell input keyevent 3' % self.deviceid) if token().get_jurisdiction(TokenYZ.pdtoken(), self.deviceid) != None: self.T_A16(ph, mm)
def circle_of_friends(self): self.driver.implicitly_wait(60) self.driver.find_elements_by_id(self.element_json[u'微信四个主按钮ID'])[2].click() self.visualization('点击发送') logging.info(self.deviceid + u'-点击发现') time.sleep(random.randint(1, 3)) self.driver.find_elements_by_id(self.element_json[u'发现页面朋友圈ID'])[0].click() self.visualization('点击朋友圈') logging.info(self.deviceid + u'-点击朋友圈') time.sleep(5) if self.driver.find_elements_by_id(self.element_json[u'朋友圈相机ID'])!=[]: TouchAction(self.driver).long_press(self.driver.find_element_by_id(self.element_json[u'朋友圈相机ID']), 3000).release().perform() logging.info(self.deviceid + u'-长按相机') self.visualization('长按相机') self.driver.implicitly_wait(5) if self.driver.find_elements_by_id(self.element_json[u'发表按钮ID']) != []: self.input_message() else: time.sleep(random.randint(1, 2)) self.driver.find_element_by_id(self.element_json[u'我知道了ID']).click() self.input_message() self.visualization('点击发表') logging.info(self.deviceid + u'-点击发表') self.driver.find_element_by_android_uiautomator( 'new UiSelector().description("返回")').click() time.sleep(random.randint(1, 3)) self.driver.find_element_by_id(self.element_json[u'微信四个主按钮ID']).click() time.sleep(random.randint(1, 3)) if self.gj_mode == '1.微霸改机'.decode("utf-8"): file().write_pyq_succ('%s_%s %s %s %s %s|' % ( self.wechat_list[0], self.wechat_list[1], datetime.datetime.now().strftime('%Y-%m-%d'), self.deviceid, self. wxid, self.cloudCode)) else: file().write_pyq_succ('%s %s %s %s' % (self.wechat_list[0], self.wechat_list[1], datetime.datetime.now(). strftime('%Y-%m-%d'), self.deviceid))
def lj_get_ph(self): data = file().read_lj() data_new = [] for i in range(1, data.__len__()): data_new.append(data[i]) file().delete_lj() file().write_lj(data_new) logging.info(self.deviceid + u'-获取到手机号码:' + data[0]) return data[0].strip('\n'),self.pid
def get_tkt_data(self): data = file().read_TKT() data_new=[] for i in range(1,data.__len__()): data_new.append(data[i]) file().delete_TKT() file().write_TKT(data_new) logging.info(self.deviceid+u'-获取到手机号码:'+re.findall('[0-9]{10}', data[0].strip('\n'))[0]) return re.findall('[0-9]{10}', data[0].strip('\n'))[0],re.findall('\|(.*)', data[0].strip('\n'))[0]
def gnsr2_get_ph(self): file_name = '国内私人2数据.txt' data = file.read(file_name) data_new = [] for i in range(1, data.__len__()): data_new.append(data[i]) file().delete(file_name) file().write(data_new, file_name) logging.info(self.deviceid + u'-获取到手机号码:' + re.findall('[0-9]{11}', data[0])[0]) return re.findall('[0-9]{11}', data[0])[0],'test'
def refresh(self,token): url = 'http://passport.91huojian.com/refresh' header = {'Authorization': 'Bearer ' + token} response = requests.get(url,data=None,json=None,headers=header) if response.status_code == 200: jg=json.loads(response.text)['token'] xc=json.loads(response.text)['maxThreadNum'] b = re.findall(': (.*)', os.popen('ipconfig /all').read().splitlines()[3])[0] file().writetoken(jg+ b[1]) return xc
def xrtoken(): """ 写入加密token """ b = re.findall(': (.*)', os.popen('ipconfig /all').read().splitlines()[3])[0] user = file().readuser() try: tk = token().get(user[17].strip('\n'), user[20].strip('\n')) file().writetoken(tk[0] + b[1]) return tk[1] except: logging.info(u'账号脚本可允许数量超过限制')
def get_tkt_yzm(self,ph,token): for i in range(0,100): try: yzm=requests.get(token).text if re.findall('([0-9]{4})',yzm)[0]!=None: logging.info(self.deviceid + u'-获取验证码:'+re.findall('[0-9]{4}',yzm)[0]) return re.findall('[0-9]{4}',yzm)[0] except: logging.debug(self.deviceid + u'-未获取到验证码,重新获取') time.sleep(3) if i==99: file().write_Tkt_NotReceived('%s|%s'%(ph,token)) logging.info(self.deviceid + u'-已写入未收到验证码文件')
def gnsr_get_ph(self): if float(token().get_balance(TokenYZ.pdtoken())) > float(6*int(token().refresh(TokenYZ.pdtoken()))): data = file().read_grsr() data_new = [] for i in range(1, data.__len__()): data_new.append(data[i]) file().delete_grsr() file().write_grsr(data_new) logging.info(self.deviceid + u'-获取到手机号码:' + data[0]) return data[0].strip('\n'), 'test' else: while True: logging.info(self.deviceid+u'-账户余额不足,请及时充值') time.sleep(10)
def Registration_Mode(self,mode): with open('跳辅设置.txt'.decode('utf-8'), 'r') as f: self.tm = json.loads(f.read())['runmode'] while True: try: self.Judgment_Devices() phonenumber = self.phmode.all_getph() self.ip = self.pd_ip('1') if self.country == '2.国外'.decode("utf-8"): self.wxmc = file().readwxmc().decode("gb2312").strip('\n') if self.country == '1.国内'.decode("utf-8"): #self.wxmc = file().readwxmc().strip('\n') self.wxmc = ''.join([random.choice(string.digits) for i in range(8)]) #self.wxmc = file().readwxmc().decode("gb2312").strip('\n') self.sjmm = self.random_password_Verification() if mode == 'zc': newenvironment(self.user[3], self.user[6], self.user[9], self.deviceid, self.port, self.user[17],self.user[20], self.sjmm, self.f, self.wxmc.strip('\n'), phonenumber, self.gj_mode,self.tm, self.cooperator, country=self.country, gj=self.gj, qh=self.qh,switchingmode=self.switchingmode,filtering_mode=self.filtering_mode,t=self.t,ip=self.ip).new_zh() if mode == 'zcfpyq': newenvironment(self.user[3], self.user[6], self.user[9], self.deviceid, self.port, self.user[17], self.user[20], self.sjmm, self.f, self.wxmc.strip('\n'), phonenumber, self.gj_mode,self.tm, self.cooperator, country=self.country, gj=self.gj, qh=self.qh,switchingmode=self.switchingmode,filtering_mode=self.filtering_mode,t=self.t,ip=self.ip).new_zhpyq() if mode == 'zc_pyq_t62': newenvironment(self.user[3], self.user[6], self.user[9], self.deviceid, self.port, self.user[17],self.user[20], self.sjmm, self.f, self.wxmc.strip('\n'), phonenumber, self.gj_mode,self.tm, self.cooperator, country=self.country, gj=self.gj, qh=self.qh,switchingmode=self.switchingmode,filtering_mode=self.filtering_mode,t=self.t,ip=self.ip).zc_pyq_t62() if mode == 'gw_zc_t62_1280': newenvironment(uid=self.user[3], password=self.user[6], pid=self.user[9], deviceid=self.deviceid,port=self.port, o_username=self.user[17], o_password=self.user[20], wxmm=self.sjmm,phmode=self.f, wxmc=self.wxmc, phonenumber=phonenumber, gj_mode=self.gj_mode,tm=self.tm, cooperator=self.cooperator, country=self.country, gj=self.gj, qh=self.qh,switchingmode=self.switchingmode,filtering_mode=self.filtering_mode,t=self.t,ip=self.ip).gw_zc_t62_1280() except: logging.info(self.deviceid + u'-发现异常,重新注册') time.sleep(5)
def switching_VPS(self,m,filtering_mode): while True: try: server_res = self.switch().strip('\n') ip = re.findall('[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}', server_res) if ip != []: if m == '1': if ip_fiter(self.deviceid,ip[0],filtering_mode) == True: return ip[0] else: pass if m == '2': file().writeIpFile(ip[0]) return ip[0] except: time.sleep(5) logging.info(self.deviceid + u'-服务器暂时无法联网,尝试重新拨号')
def switching_VPS(self, m, filtering_mode): while True: try: server_res = self.switch().strip('\n') ip = re.findall('[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}', server_res) if ip != []: if m == '1': if ip_fiter(self.deviceid, ip[0], filtering_mode) == True: return ip[0] else: pass if m == '2': file().writeIpFile(ip[0]) return ip[0] except: logging.info(self.deviceid + u'-服务器暂时无法联网,尝试重新拨号')
def input_message(self): time.sleep(random.randint(1, 2)) self.visualization('进入到发文字朋友圈页面') logging.info(self.deviceid + u'-进入到发文字朋友圈页面') self.driver.find_element_by_id(self.element_json[u'朋友圈内容输入框ID']).click() self.driver.find_element_by_id(self.element_json[u'朋友圈内容输入框ID']).send_keys(file().sh()) self.visualization('输入文字') logging.info(self.deviceid + u'-输入文字') time.sleep(random.randint(1, 2)) self.driver.find_element_by_id(self.element_json[u'发表按钮ID']).click()
def T_A16(self, ph, mm): A16_list = [] file_list = os.popen('adb -s %s shell ls /data/data/com.tencent.mm/files/kvcomm/'% self.deviceid).readlines() try: for _file in file_list: os.system('adb -s %s shell su root chmod a+rw /data/data/com.tencent.mm/files/kvcomm/%s' % (self.deviceid,_file)) file_data = os.popen('adb -s %s shell su root cat -v /data/data/com.tencent.mm/files/kvcomm/%s' % (self.deviceid,_file)).read() A16 = re.findall(',(A[0-9a-z]{15})', file_data) if A16 != []: A16_list.append(A16[0]) device_data = os.popen('adb -s %s shell curl "http://127.0.0.1:8888/cmd?group=AppTool\&action=getHookDevice' % self.deviceid).read() data = json.loads(device_data)['data'] file().write('%s|%s|%s|%s|%s|%s|%s|%s\n' % (ph, mm, A16_list[0], data['phone']['Imei'], data['build']['ANDROIDID'], data['phone']['BSSID'], data['build']['CPU_ABI'], data['build']['BRAND']), 'A16数据.txt') self.visualization('提A16数据成功') logging.info(u'%s-提A16数据成功' % self.deviceid) token().huojian_t62(self.deviceid, TokenYZ.pdtoken()) except: self.visualization('提A16数据失败') logging.info(u'%s-提A16数据失败' % self.deviceid)
def add_friend(self, zh, mm, hy): if self.d(resourceId=self.element_json[u'微信页面加号']).exists(100) == True: self.d(resourceId=self.element_json[u'微信页面加号']).click() if self.d(resourceId=self.element_json[u'加号列表']).exists(100) == True: self.d(resourceId=self.element_json[u'加号列表'])[1].click() logging.info(self.deviceid + u'-添加朋友') if self.d(resourceId=self.element_json[u'输入框ID']).exists(100) == True: self.d(resourceId=self.element_json[u'输入框ID']).set_text(hy) time.sleep(3) if self.d(resourceId=self.element_json[u'点击添加按钮']).exists(100) == True: self.d(resourceId=self.element_json[u'点击添加按钮']).set_text(hy) while True: if self.d(resourceId=self.element_json[u'设置备注']).exists(2) == True: break if self.d(resourceId=self.element_json[u'错误弹窗确定ID']).exists( 2) == True: self.d(resourceId=self.element_json[u'错误弹窗确定ID']).click() time.sleep(3) self.d(resourceId=self.element_json[u'点击添加按钮']).click() while True: if self.d( resourceId=self.element_json[u'添加通讯录']).exists(2) == True: self.d(resourceId=self.element_json[u'添加通讯录']).click() if self.d(resourceId=self.element_json[u'发消息']).exists(2) == True: self.d(resourceId=self.element_json[u'发消息']).click() if self.d(resourceId=self.element_json[u'消息内容框ID']).exists( 2) == True: break self.d(resourceId=self.element_json[u'消息内容框ID']).set_text(zh) logging.info(self.deviceid + u'-正在发送信息:' + zh) self.visualization('正在发送信息:%s' % zh) time.sleep(5) self.d(resourceId=self.element_json[u'消息发送按钮ID']).click() logging.info(self.deviceid + u'-点击发送') time.sleep(2) if self.gj_mode == '1.微霸改机'.decode("utf-8"): file().writehy('%s_%s %s %s %s %s| %s' % (self.wechat_list[0], self.wechat_list[1], datetime.datetime.now().strftime('%Y-%m-%d'), self.deviceid, self.wxid, self.cloudCode, hy)) else: file().writehy('%s %s %s %s' % (zh, mm, self.deviceid, hy))
def pdsb(): """ 判断设备 """ b = re.findall(': (.*)', os.popen('ipconfig /all').read().splitlines()[3])[0] token1 = b[1] token2 = file().readtoken()[0][-1:] if token1 == token2: return '1' else: return '0'
def ip_fiter(deviceid, ip, filtering_mode): if ip in file().readIpFile(): logging.info(deviceid + u'-IP已存在,重新切换IP') return False else: if filtering_mode == '2.设定过滤IP段'.decode('utf-8'): filer_all = file.read('IP段设定过滤.txt') test = [] for filer_ip in filer_all: if filer_ip.strip('\n') in ip: logging.info(deviceid + u'-被设定的IP段过滤,重新切换网络') test.append(filer_ip.strip('\n')) if test == []: file().writeIpFile(ip) return True else: return False else: file().writeIpFile(ip) return True
def ip_fiter(deviceid,ip,filtering_mode): if ip in file().readIpFile(): logging.info(deviceid + u'-IP已存在,重新切换IP') return False else: if filtering_mode == '2.设定过滤IP段'.decode('utf-8'): filer_all=file.read('IP段设定过滤.txt') test=[] for filer_ip in filer_all: if filer_ip.strip('\n') in ip: logging.info(deviceid + u'-被设定的IP段过滤,重新切换网络') test.append(filer_ip.strip('\n')) if test==[]: file().writeIpFile(ip) return True else: return False else: file().writeIpFile(ip) return True
def add_friend(self, zh, mm, hy): self.driver.implicitly_wait(60) self.driver.find_element_by_id(self.element_json[u'微信页面加号']).click() self.driver.find_elements_by_id(self.element_json[u'加号列表'])[1].click() self.visualization('添加朋友') logging.info(self.deviceid + u'-添加朋友') self.driver.find_element_by_id(self.element_json[u'输入框ID']).click() self.driver.find_element_by_id(self.element_json[u'输入框ID']).send_keys(hy) time.sleep(3) if self.driver.find_elements_by_id(self.element_json[u'点击添加按钮']) != []: self.driver.find_element_by_id(self.element_json[u'点击添加按钮']).click() self.driver.implicitly_wait(2) while True: if self.driver.find_elements_by_id(self.element_json[u'设置备注'])!=[]: break if self.driver.find_elements_by_id(self.element_json[u'错误弹窗确定ID'])!=[]: self.driver.find_element_by_id(self.element_json[u'错误弹窗确定ID']).click() time.sleep(3) self.driver.find_element_by_id(self.element_json[u'点击添加按钮']).click() while True: if self.driver.find_elements_by_id(self.element_json[u'添加通讯录']) != []: self.driver.find_element_by_id(self.element_json[u'添加通讯录']).click() if self.driver.find_elements_by_id(self.element_json[u'发消息'])!=[]: self.driver.find_element_by_id(self.element_json[u'发消息']).click() if self.driver.find_elements_by_id(self.element_json[u'消息内容框ID'])!=[]: break self.driver.implicitly_wait(180) self.driver.find_element_by_id(self.element_json[u'消息内容框ID']).send_keys(zh) logging.info(self.deviceid + u'-正在发送信息:' + zh) self.visualization('正在发送信息:%s' % zh) time.sleep(5) self.driver.find_element_by_id(self.element_json[u'消息发送按钮ID']).click() self.visualization('点击发送') logging.info(self.deviceid + u'-点击发送') time.sleep(2) if self.gj_mode == '1.微霸改机'.decode("utf-8"): file().writehy('%s_%s %s %s %s %s| %s' % ( self.wechat_list[0], self.wechat_list[1], datetime.datetime.now().strftime('%Y-%m-%d'), self.deviceid, self. wxid, self.cloudCode, hy)) else: file().writehy('%s %s %s %s' % (zh, mm, self.deviceid,hy))
def circle_of_friends(self): self.d(resourceId=self.element_json[u'微信四个主按钮ID'])[2].click() logging.info(self.deviceid + u'-点击发现') self.d(resourceId=self.element_json[u'发现页面朋友圈ID'])[0].click() logging.info(self.deviceid + u'-点击朋友圈') time.sleep(2) self.d(resourceId=self.element_json[u'朋友圈相机ID']).long_click(3) logging.info(self.deviceid + u'-长按相机') if self.d(resourceId=self.element_json[u'发表按钮ID']).exists(5) == True: self.input_message() else: self.d(resourceId=self.element_json[u'我知道了ID']).click() self.input_message() self.visualization('点击发表') logging.info(self.deviceid + u'-点击发表') self.d(description='返回').click() time.sleep(random.randint(1, 3)) self.d(resourceId=self.element_json[u'微信四个主按钮ID']).click() time.sleep(random.randint(1, 3)) file().write_pyq_succ( '%s %s %s %s' % (self.wechat_list[0], self.wechat_list[1], datetime.datetime.now().strftime('%Y-%m-%d'), self.deviceid))
def Registration_Mode(self,mode): with open('跳辅设置.txt'.decode('utf-8'), 'r') as f: self.tm = json.loads(f.read())['runmode'] while True: try: #phonenumber = '13061759881','123' phonenumber = self.phmode.all_getph() self.ip = self.pd_ip('1') if self.country == '2.国外'.decode("utf-8"): self.wxmc = file().readwxmc().decode("gb2312").strip('\n') if self.country == '1.国内'.decode("utf-8"): self.wxmc = file().readwxmc().decode("gb2312").strip('\n') self.sjmm = self.random_password_Verification() if mode == 'zc': newenvironment(self.user[3], self.user[6], self.user[9], self.deviceid, self.port, self.user[17],self.user[20], self.sjmm, self.f, self.wxmc.strip('\n'), phonenumber, self.gj_mode,self.tm, self.cooperator, country=self.country, gj=self.gj, qh=self.qh,ip=self.ip).new_zh() if mode == 'zcfpyq': newenvironment(self.user[3], self.user[6], self.user[9], self.deviceid, self.port, self.user[17], self.user[20], self.sjmm, self.f, self.wxmc.strip('\n'), phonenumber, self.gj_mode,self.tm, self.cooperator, country=self.country, gj=self.gj, qh=self.qh,ip=self.ip).new_zhpyq() if mode == 'zc_pyq_t62': newenvironment(self.user[3], self.user[6], self.user[9], self.deviceid, self.port, self.user[17],self.user[20], self.sjmm, self.f, self.wxmc.strip('\n'), phonenumber, self.gj_mode,self.tm, self.cooperator, country=self.country, gj=self.gj, qh=self.qh,ip=self.ip).zc_pyq_t62() except: traceback.print_exc() logging.info(self.deviceid + u'-发现异常,重新注册') time.sleep(5)
def __init__(self, deviceid, port, gj_mode, country=None, gj=None, wxid=None, login_mode=None, cloudCode=None, ip=None, date=None,switchingmode=None): self.deviceid = deviceid self.port = port self.om = file().readOperationMode() self.gj_mode = gj_mode self.country = country self.gj = gj self.w = WB(self.deviceid) self.wxid = wxid self.login_mode = login_mode self.cloudCode = cloudCode self.ip = ip self.date = date self.switchingmode=switchingmode self.element_json = json.loads(file.read_all('6.7.3.json'))
def __init__(self, deviceid, port, wxmm, switchingmode ,phmode,t ,gj_mode,cooperator,country,gj,qh,login_mode,privince,filtering_mode): self.user = file().readuser() self.deviceid = deviceid self.wxmm = wxmm self.port = port self.switchingmode = switchingmode self.fm=flightmode(deviceid, port) self.v = vpn(self.deviceid,port) self.phmode = PhoneNumber(self.user[3], self.user[6], self.user[9] , self.deviceid , phmode,qh) self.f = phmode self.t = t self.gj_mode = gj_mode self.cooperator = cooperator self.country = country self.gj = gj self.qh = qh self.login_mode = login_mode self.privince=privince self.wj = wj(deviceid, port) self.filtering_mode = filtering_mode
def gettoken(): """ 获取原始token """ token = file().readtoken() return token[0][:-1]
def dlyz(): """ 判断程序是否第一次运行 """ token = file().readtoken() return token
def login_fail(self, error, wechat_list): if error == 'waigua': file().write('%s %s %s %s 外挂 %s\n' % (wechat_list[0], wechat_list[1], self.ip, self.date, self.deviceid),'登录异常账号.txt') if error == 'piliang': file().write('%s %s %s %s 批量 %s\n' %(wechat_list[0], wechat_list[1], self.ip, self.date, self.deviceid),'登录异常账号.txt') if error == 'mimacuowu': file().write('%s %s %s %s 密码错误 %s\n' % (wechat_list[0], wechat_list[1], self.ip, self.date, self.deviceid),'登录异常账号.txt') if error == 'tousu': file().write('%s %s %s %s 多人投诉被限制登陆 %s\n' % (wechat_list[0], wechat_list[1],self.ip,self.date, self.deviceid), '登录异常账号.txt') if error == 'jidiao': file().write('%s %s %s %s 在别的设备登陆过 %s\n' % (wechat_list[0], wechat_list[1],self.ip,self.date, self.deviceid),'登录异常账号.txt') if error == 'xitong': file().write('%s %s %s %s 系统检测到你的账号有异常 %s\n' % (wechat_list[0], wechat_list[1], self.ip,self.date,self.deviceid),'登录异常账号.txt') if error == 'huanjingyichang': file().write('%s %s %s %s 当前设备的微信登陆环境存在异常 %s\n' % (wechat_list[0], wechat_list[1],self.ip,self.date, self.deviceid),'登录异常账号.txt') if error == 'tianjia': file().write('%s %s %s %s 当前账号添加好友过于频繁 %s\n' % (wechat_list[0], wechat_list[1],self.ip,self.date ,self.deviceid),'登录异常账号.txt') if error == 'shiyongyichang': file().write('%s %s %s %s 当前账号的使用存在异常 %s\n' % (wechat_list[0], wechat_list[1], self.ip,self.date,self.deviceid),'登录异常账号.txt') if error == 'seqing': file().write('%s %s %s %s该微信账号因涉嫌传播色情 %s\n' % (wechat_list[0], wechat_list[1],self.ip,self.date, self.deviceid), '登录异常账号.txt') if error == 'changqi': file().write('%s %s %s %s 该账号长期未登陆 %s\n' % (wechat_list[0], wechat_list[1], self.ip,self.date,self.deviceid),'登录异常账号.txt') if error == 'huatu': file().write('%s %s %s %s 进入滑图页面 %s\n' % (wechat_list[0], wechat_list[1],self.ip,self.date, self.deviceid),'登录异常账号.txt') if error == 'weishiyong': file().write('%s %s %s %s 该账号长期未使用,已被收回 %s\n' % (wechat_list[0], wechat_list[1], self.ip, self.date, self.deviceid),'登录异常账号.txt') if error == 'jiefengyichang': file().write( '%s %s %s %s 解封环境异常 %s\n' % (wechat_list[0], wechat_list[1], self.ip, self.date, self.deviceid), '登录异常账号.txt') if error == 'newwechat': file().write('%s %s %s %s 注册了新的微信号 %s\n' % (wechat_list[0], wechat_list[1], self.ip, self.date, self.deviceid),'登录异常账号.txt') if error == 'huatu': file().write('%s %s %s %s 出现滑图 %s\n' % (wechat_list[0], wechat_list[1], self.ip, self.date, self.deviceid),'登录异常账号.txt')
# -*- coding: GB2312 -*- from File import file import re yc =file().read_TKT() print yc for i in range(0,yc.__len__()): print re.findall('[0-9]{10}',yc[i].strip('\n'))[0] print re.findall('\|(.*)', yc[i].strip('\n'))[0]
if __name__ == '__main__': if __debug__: from time import clock #yes, i understand that clock is depreciated. start = clock() from File import file f = file('/Users/westerhack/code/python/Omega/omcode/linkedlist.om') #hardcode ftws # f = file('/Users/westerhack/code/python/Omega/omcode/gamesbackup.om') #hardcode ftws print(f) print('--') ldict = f.eval() print('--') if __debug__ and '$dnd' not in ldict: print('Locals Str ::', str(ldict),'\n') print('Locals Repr ::', repr(ldict),'\n') print('Total Elapsed Time ::', clock() - start, 'seconds\n')
def zh_login(self, wechat_list): self.driver.implicitly_wait(5) if self.driver.find_elements_by_name(self.element_json['allow']) != []: self.driver.find_element_by_name(self.element_json['allow']).click() self.driver.find_element_by_name(self.element_json['allow']).click() self.driver.implicitly_wait(30) self.driver.find_element_by_name(self.element_json['login']).click() self.driver.find_element_by_id(self.element_json[u'输入框ID']).click() os.system('adb -s %s shell input text %s' % (self.deviceid, wechat_list[0])) self.visualization('输入账号') logging.info(self.deviceid + u'-输入账号') self.driver.find_element_by_id(self.element_json[u'输入手机号码登陆下一步']).click() self.visualization('下一步') logging.info(self.deviceid + u'-下一步') self.driver.find_elements_by_id(self.element_json[u'输入框ID'])[1].click() os.system('adb -s %s shell input text %s' % (self.deviceid, wechat_list[1])) self.visualization('输入密码') logging.info(self.deviceid + u'-输入密码') self.driver.find_element_by_id(self.element_json[u'输入手机号码登陆下一步']).click() self.visualization('登录') logging.info(self.deviceid + u'-登录') self.driver.implicitly_wait(2) while True: if self.driver.find_elements_by_id(self.element_json[u'错误弹窗内容ID']) != []: self.cw = self.driver.find_element_by_id(self.element_json[u'错误弹窗内容ID']).get_attribute(('text')) return self.error_message() if self.driver.find_elements_by_id(self.element_json[u'微信四个主按钮ID']) != []: break if self.driver.find_elements_by_android_uiautomator('new UiSelector().description("拖动下方滑块完成拼图")') != []: logging.info(u'%s-进入滑图页面' % self.deviceid) while True: for j in range(100, 200, 30): try: a = TouchAction(self.driver) a.press(x=250, y=1000) for i in range(0, 5): a.move_to(x=50, y=(random.randint(-500, 0))).wait(0) a.move_to(x=50, y=(random.randint(0, 500))).wait(0) for i in range(0, j / 10): a.move_to(x=10, y=0).wait(100) a.release().perform() except: pass if self.driver.find_elements_by_android_uiautomator('new UiSelector().description("开始验证 ")') != []: file().write('%s\n' % wechat_list[0], '新设备记录文本.txt') logging.info(u'%s-%s该账号出现新设备' % (self.deviceid, wechat_list[0])) self.driver.quit() break if self.driver.find_elements_by_id(self.element_json[u'输入手机号码登陆下一步']) != []: self.driver.find_element_by_id(self.element_json[u'输入手机号码登陆下一步']).click() break if self.driver.find_elements_by_android_uiautomator('new UiSelector().description("声音锁验证 ")') != []: file().write('%s\n' % wechat_list[0], '新设备记录文本.txt') logging.info(u'%s-%s该账号出现新设备' % (self.deviceid, wechat_list[0])) self.driver.quit() break if self.driver.find_elements_by_android_uiautomator('new UiSelector().description("开始验证 ")') != []: file().write('%s\n' % wechat_list[0], '新设备记录文本.txt') logging.info(u'%s-%s该账号出现新设备' % (self.deviceid, wechat_list[0])) self.driver.quit() break