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
#!/bin/sh | |
if which nmap > /dev/null ; then | |
echo "Running nmap as root\n" | |
IP_RANGE=$(ip addr | grep "inet " | awk '{ print $2}' | grep -v 127.0.0) | |
sudo nmap -sP $IP_RANGE | grep -B2 -i 'b8:27:eb\|80:1f:02' | |
else | |
if which arp-scan > /dev/null ; then | |
echo "Running arp-scan as root\n" | |
sudo arp-scan --interface=eth0 --localnet | grep 'b8:27:eb\|80:1f:02' | |
else |
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
function slugify(text) | |
{ | |
return text.toString().toLowerCase() | |
.replace(/\s+/g, '-') // Replace spaces with - | |
.replace(/[^\w\-]+/g, '') // Remove all non-word chars | |
.replace(/\-\-+/g, '-') // Replace multiple - with single - | |
.replace(/^-+/, '') // Trim - from start of text | |
.replace(/-+$/, ''); // Trim - from end of text | |
} |
NewerOlder