Skip to content
This repository has been archived by the owner on Apr 19, 2020. It is now read-only.

Commit

Permalink
WiFi-Pumpkin v0.8.1 Release
Browse files Browse the repository at this point in the history
  • Loading branch information
mh4x0f committed Aug 18, 2016
1 parent e76f989 commit 600acab
Show file tree
Hide file tree
Showing 232 changed files with 30,981 additions and 213 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
Version 0.8.1
-------------
- re-design all GUI Menu->view
- added new report logger GUI
- added new sessions for Rogue AP loggers
- added new plugin BDFProxy-ng

Version 0.7.8
-------------
- moved progressBar to statusBar
Expand Down
172 changes: 121 additions & 51 deletions Core/Main.py

Large diffs are not rendered by default.

68 changes: 50 additions & 18 deletions Core/Utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from struct import pack
from time import sleep,asctime,strftime
from random import randint
from base64 import b64encode
from os import popen,path,walk,system,getpid,stat
from subprocess import call,check_output,Popen,PIPE,STDOUT
from re import search,compile,VERBOSE,IGNORECASE
Expand Down Expand Up @@ -78,14 +79,14 @@ def stop(self):

loggers = {}
'''http://stackoverflow.com/questions/17035077/python-logging-to-multiple-log-files-from-different-classes'''
def setup_logger(logger_name, log_file, level=logging.INFO):
def setup_logger(logger_name, log_file,key, level=logging.INFO):
global loggers
if loggers.get(logger_name):
return loggers.get(logger_name)
else:
logger = logging.getLogger(logger_name)
logger.propagate = False
formatter = logging.Formatter('%(asctime)s : %(message)s')
formatter = logging.Formatter('SessionID[{}] %(asctime)s : %(message)s'.format(key))
fileHandler = logging.FileHandler(log_file, mode='a')
fileHandler.setFormatter(formatter)
logger.setLevel(logging.INFO)
Expand Down Expand Up @@ -119,38 +120,62 @@ def htmlContent(title):
]
}
return html

@staticmethod
def get_content_by_session(filelines,sessionID=str):
filterSession = []
sessiongrap = 'SessionID[{}]'.format(sessionID)
for line in filelines:
if sessiongrap in line:
filterSession.append(line)
return ''.join(filterSession)

@staticmethod
def exportHtml(remove_dns2proxy=False,remove_inject=False):
def exportHtml(unchecked={},sessionID='',dataLogger=[],APname=''):
readFile = {
'dhcp': {'Logs/AccessPoint/dhcp.log':[]},
'urls': {'Logs/AccessPoint/urls.log':[]},
'hostapd': {'Logs/AccessPoint/hostapd.log':[]},
'bdfproxy': {'Logs/AccessPoint/bdfproxy.log':[]},
'credentials': {'Logs/AccessPoint/credentials.log':[]},
'requestAP': {'Logs/AccessPoint/requestAP.log':[]},
'dns2proxy': {'Logs/AccessPoint/dns2proxy.log':[]},
'injectionPage': {'Logs/AccessPoint/injectionPage.log':[]},
'dnsspoofAP': {'Logs/AccessPoint/DnsSpoofModuleReq.log':[]},
'phishing': {'Logs/Phishing/Webclone.log':[]},}
if remove_dns2proxy: readFile.pop('dns2proxy')
elif remove_inject: readFile.pop('injectionPage')
for i in readFile.keys():
for j in readFile[i]:
with open(j,'r') as file:
readFile[i][j] = file.read()
'phishing': {'Logs/Phishing/requests.log':[]},}
if unchecked != {}:
for key in unchecked.keys(): readFile.pop(key)
for key in readFile.keys():
for filename in readFile[key]:
with open(filename,'r') as file:
if len(sessionID) != 0:
content = Refactor.get_content_by_session(file.readlines(),sessionID)
readFile[key][filename] = content
else:
readFile[key][filename] = file.read()

contenthtml,HTML = Refactor.htmlContent('Report Logger'),''
contenthtml,HTML,emptyFile,activated_Files = Refactor.htmlContent('WiFi-Pumpkin Report Logger'),'',[],[]
for i in contenthtml['htmlheader']: HTML += i+"\n"
HTML += '</span><span class="s5">Report Generated at::</span><span class="s0">'+asctime()+'</span>\n'
if dataLogger != []:
HTML += '</span><span class="s2">Session information::</span><span class="s1">\n\n'
HTML += '</span><span class="s5">[*] ESSID AP: {}</span><span class="s0"></span>\n'.format(APname)
HTML += '</span><span class="s5">[*] AP Create at: </span><span class="s0">'+dataLogger[0]+'</span>\n'
HTML += '</span><span class="s5">[*] AP Down at: </span><span class="s0">'+dataLogger[1]+'</span>\n\n'
HTML += '</span><span class="s5">Report Generated at::</span><span class="s0">'+asctime()+'</span>\n\n'
HTML += '</span><span class="s4"><br></span><span class="s1">\n'
for key in readFile.keys():
if Refactor.getSize(readFile[key].keys()[0]) > 0:
if len(readFile[key][readFile[key].keys()[0]]) > 0:
HTML += '</span><span class="s2">-[ {} Logger ]-</span><span class="s1">\n'.format(key)
HTML += readFile[key][readFile[key].keys()[0]]
HTML += '</span><span class="s4"><br><br></span><span class="s1">\n'
activated_Files.append(key)
elif Refactor.getSize(readFile[key].keys()[0]) == 0:
emptyFile.append(key)
HTML += '</span></pre>\n<TABLE CELLSPACING=0 CELLPADDING=5 COLS=1 WIDTH="100%" BGCOLOR="#C0C0C0" >\
<TR><TD><CENTER>''<FONT FACE="Arial, Helvetica" COLOR="#000000">WiFi-Pumpkin (C) 2015 P0cL4bs Team' \
<TR><TD><CENTER>''<FONT FACE="Arial, Helvetica" COLOR="#000000">WiFi-Pumpkin (C) 2015-2016 P0cL4bs Team' \
'</FONT></center></TD></TR></TABLE></body>\n</html>\n'

Load_ = {'HTML': HTML,'Files':[readFile[x].keys()[0] for x in readFile.keys()]}
Load_ = {'HTML': HTML,'Files':[readFile[x].keys()[0] for x in readFile.keys()],
'activated_Files':activated_Files,'empty_files': emptyFile}
return Load_

@staticmethod
Expand Down Expand Up @@ -266,6 +291,13 @@ def getSize(filename):
st = stat(filename)
return st.st_size

class waiter(threading.Thread):
@staticmethod
def generateSessionID():
return str(b64encode(str(random.randint(0,100000))))

class waiterSleepThread(QThread):
quit = pyqtSignal(object)
def __int__(self,parent=None):
super(waiter, self).__init__(self,parent)
def run(self):
sleep(10)
sleep(10),self.quit.emit(True)
6 changes: 5 additions & 1 deletion Core/config/app/config.ini
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ dhcp_server=iscdhcpserver
channel=11
APname=PumpAP
interfaceAP=wlxc83a35cef744
sessions={}

[dhcp]
classtype=A
Expand Down Expand Up @@ -64,15 +65,18 @@ range=10.0.0.20/10.0.0.50

[dockarea]
advanced=false
dock_phishing=false
dock_credencials=true
dock_urlmonitor=true
dock_bdfproxy=false
dock_dns2proxy=false

[plugins]
noproxy=false
netcreds_plugin=true
dns2proxy_plugin=true
sergioproxy_plugin=false
bdfproxy_plugin=false
bdfproxy_patch_config=Plugins/BDFProxy-ng/bdfproxy.cfg

[iptables]
iptablespolicy1=iptables --policy INPUT ACCEPT
Expand Down
11 changes: 10 additions & 1 deletion Core/config/commits/Lcommits.cfg
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
master:
[
{ Version: '0.8.1'}
{ changelog : 're-design all GUI Menu->view' },
{ changelog : 'added new report logger GUI' },
{ changelog : 'added new sessions for Rogue AP loggers' },
{ changelog : 'added new plugin BDFProxy-ng' },
]

WiFiPumpkin078:
[
{ Version: '0.7.8'}
{ changelog : 'moved ProgressBar to StatusBar' },
Expand All @@ -18,7 +27,7 @@ master:
{ changelog : 'added support Parrot 3.0.1 to use AP with wireless connection #69' },
]

WiFiPumpkin:
WiFiPumpkinv075:
[
{ Version: '0.7.5'}
{ changelog : 'fixed size QTableWidget on modules' },
Expand Down
15 changes: 9 additions & 6 deletions Core/helpers/about.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,20 @@ def __init__(self,parent = None):

self.formMode = QFormLayout()
self.formMode.addRow(QLabel('<a href="https://github.com/xtr4nge"><strong>@xtr4nge</strong></a>'))
self.formMode.addRow(QLabel('Sslstrip2 based version fork<br><br>'))
self.formMode.addRow(QLabel('PLugin <a href="https://github.com/xtr4nge/sslstrip">Sslstrip</a> fork inject code<br>'))
self.formMode.addRow(QLabel('<a href="https://github.com/LeonardoNve"><strong>@LeonardoNve</strong></a>'))
self.formMode.addRow(QLabel('Plugin SSLstrip version fork,Plugin dns2proxy<br><br>'))
self.formMode.addRow(QLabel('Plugin <a href="https://github.com/LeonardoNve/sslstrip2">SSLstrip2</a> version fork'))
self.formMode.addRow(QLabel('Plugin <a href="https://github.com/LeonardoNve/dns2proxy">Dns2proxy</a> Offensive DNS server <br>'))
self.formMode.addRow(QLabel('<a href="https://github.com/davinerd"><strong>@davinerd</strong></a>'))
self.formMode.addRow(QLabel('Plugin <a href="https://github.com/davinerd/BDFProxy-ng"> BDFProxy-ng</a> version fork <br>'))
self.formMode.addRow(QLabel('<a href="https://github.com/supernothing"><strong>Ben Schmidt @supernothing</strong></a>'))
self.formMode.addRow(QLabel('Plugin Sergio Proxy - bypass HSTS<br><br>'))
self.formMode.addRow(QLabel('Plugin <a href="https://github.com/supernothing/sergio-proxy">SergioProxy</a> - bypass HSTS<br>'))
self.formMode.addRow(QLabel('<a href="https://github.com/DanMcInerney"><strong>Dan McInerney @danhmcinerney</strong></a>'))
self.formMode.addRow(QLabel('Plugin Netcreds - Sniffs sensitive data<br><br>'))
self.formMode.addRow(QLabel('Plugin <a href="https://github.com/DanMcInerney/net-creds">Netcreds</a> - Sniffs sensitive data<br>'))
self.formMode.addRow(QLabel('<a href="http://www.yasinuludag.com/darkorange.stylesheet"><strong>Yasin Uludag</strong></a>'))
self.formMode.addRow(QLabel('theme1.qss - Qt dark orange stylesheet<br><br>'))
self.formMode.addRow(QLabel('theme1.qss - Qt dark orange stylesheet<br>'))
self.formMode.addRow(QLabel('<a href="https://github.com/ColinDuquesnoy/QDarkStyleSheet"><strong>Colin Duquesnoy @ColinDuquesnoy</strong></a>'))
self.formMode.addRow(QLabel('theme2.qss - Qt dark blue stylesheet<br><br>'))
self.formMode.addRow(QLabel('theme2.qss - Qt dark blue stylesheet<br>'))
self.mainLayout.addRow(self.formMode)

self.layout = QHBoxLayout()
Expand Down
173 changes: 173 additions & 0 deletions Core/helpers/report.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,173 @@
from Core.loaders.Stealth.PackagesUI import *
from PyQt4.QtWebKit import QWebView

"""
Description:
This program is a module for wifi-pumpkin.py. Report FIles Logger PDF or HTML
Copyright:
Copyright (C) 2015-2016 Marcos Nesster P0cl4bs Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>
"""

class frm_ReportLogger(PumpkinModule):
''' called report logger in files '''
def __init__(self,sessions,parent = None):
super(frm_ReportLogger, self).__init__(parent)
self.setWindowTitle('WiFi-Pumpkin - Report Logger')
self.loadtheme(self.configure.XmlThemeSelected())
self.setGeometry(0,0,320,400)
self.Main = QVBoxLayout()
self.sessions = sessions
self.center()
self.GUI()

def addcheckListView_loggerFIles(self,unchecked,key,enable=None,checked=None,session=''):
# add in listview all logger files
empty = Refactor.exportHtml(unchecked,sessionID=session)[key]
for loggerfile in empty:
item = QStandardItem(loggerfile)
check = Qt.Checked if checked == True else Qt.Unchecked
item.setCheckState(check)
item.setEnabled(enable)
item.setCheckable(True)
self.model.appendRow(item)

def get_all_items_Unchecked(self):
# get all items desabled from row
all_items_row = {}
for index in range(self.model.rowCount()):
item = self.model.item(index)
if item.isCheckable() and item.checkState() == Qt.Unchecked:
all_items_row[str(item.text())] = False
return all_items_row

def convertIt(self,printer):
# generate file pdf
self.ExportPDF.print_(printer)
QMessageBox.information(self, 'WiFi Pumpkin Report PDF', 'file PDF has been generated with success.')

def exportFilesSystem(self):
# export HTML or pdf file
all_unchecked = self.get_all_items_Unchecked()
if not self.checkHTML.isChecked() and not self.checkPDF.isChecked():
return QMessageBox.warning(self, 'WiFi Pumpkin Options',
'You have to select a <strong>option</strong> file type for export.')
if len(all_unchecked.keys()) == 9:
return QMessageBox.warning(self, 'WiFi Pumpkin empty session',
'logger:ERROR Could not find log files.')

sessions_activated = ''
apname = self.configure.Settings.get_setting('accesspoint','APname')
for key in self.sessions.keys():
if str(self.CB_Data_Logger.currentText()) == self.sessions[key]['started']:
contents = Refactor.exportHtml(all_unchecked,key,
[self.sessions[key]['started'],self.sessions[key]['stoped']],apname)
sessions_activated = key
break
if sessions_activated == '':
contents = Refactor.exportHtml(all_unchecked,sessions_activated)

if self.checkHTML.isChecked():
filename = QFileDialog.getSaveFileNameAndFilter(self,
'Save File Logger as HTML','report.html','HTML (*.html)')
if len(filename[0]) != 0:
with open(str(filename[0]),'w') as filehtml:
filehtml.write(contents['HTML']),filehtml.close()
QMessageBox.information(self, 'WiFi Pumpkin Report HTML', 'file has been saved with success.')

elif self.checkPDF.isChecked():
filename = QFileDialog.getSaveFileNameAndFilter(self,
'Save File Logger as PDF','report.pdf','PDF (*.pdf)')
if len(filename[0]) != 0:
self.ExportPDF.setHtml(contents['HTML'])
printer = QPrinter()
printer.setPageSize(QPrinter.A4)
printer.setOutputFormat(QPrinter.PdfFormat)
printer.setOutputFileName(filename[0])
self.convertIt(printer)

@pyqtSlot(QModelIndex)
def combo_clicked(self, session):
# get activated logger files
self.model.clear()
sessions_activated = ''
for key in self.sessions.keys():
if session == self.sessions[key]['started']:
self.labelStart.setText(self.sessions[key]['started'])
self.labelStop.setText(self.sessions[key]['stoped'])
sessions_activated = key
break
all_unchecked = self.get_all_items_Unchecked()
self.addcheckListView_loggerFIles(all_unchecked,'activated_Files',enable=True,
checked=True,session=sessions_activated)
self.addcheckListView_loggerFIles(all_unchecked,'empty_files',enable=False,
checked=False,session=sessions_activated)

def GUI(self):
self.frm0 = QFormLayout()
self.model = QStandardItemModel()
self.viewlogger = QListView()
self.widget = QWidget()
self.layout = QVBoxLayout(self.widget)

self.ExportPDF = QWebView()

# check all files logger empty or round
self.viewlogger.setModel(self.model)
self.layout.addLayout(self.frm0)

# group file type
self.GroupBoxFile = QGroupBox()
self.layoutGroupFile = QVBoxLayout()
self.GroupBoxFile.setLayout(self.layoutGroupFile)
self.GroupBoxFile.setTitle('Options:')
self.checkHTML = QRadioButton('HTML')
self.checkPDF = QRadioButton('PDF')
self.layoutGroupFile.addWidget(self.checkHTML)
self.layoutGroupFile.addWidget(self.checkPDF)

# group informations
self.GroupBoxINFO = QGroupBox()
self.layoutGroupINFO = QFormLayout()
self.GroupBoxINFO.setLayout(self.layoutGroupINFO)
self.GroupBoxINFO.setTitle('Information:')
self.labelStart = QLabel()
self.labelStop = QLabel()
self.layoutGroupINFO.addRow('started AP at:',self.labelStart)
self.layoutGroupINFO.addRow('stoped AP at:',self.labelStop)

# get all session data add combobox
self.CB_Data_Logger = QComboBox(self)
all_sessions = []
for key in self.sessions.keys():
all_sessions.append(self.sessions[key]['started'])
all_sessions.append('select All logger file...')
self.CB_Data_Logger.addItems(all_sessions)
self.connect(self.CB_Data_Logger, SIGNAL('activated(QString)'), self.combo_clicked)
index = self.CB_Data_Logger.findText(all_sessions[len(all_sessions)-2], Qt.MatchFixedString)
self.CB_Data_Logger.setCurrentIndex(index)
self.combo_clicked(self.CB_Data_Logger.currentText())

self.btnSave = QPushButton('Export')
self.btnSave.clicked.connect(self.exportFilesSystem)

self.frm0.addRow('Session:',self.CB_Data_Logger)
self.frm0.addRow(self.GroupBoxINFO)
self.frm0.addRow(self.viewlogger)
self.frm0.addRow(self.GroupBoxFile)
self.frm0.addRow(self.btnSave)

self.Main.addWidget(self.widget)
self.setLayout(self.Main)
2 changes: 2 additions & 0 deletions Core/helpers/update.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ def __init__(self,version,parent = None):
super(frm_githubUpdate, self).__init__(parent)
self.setWindowTitle("WiFi-Pumpkin Software Update")
self.loadtheme(self.configure.XmlThemeSelected())
self.checkHasCommits = False
self.version = version
self.UrlDownloadCommits = \
'https://raw.githubusercontent.com/P0cL4bs/WiFi-Pumpkin/master/Core/config/commits/Lcommits.cfg'
Expand Down Expand Up @@ -133,6 +134,7 @@ def RcheckCommits(self,commits):
self.LCommits.addItem(item)
self.btnCheck.setEnabled(True)
self.btnUpdate.setEnabled(True)
self.checkHasCommits = True
elif 'alive::' in commits:
self.pb.update_bar(10)
elif '::updated' in commits:
Expand Down
Loading

0 comments on commit 600acab

Please sign in to comment.