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
import sqlite3 | |
import os | |
import shutil | |
def merge_databases(db1, db2): | |
if not os.path.exists(db1): | |
print(db1 + " does not exist, copying " + db2 + "...") | |
try: | |
shutil.copyfile(db2, db1) |
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
package main | |
import ( | |
"io" | |
"os" | |
"strings" | |
) | |
// pathdedupe | |
// - kayos |
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 bash | |
function newFile() { | |
_resfile="dns_results.$(date +%s).csv" | |
echo "hostname,ips" >>"$_resfile" | |
echo "$_resfile" | |
} | |
resfile="$(newFile)" | |
export resfile |
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
package main | |
import ( | |
"database/sql" | |
"flag" | |
"os" | |
"regexp" | |
"runtime" | |
"strings" |
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
package main | |
import ( | |
"bufio" | |
"bytes" | |
"encoding/base64" | |
"encoding/hex" | |
"io" | |
"os" | |
"path/filepath" |
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 bash | |
function _getExt() { | |
echo "$@" | awk -F '.' '{print $NF}' | |
} | |
function _getArchiveName() { | |
_ext="$(_getExt "$@")" | |
_name="${*/.$_ext//}" | |
_name="${_name//\//}" |
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 bash | |
# snag: colorize, bat, apt-file, apt-fast, toilet | |
alias aget='sudo apt-get install' | |
alias qaget='sudo apt-fast -y install' | |
alias aremove='sudo apt-get remove' | |
alias apurge='sudo apt-get purge' | |
alias ashow="_ashow" |
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 bash | |
# example output: | |
# cleaning duplicate netfilter rules... | |
# updating netfilter rules... | |
# updating iptables... | |
# latest: SHA256 (-) = e32144dcf88d333d2ecfbce61fc2392045c462b3370093b70bd5429c3ae9e922 | |
# current: SHA256 (-) = e32144dcf88d333d2ecfbce61fc2392045c462b3370093b70bd5429c3ae9e922 | |
# backing up old rules... |
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
package main | |
// βββ β β β βββ βββ βββ | |
// ββ β β β β β βββ βββ | |
// β βββββ βββ βββ βββ | |
// f w d --> 5 5 | |
// | |
// simple rfc1928 proxy server | |
// | |
// |
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
package main | |
import ( | |
"errors" | |
"fmt" | |
"git.tcp.direct/kayos/common/entropy" | |
"git.tcp.direct/kayos/common/squish" | |
"github.com/manifoldco/promptui" | |
"os" | |
"strconv" |