Skip to content

Instantly share code, notes, and snippets.

@LordKiba
LordKiba / gist:8ce410301cba98f4ff2f6c81b2e5b812
Created August 13, 2021 20:24
Parse Grepable nmap (.gnmap) files for open ports
#TCP_All Parser
cat tcp.gnmap | grep Ports: | awk '{for (i=4;i<=NF;i++) {split($i,a,"/");if (a[2]=="open") printf "T:%s\n",a[1];} print ""}' | sed -e 's/,//' | tee NMAP-Ports.txt
#UDP_All Parser
cat udp.gnmap | grep Ports: | awk '{for (i=4;i<=NF;i++) {split($i,a,"/");if (a[2]=="open") printf "U:%s\n",a[1];} print ""}' | sed -e 's/,//' | tee -a NMAP-Ports.txt
#Sort List for unique values
sort -u ./NMAP-Ports.txt | tee NMAP-Ports_uniq.txt
#convert Multiline to Comma Seperated list for input into nmap portlist
### Keybase proof
I hereby claim:
* I am lordkiba on github.
* I am kiba (https://keybase.io/kiba) on keybase.
* I have a public key ASCSmNeqZwE-XNUX6A5w7PMJub7DTrRuiWZ3Xii_ZeP_nAo
To claim this, I am signing this object:
@LordKiba
LordKiba / hb_all_books_dl.js
Last active June 9, 2018 21:37 — forked from kfatehi/hb_all_books_dl.js
Humble bundle book bundles - download all objects at once
/*
After purchasing a Bundle from humble bundle, navigate to the orders purchase page for that bundle.
Open a console window for the page (Ctrl+Shift+J on Win or Linux and ⌥ + ⌘ + J on Mac) and paste
the below script into the window and press enter to start downloading.
This fork downloads all formats and supplements.
note that if you are in chrome, chrome will not download the pdfs for you by default, to fix this
type “about:plugins” in the address bar and disable chrome's pdf viewer or modify your content settings from
Advances settings to have chrome download the PDFs directly rather than opening in a new tab.
*/
@LordKiba
LordKiba / adb-stty-cd-data-local-tmp2.diff
Created August 7, 2014 00:37 — forked from jduck/adb-stty-cd-data-local-tmp2.diff
Patch for AOSP's adb client to automatically change directory, set terminal size, and set environment vars.
#
# patch adb to:
# 1. use busybox to set the same terminal size
# 2. change directory to /data/local/tmp automatically
#
# NOTE: needs an executable busybox in /data/local/tmp
#
# Joshua J. Drake - jduck
#
@LordKiba
LordKiba / gist:0b031c07135e19dc2d56
Created July 14, 2014 14:56
Get hashes for string input in powershell
function get-hash
{
<#
.SYNOPSIS
Creates hashes of string input
.DESCRIPTION
Get-hash is used to generate a hash value based upon string input. outbpt methods include MD5, SHA1, SHA256,SH 384, SHA512, RACE Integrity Primitives Evaluation Message Digest 160, and Mac Triple DES.
.PARAMETER algorithm