立即注册  找回密码
 立即注册
CeraNetworksBGVM服务器主机交流会员请立即修改密码Sharktech防护
查看: 187|回复: 9

PEE.CX 是哪个大佬的站?

[复制链接]

PEE.CX 是哪个大佬的站?

[复制链接]

52

主题

375

回帖

1525

积分

金牌会员

积分
1525
救世主

52

主题

375

回帖

1525

积分

金牌会员

积分
1525
2018-1-8 13:17:59 | 显示全部楼层 |阅读模式
本帖最后由 救世主 于 2018-5-31 18:58 编辑


忘记从哪里看到这个站的,之前访问这个网站能直接领取积分,昨天还能的,刚才打开一看发现网站变了

麻烦站长给个源码,我自己弄个网页

3q

回复

使用道具 举报

7

主题

26

回帖

129

积分

注册会员

积分
129
mxy123h

7

主题

26

回帖

129

积分

注册会员

积分
129
2018-1-8 13:26:41 | 显示全部楼层
[ol]
  • [/ol]复制代码
    就是这个
  • 回复

    使用道具 举报

    407

    主题

    1778

    回帖

    8347

    积分

    论坛元老

    积分
    8347
    tufu001

    407

    主题

    1778

    回帖

    8347

    积分

    论坛元老

    积分
    8347
    2018-1-8 13:24:29 | 显示全部楼层
    py版本1
    [ol]
  • #!/usr/bin/python
  • #encoding=utf-8
  • import requests
  • from bs4 import BeautifulSoup
  • import re
  • import sys
  • import datetime
  • uid="username"   #用户名
  • pwd="userpasswd"   #密码
  • http = requests.Session()
  • http.headers.update({
  •     'User-Agent':'Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36'
  •     ,'Accept-Language':"zh-CN,zh;q=0.8,ko;q=0.6,zh-TW;q=0.4"
  • })
  • #http.proxies = {"http":"http://127.0.0.1:8080","https":"http://127.0.0.1:8080"}
  • ##打开登陆界面
  • res=http.get("https://www.hs2v.com/member.php?mod=logging&action=login&infloat=yes&handlekey=login&inajax=1&ajaxtarget=fwin_content_login")
  • match=re.search(r'name="formhash" value="(\S+)"',res.text)
  • if(match):
  •     formhash=match.group(1)
  • else:
  •     exit(0)
  •    
  • ##登陆
  • form={
  •     "formhash":formhash
  •     ,"referer":"https://www.hs2v.com/thread-12949-1-1.html"
  •     ,"loginfield":"username"
  •     ,"username":uid
  •     ,"password":pwd
  •     ,"questionid":0
  •     ,"answer":""
  •     ,"loginsubmit":"true"
  • }
  • res=http.post("https://www.hs2v.com/member.php?mod=logging&action=login&loginsubmit=yes&handlekey=login&loginhash=LWKbr&inajax=1",data=form)
  • match=re.search(r"'uid':'",res.text)
  • if(match):
  •     print("登陆成功")
  • else:
  •     print("登陆失败")
  •     exit(0)
  • ##查询今天访问的空间数量  
  • res=http.get("https://www.hs2v.com/home.php?mod=spacecp&ac=credit&op=log&suboperation=creditrulelog")
  • bs=BeautifulSoup(res.text,"html.parser")
  • td=bs.find('td',string="访问别人空间")
  • if(td==None):
  •     print("信息获取失败")
  •     exit(0)
  • tds=td.parent.find_all("td")
  • today_view_count=int(tds[2].text)    #今天已经翻牌数
  • last_view_date=tds[5].text         #上次翻牌时间,这个时间不会自动刷新,所以不能仅仅依据数量就决定不翻牌
  • need_view=last_view_date.find(datetime.datetime.now().strftime("%Y-%m-%d"))==-1    #上次翻牌时间是不是今天,不是今天则需要翻
  • if(today_view_count>=10 and (not need_view)):       #不论数量多少,只要上次翻牌时间不是今天就翻。上次翻牌是今天才去判断数量
  •     print("今日累了,明日再翻!")
  •     exit(0)
  • ##去首页获取等待临幸的网址
  • res=http.get("https://www.hs2v.com/forum-45-1.html")
  • users   =re.findall("(space-uid\S+)"",res.text)
  • viewed=set()
  • num=0
  • while num 复制代码

    py版本2
    [ol]
  • #-*- coding=utf-8 -*-
  • import requests
  • import re
  • import cookielib
  • import sys
  • index='https://www.hs2v.com/'
  • page_url='https://www.hs2v.com/forum-45-1.html'
  • credit_url='https://www.hs2v.com/home.php?mod=spacecp&ac=credit&showcredit=1'
  • login_url='https://www.hs2v.com/member.php?mod=logging&action=login&loginsubmit=yes&infloat=yes&lssubmit=yes&inajax=1'
  • login_data={
  •         'fastloginfield':'username'
  •         ,'username':''
  •         ,'cookietime':'2592000'
  •         ,'password':''
  •         ,'quickforward':'yes'
  •         ,'handlekey':'ls'
  •     }
  • headers={
  •     'Accept':'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8'
  •     ,'Accept-Encoding':'gzip, deflate, sdch'
  •     ,'Accept-Language':'zh-CN,zh;q=0.8,en;q=0.6'
  •     ,'Host':'www.hs2v.com'
  •     ,'Referer':'https://www.hs2v.com/forum.php'
  •     ,'Upgrade-Insecure-Requests':'1'
  •     ,'User-Agent':'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36'
  • }
  •    
  •    
  • class HostLoc():
  •     def __init__(self,username,passwd):
  •         self.username=username
  •         self.passwd=passwd
  •         login_data['username']=username
  •         login_data['password']=passwd
  •         self.session=requests.Session()
  •         self.session.headers=headers
  •         self.login()
  •         self.pass_jdkey()
  •         
  •     def pass_jdkey(self):
  •         html=self.session.get(index).content
  •         try:
  •             jdkey=re.findall('jdfwkey=(.*?)"')[0]
  •         except:
  •             jdkey=''
  •         url=index+'?jdfwkey='+jdkey
  •         self.session.get(index)
  •    
  •     def login(self):
  •         self.session.post(login_url,data=login_data)
  •    
  •     def isLogin(self):
  •         url='https://www.hs2v.com/home.php?mod=spacecp'
  •         html=self.session.get(url).content
  •         UserName=re.findall(self.username,html)
  •         if len(UserName)==0:
  •             return False
  •         else:
  •             return True
  •     def get_credit(self):
  •         html=self.session.get(credit_url).content
  •         credit_pattern=re.compile(r' 金钱: (.*?)  .*? [\w\W]*?
  • 威望: (.*?) [\w\W]*?积分: (.*?) ')
  •         try:
  •             credit=credit_pattern.findall(html)
  •             coin,wh,jf=credit[0]
  •             print u"金币:%s,威望:%s,积分:%s"%(coin,wh,jf)
  •             return True
  •         except:
  •             print u"获取数据失败,请稍后再试"
  •             return False
  •         
  •     def get_user(self):
  •         print('parse '+page_url)
  •         self.html=self.session.get(page_url).content
  •         user_pattern=re.compile('space-uid-\d+?.html')
  •         users=list(set(user_pattern.findall(self.html)))
  •         self.users=[index+i for i in users]
  •     def visit_user(self):
  •         for user in self.users[:10]:
  •             print('visit user '+user)
  •             self.session.get(user)
  •      
  • if __name__=='__main__':
  •     username='' #用户名
  •     passwd='' #密码
  •     hostloc=HostLoc(username,passwd)
  •     if hostloc.get_credit():
  •         hostloc.get_user()
  •         hostloc.visit_user()
  •         hostloc.get_credit()
  •     else:
  •         sys.exit(0)[/ol]复制代码

    py洁癖版(需要自己动手修改部分)
    [ol]
  • import requests
  • import time
  • s = requests.Session()
  • s.post("https://www.hs2v.com/member.php", {'username':'XXXX', 'password': 'xxxxxx',})
  • urls = ["https://www.hs2v.com/space-uid-{}.html".format(str(i)) for i in range(10000, 24000)]
  • for i in urls:
  •     s.get(i)
  •     time.sleep(3)[/ol]复制代码

    php版
    [ol]
  • 'logging',
  •     'action' => 'login',
  •     'loginsubmit' => 'yes',
  •     'infloat' => 'yes',
  •     'lssubmit' => 'yes',
  •     'username' => '账号',
  •     'password' => '密码'
  • );
  • $url = "https://www.hs2v.com/member.php";
  • $cookie = dirname(__FILE__) . '/cookie_lochost.txt';
  • login_post($url, $cookie, $post);
  • for ($i = 0; $i
  • [/ol]复制代码

    当然 还有exe版 我就不放了

  • 回复

    使用道具 举报

    11

    主题

    52

    回帖

    245

    积分

    中级会员

    积分
    245
    means

    11

    主题

    52

    回帖

    245

    积分

    中级会员

    积分
    245
    2018-1-8 13:24:19 | 显示全部楼层
    http://hunter.gitlab.io/app/hostloc/
    回复

    使用道具 举报

    52

    主题

    375

    回帖

    1525

    积分

    金牌会员

    积分
    1525
    救世主 楼主

    52

    主题

    375

    回帖

    1525

    积分

    金牌会员

    积分
    1525
    2018-1-8 13:28:36 | 显示全部楼层

    tufu001 发表于 2018-1-8 13:24

    py版本1

    无限感谢

    请教下 “py洁癖版(需要自己动手修改部分)” 这个应该怎么改?

    比如用户名是 locuser,密码是 locpassword

    那么成品是这样的吗?

    "
    回复

    使用道具 举报

    0

    主题

    60

    回帖

    130

    积分

    注册会员

    积分
    130
    祖迪亚克

    0

    主题

    60

    回帖

    130

    积分

    注册会员

    积分
    130
    2018-1-8 13:24:00 | 显示全部楼层
    收藏一下代码
    回复

    使用道具 举报

    52

    主题

    375

    回帖

    1525

    积分

    金牌会员

    积分
    1525
    救世主 楼主

    52

    主题

    375

    回帖

    1525

    积分

    金牌会员

    积分
    1525
    2018-1-8 13:30:00 | 显示全部楼层

    mxy123h 发表于 2018-1-8 13:26

    就是这个

    对对对,原来是大佬的站!看到 "刷分完毕" 就知道是你的了

    大佬,这个代码怎么用?怎么和普通的网页代码不一样,普通的代码不应该是以下那样的吗?






    回复

    使用道具 举报

    7

    主题

    26

    回帖

    129

    积分

    注册会员

    积分
    129
    mxy123h

    7

    主题

    26

    回帖

    129

    积分

    注册会员

    积分
    129
    2018-1-8 13:28:46 | 显示全部楼层

    救世主 发表于 2018-1-8 13:34

    对对对,原来是大佬的站!看到 "刷分完毕" 就知道是你的了

    大佬,这个代码怎么用?怎么和普通的网页代码 ...

    都一样 会自动补全的
    回复

    使用道具 举报

    52

    主题

    375

    回帖

    1525

    积分

    金牌会员

    积分
    1525
    救世主 楼主

    52

    主题

    375

    回帖

    1525

    积分

    金牌会员

    积分
    1525
    2018-1-8 13:34:16 | 显示全部楼层




    也就是说我只要新建个文本,把这段代码复制进去,然后另存为 index.html,就 OK啦?





    回复

    使用道具 举报

    7

    主题

    26

    回帖

    129

    积分

    注册会员

    积分
    129
    mxy123h

    7

    主题

    26

    回帖

    129

    积分

    注册会员

    积分
    129
    2018-1-8 13:26:00 | 显示全部楼层

    救世主 发表于 2018-1-8 13:34

    对对对,原来是大佬的站!看到 "刷分完毕" 就知道是你的了

    大佬,这个代码怎么用?怎么和普通的网页代码 ...

    都一样 会自动补全的
    回复

    使用道具 举报

    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    Archiver|小黑屋|HS2V主机综合交流论坛

    GMT+8, 2025-4-22 09:49 , Processed in 0.024152 second(s), 3 queries , Gzip On, Redis On.

    Powered by Discuz! X3.5

    © 2001-2024 Discuz! Team.

    快速回复 返回顶部 返回列表