Skip to content

Instantly share code, notes, and snippets.

@7h3rAm
7h3rAm / internet_radio_stream_aliases.sh
Last active April 17, 2017 21:50 — forked from pwenzel/internet_radio_stream_aliases.sh
Internet Radio Streams Via Command Line
alias radio_news="mplayer -playlist http://minnesota.publicradio.org/tools/play/streams/news.pls" # MPR News
alias radio_current="mplayer -playlist http://minnesota.publicradio.org/tools/play/streams/the_current.pls" # The Current
alias radio_classical="mplayer -playlist http://minnesota.publicradio.org/tools/play/streams/classical.pls" # Classical MPR
alias radio_localcurrent="mplayer -playlist http://minnesota.publicradio.org/tools/play/streams/local.pls" # Local Current
alias radio_heartland="mplayer -playlist http://minnesota.publicradio.org/tools/play/streams/radio_heartland.pls" # MPR Radio Heartland
alias radio_defcon="mplayer http://sfstream1.somafm.com:6200/"
alias radio_radiopecs="mplayer http://80.237.154.83:8120"
alias radio_wonderground="mplayer http://wondergroundstream2.publicradio.org/wonderground" # MPR Wonderground Windows Media
alias radio_choral="mplayer -playlist http://choralstream1.publicradio.org/choral.m3u" # Clasical MPR Choral
alias radio_wefunk="mplayer -playlist http://www.wefunkr
@7h3rAm
7h3rAm / secs_to_human
Last active May 10, 2017 15:14
Seconds to human readable text. Inspired from https://gist.github.com/erickpatrick/3039081
#!/usr/bin/env python
def sec_to_human(secs):
units = dict({
7*24*3600: "week",
24*3600: "day",
3600: "hour",
60: "minute",
1: "second"
})

Keybase proof

I hereby claim:

  • I am 7h3rAm on github.
  • I am 7h3ram (https://keybase.io/7h3ram) on keybase.
  • I have a public key whose fingerprint is A3EA 7604 D7B5 F3E7 2E3D 62DB C33E 669B 327D 884A

To claim this, I am signing this object:

{
"name": "CIS MITRE ATT&CK Controls v1",
"version": "2.1",
"domain": "mitre-enterprise",
"description": "",
"filters": {
"stages": [
"act"
],
"platforms": [
@7h3rAm
7h3rAm / sap.cnf
Last active October 3, 2020 04:21
Shellcode Analysis Pipeline (SAP)
[defaults]
search = dos
pgtpath = /home/ankur/toolbox/PCAP-Generation-Tools/pgt.py
shellstormpath = /home/ankur/scripts/shell-storm-api.py
exploitdbpath =
metasploitpath =
emuprofilesize = 10240
@7h3rAm
7h3rAm / hexdump.py
Last active April 26, 2021 20:49
hexdump implementation in Python
#!/usr/bin/env python3
def hexdump(src, length=16, sep='.'):
"""
>>> print(hexdump('\x01\x02\x03\x04AAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBBBBBBBBBBBBBB'))
00000000: 01 02 03 04 41 41 41 41 41 41 41 41 41 41 41 41 |....AAAAAAAAAAAA|
00000010: 41 41 41 41 41 41 41 41 41 41 41 41 41 41 42 42 |AAAAAAAAAAAAAABB|
00000020: 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 |BBBBBBBBBBBBBBBB|
00000030: 42 42 42 42 42 42 42 42 |BBBBBBBB|
>>>
@7h3rAm
7h3rAm / istor.py
Created May 9, 2018 22:07
Check if connected via Tor
#!/usr/bin/env python3
import requests
proxies = {
"http": "socks5h://localhost:9050",
"https":"socks5h://localhost:9050"
}
def get_public_ip(usetor=False):
@7h3rAm
7h3rAm / gifcreator.py
Created May 2, 2018 01:03 — forked from achillean/gifcreator.py
Create GIFs from a Shodan json.gz file using the API
#!/usr/bin/env python
# Dependencies:
# - arrow
# - shodan
# - ImageMagick
#
# Installation:
# sudo easy_install arrow shodan
# sudo apt-get install imagemagick
#
#!/usr/bin/env bash
SAMPLESDIR="$1"
TMPFILE="/tmp/sha256sum"
EXT="sample"
MOVE=false
sha256sum "$SAMPLESDIR"/* >"$TMPFILE"
while read line; do
SHA256=$(echo $line | tr -s " " | cut -d" " -f1)
@7h3rAm
7h3rAm / commands
Created November 7, 2016 07:16
Nifty commands that come handy time and again.
# remove password from a pdf file (if password is already known):
qpdf --decrypt --password=<password> infile outfile.pdf
# extract pages from a pdf file:
pdftk infile cat 3-6 output outfile.pdf
# merge pdfs:
pdftk *.pdf cat output outfile.pdf
# convert jpg to pdf: