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 inet_aton(a) { | |
return a.split(".").reduce(function(a, b) { | |
return (a << 8) + parseInt(b, 10); | |
}, 0) >>> 0; | |
} | |
function inet_ntoa(a) { | |
return (a >>> 24) + "." + (a >> 16 & 255) + "." + (a >> 8 & 255) + "." + (a & 255); | |
} |
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
icmp fast ping (50) | |
psping -i 0 -n 50 www.google.com | |
tcp ping | |
psping -i 0 -n 10 www.google.com:443 | |
tcp server for latency and bandwidth tests | |
psping -s 10.0.0.1:5000 | |
tcp latency test (8KB) | |
psping -l 8k -n 1000 10.0.0.1:5000 | |
tcp bandwidth test | |
psping -b -l 8k -n 30s 10.0.0.1:5000 |
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
var suffix_black_list=[ | |
"xml", | |
"atom", | |
"rss", | |
"mml", | |
"txt", | |
"jad", | |
"wml", | |
"htc", | |
"woff", |
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
const ip4ToInt = ip => | |
ip.split('.').reduce((int, oct) => (int << 8) + parseInt(oct, 10), 0) >>> 0; | |
const isIp4InCidr = ip => cidr => { | |
const [range, bits = 32] = cidr.split('/'); | |
const mask = ~(2 ** (32 - bits) - 1); | |
return (ip4ToInt(ip) & mask) === (ip4ToInt(range) & mask); | |
}; | |
const isIp4InCidrs = (ip, cidrs) => cidrs.some(isIp4InCidr(ip)); |
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
jq -r "[.value, .name, .timestamp] | @tsv" 2018-04-27-1524816001-fdns_a.json |
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
#!/usr/bin/env sh | |
curl -s https://www.iblocklist.com/lists.php | sed -n "s/.*value='\(http:.*\)'.*/\1/p" | xargs curl -L -s | gunzip | grep -P '\d+\.\d+\.\d+\.\d+' |
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
powershell Get-DnsClientCache ^| Export-Csv dnclientcache-1.txt &node c:\rgr\bsync2.js dnclientcache-1.txt |
NewerOlder