Skip to content

Instantly share code, notes, and snippets.

View Cgboal's full-sized avatar
:shipit:
Hacking

Cgboal Cgboal

:shipit:
Hacking
View GitHub Profile
@Cgboal
Cgboal / main.go
Created March 24, 2021 12:13
Sub-Extractor for Sonar
package main
import (
"bufio"
"fmt"
"github.com/schollz/progressbar"
"github.com/valyala/fastjson"
"github.com/Cgboal/DomainParser"
"log"
"os"
@Cgboal
Cgboal / sub-extraction.go
Created February 20, 2021 17:09
Extract Subdoamins from Project Sonar dataset
package main
import (
"bufio"
"fmt"
"github.com/schollz/progressbar"
"github.com/valyala/fastjson"
"github.com/Cgboal/DomainParser"
"log"
"os"
@Cgboal
Cgboal / reverse-whois.clj
Created December 8, 2020 11:46
Pull reverse whois info from reverse-whois.whoisxmlapi.com
#!/usr/bin/bb
(require '[babashka.curl :as curl])
(require '[cheshire.core :as json])
(require '[clojure.string :as s])
(def my-api-key "PUT_YOUR_API_KEY_HERE")
(defn make-request-body [api-key query]
{:apiKey api-key
:searchType "current"
@Cgboal
Cgboal / common-ports.clj
Created November 15, 2020 17:56
Common Ports
#!/usr/bin/bb
(defn comment-line? [line]
(re-find #"^\#" line))
(defn tcp-line? [line]
(re-find #"\/tcp" line))
(defn extract-port [substr]
(-> (str substr)
@Cgboal
Cgboal / ntlm-reuse.clj
Last active November 12, 2020 14:16
Create markdown table for NTLM reuse from cme --sam sweep
#!/usr/bin/bb -i
(defn remove-colors
[string]
(clojure.string/replace string #"\x1b\[[0-9;]*m" ""))
(defn ntlm? [string]
(re-find #"aad3b435b51404eeaad3b435b51404ee" string))
(defn blank-ntlm? [string]
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQClNNcSNQr2lJhtW5TtI2cY7BUbV2MWj73z25Uf/qPGe9pmKClqz1NyUv4E6u/pa6CzX4aiuCojpcxVk9Tt9HAj5uf3MLYGmsTzFDjrc3N8ursWX/nUu6nAloXXXG4NyQJT5UrvxX0AKyCy5joAyHIemYUA+vXaZ1stvHiGt4yWO1l7itDs7ruDK87XH1kpU4as2gPXVJAvecfmTdrbPNswBXbdF7sqf4bwundmd5DL2iEvDju8uN2LNDxnMjWmhaUpDZ5CWrc9CZQYpEbZ6Y737hDSpLUiI5w+r8Zll2gIiS9/gf/pgCEMfUSmHGjxv0e+O/0GWXwO96kHNxDQjq60/m+l93gec/w7n36eZoDSyn1d64n7loRF//aP7T1daV/s09pzxMpJAIEfhLvzwVVNVwfCJ19uuy3DkXdzxvTQEAYsn+92uNA1lHVmQLqJVfjwoSid9trbjxMOlkAvPrRshlrj2TeFl1nVxmW0Sy3qfwXkW77NQX6Q4GNxLdbwjTnmDV2KyqLX0D61NzFVvj2kVutvXoXi0qeeFWg6yTp8UgylkNLRcdKS5vTZCBLQhVhV2vHOVZNKwo1TZQMYxzDd9g2ScvhhgdN61rYb3jfE8WZGn6OKah2icbryMpAD1M0b1THYgXDBZxIvKtYihnQ0ILTwWBTtGHko8sTLGdMm0Q==
@Cgboal
Cgboal / vlans.sh
Last active August 23, 2020 16:03
#!/usr/bin/env bash
# Set magic variables for current file & dir
__dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
__file="${__dir}/$(basename "${BASH_SOURCE[0]}")"
__base="$(basename ${__file} .sh)"
__root="$(cd "$(dirname "${__dir}")" && pwd)" # <-- change this as it depends on your app
__TIMESTAMP=`date +%Y-%m-%d_%H-%M-%S`

Keybase proof

I hereby claim:

  • I am cgboal on github.
  • I am cgboal (https://keybase.io/cgboal) on keybase.
  • I have a public key whose fingerprint is 597F 4CE0 3618 F338 48F2 6D9E 6A13 6296 99BF 0A9F

To claim this, I am signing this object: