Lv.1
已注销的小号
在 python区好冷淡啊。。 中回复
写了个gui
import tkinter
class GUI:
def __init__(self,width=300,height=300,title="Window"):
self.t = tkinter.Tk()
self.t.geometry(f"{width}x{height}")
self.t.title(title)
def run(self):
self.t.mainloop()
def text(self,text="",x=None,y=None,color="black"):
if x and y:
tkinter.Label(master=self.t,text=text,fg=color).place(x=x,y=y)
if not (x or y):
tkinter.Label(master=self.t,text=text,fg=color).pack()
def button(self,command,width=20,height=20,text="",x=None,y=None):
if x and y:
tkinter.Button(master=self.t,text=text,command=command,width=width,height=height).place(x=x,y=y)
if not (x or y):
tkinter.Button(master=self.t, text=text, command=command).pack()
def msgbox(text,title="",button_text="OK"):
a = tkinter.Tk()
a.title(title)
a.geometry("300x100")
tkinter.Label(a,text=text).pack()
tkinter.Button(a,text=button_text,command=a.destroy).pack()
a.mainloop()
2020-05-08T15:25:10 点赞:0
在 【异步爬虫】帖子刷浏览 中回复
import aiohttp,asyncio
from threading import Thread
times=1
headers={"User-Agent":"Mozilla/5.0 (Windows NT 10.0; ) AppleWebKit/537.36 (KH喵L, like Gecko) Chrome/81.0.4044.92 Safari/537.36"}
async def visit(pid):
global times
for x in range(3):
async with aiohttp.ClientSession() as session:
async with session.get("https://api.codemao.cn/web/forums/posts/"+pid+"/details") as resp:
print(times,":visit ",pid,"\tstatus ",resp.status,sep="")
times+=1
def start(pid):
new_loop = asyncio.new_event_loop()
asyncio.set_event_loop(new_loop)
loop=asyncio.get_event_loop()
loop.run_until_complete(asyncio.gather(*[visit(pid) for i in range(100)]))
def _main_(pid):
for x in range(5):
threads=[Thread(target=start,args=(pid,)) for x in range(6)]
for t in threads:
t.setDaemon(True)
t.start()
for t in threads:
t.join()
def _mmain_(pid):
for x in range(5):
threads=[Thread(target=_main_,args=(pid,)) for x in range(6)]
for t in threads:
t.setDaemon(True)
t.start()
for t in threads:
t.join()
_mmain_("291833")
2020-05-08T15:33:34 点赞:0
在 python区好冷淡啊。。 中回复
dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd
2020-05-08T16:08:43 点赞:0
在 【爬虫必备】编程猫社区的API 中回复
可以入侵bcm论坛
只要Payload
{"title":"bcm被入侵","content":"""
setInterval(function(){
alert('不信?看!')
})
"""}
再用while True
![]()
2020-05-08T16:19:29 点赞:0