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 python | |
| # scan-layer2 : arpings a subnet to find every device connected to the subnet | |
| import sys | |
| if len(sys.argv) != 2: | |
| print ("Usage: scan-layer2 \n eg: scan-layer2.py 192.168.1.0/24") | |
| sys.exit(1) | |
| from scapy.all import srp,Ether,ARP,conf | |
| ans,unans=srp(Ether(dst="ff:ff:ff:ff:ff:ff")/ARP(pdst=sys.argv[1]),timeout=10) |
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
| wget -r -nd -A c --accept-regex="/.*\.ext" 'url' |
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
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #define BUFSIZE 1024 | |
| char *word; | |
| void errExit(const char *errmsg) | |
| { | |
| fprintf(stderr, "%s\n", errmsg); |