自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(11)
  • 收藏
  • 关注

原创 python编写主机发现工具(ICMP)

"""scapy发送icmp包,进行主机发现 ping"""from scapy.all import *from optparse import OptionParserfrom concurrent.futures import ThreadPoolExecutordef scan_host(ip): pkt = IP()/ICMP(seq=2000)/b'hello world' pkt['IP'].dst = ip results = sr1(pkt,timeo

2021-02-28 16:36:15 881 2

原创 python编写端口扫描工具

"""端口扫描"""import socketfrom optparse import OptionParserfrom concurrent.futures import ThreadPoolExecutor# ip = "192.168.10.238"# port = 445def scan_one(ip,port): socket.setdefaulttimeout(1) try: sock = socket.socket(socket.AF_INET,

2021-02-28 16:32:15 270 1

原创 python编写数据库爆破工具

"""数据库爆破"""import pymysqlff = open("dic/user.txt",'r')user = ff.readline().strip()while user: with open("dic/password.txt",'r') as f: password = f.readline().strip() while password: try: conn = pymysql

2021-02-28 16:27:27 692 3

原创 python子域名爆破工具

""""二、子域名爆破通过暴力破解来获得子域名,类似子域名挖掘机的功能"""import requestsfrom concurrent.futures import ThreadPoolExecutordef pj(domain): with open('dic/text.txt','r') as f: key = f.readline().strip() while key: url = "http://"+key+"."+

2021-02-28 16:07:57 720

原创 python编写子域名挖掘工具

import requestsimport reimport threadingfrom urllib.parse import urlencode#查询子域名def scan_domain(domain,page):#域名,页数 sub_domains = [] url = "搜索语法" header={ "User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (

2021-02-28 16:05:52 715 1

原创 python爬取图片

一、爬取一张图片二、爬取一页图片三、爬取整个网站图片(封装写法)

2021-02-28 15:45:44 363 1

原创 python爬虫入门

import requestsimport re#数据爬取url = "爬取页面"header = { "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.182 Safari/537.36"}response = requests.get(url,headers = header)print(response.s

2021-02-28 15:31:42 210 2

原创 python模拟NC

服务器#服务端,放在本地import socketsock = socket.socket(socket.AF_INET,socket.SOCK_STREAM)sock.bind(("127.0.0.1",8888))sock.listen(3)conn,addr = sock.accept()#等待对方连我while True: cmd = input("输入$:") conn.send(cmd.encode()) msg = conn.recv(1024)

2021-02-24 22:43:10 376

原创 python之popen函数入门案例

#执行命令import osmsg = os.popen("ipconfig")msg2 = os.popen("ping 127.0.0.1")for i in msg: print(i.strip())#去除空格for m in msg2: print(m.strip())

2021-02-24 22:40:15 193

原创 python网络编程入门

服务端#tcp服务端import socketimport threading#创建连接def data_recv(conn): while True: msg = conn.recv(1024)#接收客户端的信息 print("输出:" + msg.decode())def msg_send(conn): while True: data = input("输入:") conn.send(data.encode()

2021-02-24 22:36:55 126

原创 python线程共享

#线程共享import threadingnum = list(range(1000))def set(num,lock): lock.acquire() for i in num[-1:0:-1]: num[i] = 0 lock.release()def test(num,lock): lock.acquire() for i in num: print(i) lock.release()if __name_

2021-02-24 21:56:02 128

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除