Thu, 29 Dec 2011
Python3 and metasploit msgpack .:.permalink.:.
Last post was the basics of metasploit, python2 and msgpack. Getting this to work in python3 take a tweak or two
The biggest issue is python3's handling of strings as bytes (or the other way around if you like). So what was:
resdata=msgpack.unpackb(response.read()) if resdata['busy']==True and len(resdata['data'])==0:Is now:
resdata=msgpack.unpackb(response.read()) if resdata[b'busy']==True and len(resdata[b'data'])==0:
For reference, here's a python 3 version of the msfconsole.py script from last time that opens a console, searches for rpc and exits: msfconsole.py
While I'm at it, here's some other reference scripts as well:
- msfhosts.py <-list the hosts currently in the msf db
- msfjobs.py <-list the current jobs
- msfscan.py <-create a scan job
Posted at: Thu, 29 Dec 2011 | category: /itsec