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 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
| import os import requests from bs4 import BeautifulSoup import re from lxml import etree
def sign(): result = "" headers = { "Cookie": 'KF4=u13R4j; htVC_2132_saltkey=HF4JyyW5; htVC_2132_lastvisit=1690763826; htVC_2132_auth=026bFW5vdDD7zHi66umaJGWQHpxEJZjOHMKI1dNbAP0oKakjQ%2FeEJymY9HVo4HqP8Vqi6oYIJ%2Bo%2FLSiaKQIoeKEmJx2g; htVC_2132_connect_is_bind=1; htVC_2132_nofavfid=1; htVC_2132_smile=1D1; htVC_2132_visitedfid=37D21D8D74D10; wzws_sessionid=gWVhZjNhNoAxMTEuNTMuMjkuNTGgZOSrtoJkYjFjYWE=; htVC_2132_sid=0; htVC_2132_noticonf=1805136D1D3_3_1; htVC_2132_ulastactivity=1692707765%7C0; htVC_2132_checkpm=1; htVC_2132_lastcheckfeed=1805136%7C1692707766; Hm_lvt_46d556462595ed05e05f009cdafff31a=1690766232,1692594452,1692707769; Hm_lpvt_46d556462595ed05e05f009cdafff31a=1692707769; wzws_sid=fa58f4e83c5d6efa8897883750306235f46e882466451d9b4d3415f18ad8122d825d7df696bfc650edb38e4feb6945b692711b097446e653a19e1b226efbed4bad402231fce0c56bc55b7e6f3b148257; htVC_2132_lastact=1692707844%09home.php%09task', "ContentType": "text/html;charset=gbk", "User-Agent": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36", } fd = requests.session().put( "https://www.52pojie.cn/home.php?mod=task&do=draw&id=2&referer=https%3A%2F%2Fwww.52pojie.cn%2F.%2F%2F", headers=headers ) fa = requests.session().put( "https://www.52pojie.cn/home.php?mod=task&do=draw&id=2&referer=https%3A%2F%2Fwww.52pojie.cn%2F.%2F%2F", headers=headers ) fb = BeautifulSoup(fa.text, "html.parser") fc = fb.find("div", id="messagetext").find("p").text if "您需要先登录才能继续本操作" in fc: result += "Cookie 失效" elif "恭喜" in fc: result += "签到成功" elif "不是进行中的任务" in fc: result += "今日已签到" else: result += "签到失败" return result
def qiandao():
session = requests.session()
url_cook = 'https://www.ruike1.com/k_misign-sign.html?operation=qiandao&format=global_usernav_extra&formhash=01d11741&inajax=1&ajaxtarget=k_misign_topb'
headers = { 'Cookie': 'zzhh_2132_connect_is_bind=1; zzhh_2132_smile=1D1; zzhh_2132_saltkey=wzEzjIEw; zzhh_2132_lastvisit=1690762574; zzhh_2132_auth=8b1dyXCOaJRVQFgL2QLwZJN%2B9mZPTNOw6tP0EzQw%2F7X45vURSF4mlhwh7uFFPwpwrrpxH7VTaMwpecMvwepjKsAgbg; zzhh_2132_lastcheckfeed=23994%7C1690766220; zzhh_2132_nofavfid=1; zzhh_2132_sid=tsFT0L; zzhh_2132_lip=82.156.2.193%2C1692691093; zzhh_2132_myrepeat_rr=R0; zzhh_2132_ulastactivity=f0388SbSG7nqfOA0ZaMoNyvjPV39EwRyHjUm10a2TFMjF22H8dX2; Hm_lvt_73ad58a7cf08cf5833714aed91aa7068=1692246101,1692246583,1692592810,1692706668; zzhh_2132_st_p=23994%7C1692706570%7Cb78388246f83c149ffd45466605a4bfd; zzhh_2132_visitedfid=41D47D48D42D2D52D51D64D50D65; zzhh_2132_viewid=tid_63479; Hm_lpvt_73ad58a7cf08cf5833714aed91aa7068=1692706682; zzhh_2132_lastact=1692706609%09plugin.php%09; zzhh_2132_creditbase=0D2273D31D2505D0D0D0D0D0; zzhh_2132_creditrule=%E5%8F%91%E8%A1%A8%E5%9B%9E%E5%A4%8D; zzhh_2132_creditnotice=0D2D2D0D0D0D0D0D0D23994' } res = session.get(url = url_cook,headers=headers)
return '瑞客--' + res.text.split('CDATA')[-1] + '-------'
def log_in(): session = requests.session() url_login = 'http://muchong.com/bbs/logging.php?action=login' login_page = session.get(url_login,) login_page_html = etree.HTML(login_page.text)
formhash = login_page_html.xpath('//input[@name="formhash"]/@value')[0]
log_t= login_page_html.xpath('//form[@method="post"]/@action')[0].split("&t=")[-1]
log_url = 'http://muchong.com/bbs/logging.php?action=login&t=' + log_t
my_data = {'formhash': formhash, 'refer': '', 'username': 'bajibajihe', 'password': 'Yzh963987', 'cookietime': '31536000', 'loginsubmit': '提交'}
res = session.post(url=log_url,data=my_data) res_html = etree.HTML(res.text) varify_content = res_html.xpath('//div[@style = "padding:10px 0;"]//text()')[0] varify = re.search(u'问题:(\d+)(\D+)(\d+)等于多少?', varify_content) number1 = int(varify.group(1)) number2 = int(varify.group(3)) if varify.group(2) == '加': my_answer = number1 + number2 elif varify.group(2) == '减': my_answer = number1 - number2 elif varify.group(2) == '乘以': my_answer = number1 * number2 else: my_answer = number1 / number2
post_sec_hash = res_html.xpath('//input[@name = "post_sec_hash"]/@value')[0] new_data = { 'formhash': formhash, 'post_sec_code': my_answer, 'post_sec_hash': post_sec_hash, 'username': 'bajibajihe', 'loginsubmit': '提交' } res1 = session.post(log_url,new_data) headers ={ 'Cookie':'_ga=GA1.2.218366420.1658801280; _discuz_cc=36661247307489666; last_ip=120.208.99.4_30246316; Hm_lvt_2207ecfb7b2633a3bc5c4968feb58569=1659937011,1659946720,1660358771,1660449877; _emuch_index=1; discuz_tpl=qing; acw_tc=276077cc16604961356387283e9bcad83fdbb4938555f633de690328b12936; _discuz_uid=30246316; _discuz_pw=b77e1e08db437cc8; _gat=1; Hm_lpvt_2207ecfb7b2633a3bc5c4968feb58569=1660497901', 'Host': 'muchong.com', 'Upgrade-Insecure-Requests': '1', 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.5112.81 Safari/537.36 Edg/104.0.1293.54' } resp = session.get('http://muchong.com/bbs/memcp.php?action=getcredit')
res2 = etree.HTML(resp.text) if res2.xpath('//div[@style = "padding:0 0 10px 0;"]/b[1]/text()')[0].replace('\n','').split(',')[0] == "您已经领取今天的红包啦": return "签到成功 您现在的金币数:" ,res2.xpath('//span[@style = "color:red;font-weight:bold;font-size:20px;"]/text()')[0] else: credit_formhash = res2.xpath('//input[@name="formhash"]/@value')[0] credit_data = {'formhash': credit_formhash, 'getmode': '1', 'message': '', 'creditsubmit': '领取红包'} r = session.post('http://muchong.com/bbs/memcp.php?action=getcredit', data=credit_data) get_coins_number = etree.HTML(r.text).xpath('//span[@style="color:red;font-weight:bold;font-size:30px;"]//text()')[0] coins = etree.HTML(r.text).xpath('//span[@style="color:red;font-weight:bold;font-size:20px;"]/text()')[0] return '小木虫---'+'今天领取了金币数为:%s' % get_coins_number,'目前的总金币数为:%s' % coins + '--------'
def nino_hub(): log_in_url = 'https://v3.cdnye.com:2096/Application/login_action?sign=37f701892a91ed17c84c86feb8715cfc' data = { 'username': 'bajibajihei', 'password': '963852741', } headers = { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36 Edg/108.0.1462.54',
} session = requests.session() res1 = session.post(log_in_url, data=data, headers=headers) res2 = session.post( 'https://v3.cdnye.com:2096/Application/checkin_action?type=app&sign=31abdee78d175bbcf0e08221990c5c68', headers=headers, data=data) res =res2.content.decode()
session.close() return 'success'
def nine_hub(): log_in_url = 'https://v3.cdnye.com:2096/Application/login_action?sign=37f701892a91ed17c84c86feb8715cfc' data = { 'username': 'bajibajihahu', 'password': '963852741', } headers = { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36 Edg/108.0.1462.54',
} session = requests.session() res1 = session.post(log_in_url, data=data, headers=headers) res2 = session.post( 'https://v3.cdnye.com:2096/Application/checkin_action?type=app&sign=31abdee78d175bbcf0e08221990c5c68', headers=headers, data=data) res = res2.content.decode()
session.close()
return '91hub签到:success-------'
def nin_hub(): log_in_url = 'https://v3.cdnye.com:2096/Application/login_action?sign=37f701892a91ed17c84c86feb8715cfc' data = { 'username': 'bajibajiheihei', 'password': '963852741', } headers = { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36 Edg/108.0.1462.54',
} session = requests.session() res1 = session.post(log_in_url, data=data, headers=headers) res2 = session.post( 'https://v3.cdnye.com:2096/Application/checkin_action?type=app&sign=31abdee78d175bbcf0e08221990c5c68', headers=headers, data=data) res = res2.content.decode()
session.close()
return '91hub签到:success-------'
def ikuu_vpn_1(): log_in_url = 'https://ikuuu.art/user' headers = { 'Cookie':'lang=zh-cn; _gid=GA1.2.1838944191.1692709226; uid=920803; email=1946497315%40qq.com; key=4374ddf196b04879f6207b2e9b76a3c72f272ef98faa3; ip=a7ef272bedfcf5b89477907d2e217f00; expire_in=1693381999; _gat_gtag_UA_158605448_1=1; _ga_8HVN7928SC=GS1.1.1692777201.4.1.1692777214.0.0.0; _ga=GA1.1.1250485882.1690767191', 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36 Edg/116.0.1938.54',
} session = requests.session()
res1 = session.post(log_in_url,headers=headers,verify=False)
res2 = session.post('https://ikuuu.art/user/checkin',headers=headers)
res = res2.content.decode()
session.close()
return 'iKuu签到:success-------'
def ikuu_vpn_2(): log_in_url = 'https://ikuuu.art/user' headers = { 'Cookie':'lang=zh-cn; _gid=GA1.2.1838944191.1692709226; uid=1423243; email=2841119340%40qq.com; key=5e01f92f1dd949d6bdc9cf7be65a2f6ec2a4b16d3957a; ip=4df0fbfde0693c23fb9befc03ca1e7c6; expire_in=1693382923; _ga_8HVN7928SC=GS1.1.1692777201.4.1.1692778125.0.0.0; _ga=GA1.2.1250485882.1690767191; _gat_gtag_UA_158605448_1=1', 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36 Edg/116.0.1938.54',
} session = requests.session()
res1 = session.post(log_in_url,headers=headers,verify=False)
res2 = session.post('https://ikuuu.art/user/checkin',headers=headers)
res = res2.content.decode()
session.close()
return 'iKuu签到:success-------'
def push(result): url = 'https://sctapi.ftqq.com/SCT165450TxflxDTaPnd9KfYpxBDj40ee3.send' data = { "title": '每日签到', "desp": result, "channel":9 }
requests.post(url, data)
def main():
print(ikuu_vpn_1()) if __name__ == "__main__": main()
|