Created
April 21, 2015 17:25
-
-
Save UndergroundLabs/d9e18b56460be358a300 to your computer and use it in GitHub Desktop.
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 | |
import requests | |
# Quick and dirty script to quickly scan an IP for SQ Webcam | |
def main(): | |
# Load IP addresses from file | |
with open('ips.txt') as f: | |
ips = f.readlines() | |
for ip in ips: | |
r = requests.get('http://{0}'.format(ip), headers={ | |
"User-Agent": "Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Firefox/31.0 Iceweasel/31.6.0" | |
}) | |
if 'server' in r.headers: | |
if r.headers['server'] == 'SQ-WEBCAM': | |
print 'IP: {0} ... Camera Detected'.format(ip) | |
if __name__ == '__main__': | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment