Skip to content

Instantly share code, notes, and snippets.

@UndergroundLabs
Created April 21, 2015 17:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save UndergroundLabs/d9e18b56460be358a300 to your computer and use it in GitHub Desktop.
Save UndergroundLabs/d9e18b56460be358a300 to your computer and use it in GitHub Desktop.
#!/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