This file contains hidden or 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
| #!/usr/bin/env python3 | |
| # | |
| # inputs: nmap.xml (nmap scan xml output), subdomains.csv (optional virtualhost info, hostname + ip address csv file) | |
| # output: url listing (useful for tools like EyeWitness) | |
| # | |
| # sample usage: ./nmap-http-url.py nmap.xml subdomains.csv | sort -u | gowitness file -f - | |
| # | |
| description = ''' | |
| Generate HTTP URLs from Nmap XML (and optionally additional VirtualHost listing, taken from e.g. subdomain enumeration). |
This file contains hidden or 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
| from scapy.all import * | |
| from natsort import natsorted | |
| packets = rdpcap('in.pcap') | |
| result = [] | |
| for packet in packets: | |
| if TCP in packet: | |
| tcpport = str(packet[TCP].dport) | |
| if tcpport not in result: | |
| result.append(tcpport) |
This file contains hidden or 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
| sudo tcpdump -i lo -w out.pcap host 127.0.0.1 and "tcp[tcpflags] & (tcp-syn) != 0" |
This file contains hidden or 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
| cat portscan.nmap | grep "^[0-9]*/tcp" | grep "open" | cut -d '/' -f 1 | sort -h | uniq | tr '\n' ',' | head -c -1 |
This file contains hidden or 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
| #!/bin/bash | |
| BITRATE="320k" | |
| for fil in *.flac | |
| do | |
| ffmpeg -i "$fil" -ab $BITRATE -map_metadata 0 -id3v2_version 3 "${fil%.flac}.mp3"; | |
| done |
This file contains hidden or 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
| #!/bin/bash | |
| cat /usr/share/dict/american-english | grep --ignore-case "^[ABCDEFGILOSZ]*$" | sed 's/[gG]/6/g;s/[iI]/1/g;s/[lL]/1/g;s/[oO]/0/g;s/[sS]/5/g;s/[zZ]/2/g' | tr [:lower:] [:upper:] |
This file contains hidden or 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
| cat /usr/share/nmap/nmap-services | grep "/udp" | sort -k3 -n -r | head -n 1000 | grep -o "[0-9]*/udp" | sed 's/\/udp//g' |
This file contains hidden or 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
| for letter in {h,o,r,s,t}; do grep -i "^$letter.*[^e|en|em|er|et|est|ging]$" /usr/share/dict/ngerman | perl -e '@lines = <>; print $lines [ rand @lines ]'; done | |
| Example output (german): | |
| hinauszögernd | |
| ostafrikanisch | |
| rundend | |
| Scheidewand | |
| Textmaterial |