mirror of
https://github.com/byt3bl33d3r/MITMf.git
synced 2025-03-12 04:35:49 -07:00
Added a plugin system to Net-Creds so you can now add your own parsers, api hook names might change between now and the offcial release (will submit a PR to the original repo once completed) The main MITM HTTP Proxy now uses mitmproxy which is a big deal, cuts the code down by an insane amount, no more twisted! yay! Basic plugin have been re-wrote for the new proxy engine Since we are using mitmproxy we have out of the box support for SSL/TLS!
21 lines
711 B
Python
21 lines
711 B
Python
from parsers.parser import Parser
|
|
import re
|
|
|
|
class IRC(Parser):
|
|
name = 'IRC'
|
|
|
|
irc_user_re = re.compile(r'NICK (.+?)((\r)?\n|\s)')
|
|
irc_pw_re = re.compile(r'NS IDENTIFY (.+)')
|
|
irc_pw_re2 = re.compile('nickserv :identify (.+)')
|
|
|
|
def TCP_Parser(self, payload, src_ip_port, dst_ip_port):
|
|
user_search = self.irc_user_re.match(payload)
|
|
pass_search = self.irc_pw_re.match(payload)
|
|
pass_search2 = self.irc_pw_re2.search(payload.lower())
|
|
|
|
if user_search:
|
|
self.logger('IRC nick: {}'.format(user_search.group(1)))
|
|
if pass_search:
|
|
self.logger('IRC pass: {}'.format(pass_search.group(1)))
|
|
if pass_search2:
|
|
self.logger('IRC pass: {}'.format(pass_search2.group(1))) |