This file contains 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
# ignore files with no extention: | |
* | |
!*/ | |
!*.* | |
# normal ignores: | |
*.exe | |
nimcache | |
*.pdb | |
*.ilk |
This file contains 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
func PrintMemUsage() { | |
var m runtime.MemStats | |
runtime.ReadMemStats(&m) | |
// For info on each, see: https://golang.org/pkg/runtime/#MemStats | |
fmt.Printf("Alloc = %v MiB", bToMb(m.Alloc)) | |
fmt.Printf("\tTotalAlloc = %v MiB", bToMb(m.TotalAlloc)) | |
fmt.Printf("\tSys = %v MiB", bToMb(m.Sys)) | |
fmt.Printf("\tNumGC = %v\n", m.NumGC) | |
} |
This file contains 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
if path == "~" { | |
// In case of "~", which won't be caught by the "else if" | |
path = dir | |
} else if strings.HasPrefix(path, "~/") { | |
// Use strings.HasPrefix so we don't match paths like | |
// "/something/~/something/" | |
path = filepath.Join(dir, path[2:]) | |
} |
This file contains 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
func orDone(done, c <-chan interface{}) <-chan interface{} { | |
valStream := make(chan interface{}) | |
go func() { | |
defer close(valStream) | |
for { | |
select { | |
case <-done: | |
return | |
case v, ok := <-c: | |
if ok == false { |
This file contains 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
function isHidden(el) { | |
if(el) return (el.offsetParent === null); | |
else return false; | |
} | |
TotalUnfollowed = 0; | |
var LoadingAnimation = document.getElementsByClassName("initial-load-animation")[0]; | |
var CatchLoadingAnimation = setInterval(function(){ | |
if(isHidden(LoadingAnimation) == true) { |
This file contains 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
// https://stackoverflow.com/a/56602780 | |
package main | |
import ( | |
"context" | |
"io/ioutil" | |
"log" | |
"os" | |
"time" |
This file contains 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" | |
"fmt" | |
"log" | |
"math/rand" | |
"sync" | |
"time" |
This file contains 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 | |
# Converter.sh by @xdavidhu | |
# This is a script inspired by the Bug Hunter's Methodology 3 by @Jhaddix | |
# With this script, you can convert domain lists to resolved IP lists without duplicates. | |
# Usage: ./converter.sh [domain-list-file] [output-file] | |
echo -e "[+] Converter.sh by @xdavidhu\n" | |
if [ -z "$1" ] || [ -z "$2" ]; then | |
echo "[!] Usage: ./converter.sh [domain-list-file] [output-file]" | |
exit 1 |
This file contains 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/sh | |
# call with domaintoips.sh <domain> <list of subdomains.txt> | |
ulimit -n 800000 | |
while read -r domain; do dig +short $domain | grep -v '[[:alpha:]]' | sort -u >> $1-ipf.txt; done < $2 | |
cat $1-ipf.txt | anew $1-ipz.txt |
This file contains 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 | |
# Call with domain name <e.g. tesla.com> as arg $1 | |
scanned () { | |
cat $1 | sort -u | wc -l | |
} | |
## segregating cloudflare IP from non-cloudflare IP | |
iprange="173.245.48.0/20 103.21.244.0/22 103.22.200.0/22 103.31.4.0/22 141.101.64.0/18 108.162.192.0/18 190.93.240.0/20 188.114.96.0/20 197.234.240.0/22 198.41.128.0/17 162.158.0.0/15 104.16.0.0/12 172.64.0.0/13 131.0.72.0/22" | |
for ip in `cat $1-ipz.txt`; do |
NewerOlder