├── core ├── __init__.py ├── Forms │ ├── __init__.py │ ├── FormHidden.py │ ├── FormLabel.py │ ├── FormImage.py │ ├── FormButton.py │ ├── Form.py │ └── FormCheckbox.py ├── Models │ └── __init__.py ├── Views │ ├── __init__.py │ ├── MultipleIpView.py │ ├── MultipleScopeView.py │ └── MultiSelectionView.py ├── Application │ ├── __init__.py │ ├── Dialogs │ │ ├── __init__.py │ │ ├── ChildDialogInfo.py │ │ ├── ChildDialogQuestion.py │ │ ├── ChildDialogExportSelection.py │ │ ├── ChildDialogCombo.py │ │ ├── ChildDialogToast.py │ │ ├── ChildDialogException.py │ │ ├── ChildDialogEditCommandSettings.py │ │ ├── ChildDialogCustomCommand.py │ │ └── ChildDialogDefectView.py │ └── Treeviews │ │ └── __init__.py ├── Components │ ├── __init__.py │ └── Modules │ │ └── Terminal.py ├── Controllers │ ├── __init__.py │ └── IntervalController.py ├── Reporting │ └── __init__.py └── plugins │ ├── __init__.py │ └── Default.py ├── icon ├── ip.png ├── cross.png ├── date.png ├── help.png ├── port.png ├── scope.png ├── tool.png ├── wave.png ├── command.png ├── defect.png ├── favicon.png ├── running.png ├── tab_main.png ├── tab_scan.png ├── waiting.png ├── done_tool.png ├── error_tool.png ├── tab_report.png ├── group_command.png ├── tab_commands.png ├── tab_dashboard.png ├── tab_settings.png ├── tab_summary.png └── tab_terminal.png ├── Templates ├── Modele.docx └── Modele.pptx ├── startWorker.sh ├── worker ├── requirements.txt ├── crtsh │ └── res.txt └── README.MD ├── exports ├── pollenisator_commands.gzip └── pollenisator_group_commands.gzip ├── documentation ├── captures │ ├── nmapPlugin.png │ ├── CommandView.png │ ├── calendarViews.png │ ├── pollenisatorMainFrame │ ├── pollenisator_flux.png │ ├── repr_applicative.png │ ├── pollenisator_launch.png │ ├── Pollenisator_installation.png │ ├── calendarEditorMainFrame.png │ └── pollenisator_creation_database.png ├── pdoc │ └── Pollenisator │ │ ├── worker │ │ ├── index.md │ │ └── crtsh │ │ │ ├── index.md │ │ │ └── crtsh.md │ │ ├── index.md │ │ ├── core │ │ ├── Reporting │ │ │ ├── index.md │ │ │ └── ExcelExport.md │ │ ├── Application │ │ │ ├── index.md │ │ │ ├── Treeviews │ │ │ │ ├── index.md │ │ │ │ └── CommandsTreeview.md │ │ │ ├── Dialogs │ │ │ │ ├── ChildDialogInfo.md │ │ │ │ ├── ChildDialogNewCalendar.md │ │ │ │ ├── ChildDialogQuestion.md │ │ │ │ ├── ChildDialogDate.md │ │ │ │ ├── index.md │ │ │ │ ├── ChildDialogExportSelection.md │ │ │ │ ├── ChildDialogCustomCommand.md │ │ │ │ ├── ChildDialogCombo.md │ │ │ │ ├── ChildDialogFileParser.md │ │ │ │ ├── ChildDialogDefectView.md │ │ │ │ ├── ChildDialogToast.md │ │ │ │ ├── ChildDialogException.md │ │ │ │ └── ChildDialogProgress.md │ │ │ └── StatusBar.md │ │ ├── Components │ │ │ ├── Modules │ │ │ │ ├── index.md │ │ │ │ ├── Terminal.md │ │ │ │ ├── DashBoard.md │ │ │ │ └── Summary.md │ │ │ ├── index.md │ │ │ ├── Search.md │ │ │ ├── Worker.md │ │ │ └── ScanManager.md │ │ ├── index.md │ │ ├── plugins │ │ │ ├── Default.md │ │ │ ├── index.md │ │ │ ├── SSHScan.md │ │ │ ├── Sublist3r.md │ │ │ ├── EternalBlue.md │ │ │ ├── SearchSploit.md │ │ │ ├── BlueKeep.md │ │ │ ├── Nmap.md │ │ │ ├── DigReverseLookup.md │ │ │ ├── SmbMap.md │ │ │ ├── Crtsh.md │ │ │ ├── WhatWeb.md │ │ │ ├── PythonReverseLookup.md │ │ │ ├── Knockpy.md │ │ │ ├── dnsrecon.md │ │ │ ├── Nikto.md │ │ │ ├── Dirsearch.md │ │ │ ├── HttpMethods.md │ │ │ └── TestSSL.md │ │ ├── Models │ │ │ ├── index.md │ │ │ └── Interval.md │ │ ├── Controllers │ │ │ ├── index.md │ │ │ ├── IntervalController.md │ │ │ ├── CommandController.md │ │ │ ├── CommandGroupController.md │ │ │ ├── ScopeController.md │ │ │ ├── IpController.md │ │ │ ├── ToolController.md │ │ │ ├── PortController.md │ │ │ ├── ControllerElement.md │ │ │ ├── DefectController.md │ │ │ └── WaveController.md │ │ ├── Views │ │ │ ├── index.md │ │ │ ├── MultipleIpView.md │ │ │ ├── MultiSelectionView.md │ │ │ ├── MultipleScopeView.md │ │ │ ├── CommandGroupView.md │ │ │ ├── WaveView.md │ │ │ ├── PortView.md │ │ │ ├── IntervalView.md │ │ │ └── IpView.md │ │ └── Forms │ │ │ ├── FormHidden.md │ │ │ ├── index.md │ │ │ ├── FormLabel.md │ │ │ ├── FormButton.md │ │ │ ├── FormSearchBar.md │ │ │ ├── FormHelper.md │ │ │ ├── FormCheckbox.md │ │ │ ├── Form.md │ │ │ ├── FormCombo.md │ │ │ ├── FormChecklist.md │ │ │ ├── FormDate.md │ │ │ ├── FormTreevw.md │ │ │ ├── FormStr.md │ │ │ └── FormFile.md │ │ └── pollenisator.md └── sftp_installation │ └── README.md ├── AllInOne ├── config │ ├── settings.cfg │ └── client.cfg ├── crtsh │ └── res.txt ├── start.sh └── README.MD ├── config ├── clientSample.cfg ├── settings.cfg └── tools.d │ └── tools.json ├── requirements.txt ├── setupTerminalForPentest.sh ├── startServices.sh ├── server ├── README.md └── Dockerfile ├── ssl └── initServerSSL.sh └── .gitignore /core/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /core/Forms/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /core/Models/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /core/Views/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /core/Application/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /core/Components/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /core/Controllers/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /core/Reporting/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /core/plugins/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /core/Application/Dialogs/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /core/Application/Treeviews/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /icon/ip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlgoSecure/Pollenisator/HEAD/icon/ip.png -------------------------------------------------------------------------------- /icon/cross.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlgoSecure/Pollenisator/HEAD/icon/cross.png -------------------------------------------------------------------------------- /icon/date.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlgoSecure/Pollenisator/HEAD/icon/date.png -------------------------------------------------------------------------------- /icon/help.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlgoSecure/Pollenisator/HEAD/icon/help.png -------------------------------------------------------------------------------- /icon/port.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlgoSecure/Pollenisator/HEAD/icon/port.png -------------------------------------------------------------------------------- /icon/scope.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlgoSecure/Pollenisator/HEAD/icon/scope.png -------------------------------------------------------------------------------- /icon/tool.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlgoSecure/Pollenisator/HEAD/icon/tool.png -------------------------------------------------------------------------------- /icon/wave.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlgoSecure/Pollenisator/HEAD/icon/wave.png -------------------------------------------------------------------------------- /icon/command.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlgoSecure/Pollenisator/HEAD/icon/command.png -------------------------------------------------------------------------------- /icon/defect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlgoSecure/Pollenisator/HEAD/icon/defect.png -------------------------------------------------------------------------------- /icon/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlgoSecure/Pollenisator/HEAD/icon/favicon.png -------------------------------------------------------------------------------- /icon/running.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlgoSecure/Pollenisator/HEAD/icon/running.png -------------------------------------------------------------------------------- /icon/tab_main.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlgoSecure/Pollenisator/HEAD/icon/tab_main.png -------------------------------------------------------------------------------- /icon/tab_scan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlgoSecure/Pollenisator/HEAD/icon/tab_scan.png -------------------------------------------------------------------------------- /icon/waiting.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlgoSecure/Pollenisator/HEAD/icon/waiting.png -------------------------------------------------------------------------------- /icon/done_tool.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlgoSecure/Pollenisator/HEAD/icon/done_tool.png -------------------------------------------------------------------------------- /icon/error_tool.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlgoSecure/Pollenisator/HEAD/icon/error_tool.png -------------------------------------------------------------------------------- /icon/tab_report.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlgoSecure/Pollenisator/HEAD/icon/tab_report.png -------------------------------------------------------------------------------- /Templates/Modele.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlgoSecure/Pollenisator/HEAD/Templates/Modele.docx -------------------------------------------------------------------------------- /Templates/Modele.pptx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlgoSecure/Pollenisator/HEAD/Templates/Modele.pptx -------------------------------------------------------------------------------- /icon/group_command.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlgoSecure/Pollenisator/HEAD/icon/group_command.png -------------------------------------------------------------------------------- /icon/tab_commands.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlgoSecure/Pollenisator/HEAD/icon/tab_commands.png -------------------------------------------------------------------------------- /icon/tab_dashboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlgoSecure/Pollenisator/HEAD/icon/tab_dashboard.png -------------------------------------------------------------------------------- /icon/tab_settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlgoSecure/Pollenisator/HEAD/icon/tab_settings.png -------------------------------------------------------------------------------- /icon/tab_summary.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlgoSecure/Pollenisator/HEAD/icon/tab_summary.png -------------------------------------------------------------------------------- /icon/tab_terminal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlgoSecure/Pollenisator/HEAD/icon/tab_terminal.png -------------------------------------------------------------------------------- /startWorker.sh: -------------------------------------------------------------------------------- 1 | export C_FORCE_ROOT="true" 2 | python3 -m celery -A 'AutoScanWorker' worker --events 3 | -------------------------------------------------------------------------------- /worker/requirements.txt: -------------------------------------------------------------------------------- 1 | celery==3.1.16 2 | pymongo==3.3.0 3 | netaddr>=0.7.19 4 | pysftp>=0.2.9 5 | -------------------------------------------------------------------------------- /exports/pollenisator_commands.gzip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlgoSecure/Pollenisator/HEAD/exports/pollenisator_commands.gzip -------------------------------------------------------------------------------- /documentation/captures/nmapPlugin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlgoSecure/Pollenisator/HEAD/documentation/captures/nmapPlugin.png -------------------------------------------------------------------------------- /documentation/captures/CommandView.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlgoSecure/Pollenisator/HEAD/documentation/captures/CommandView.png -------------------------------------------------------------------------------- /documentation/captures/calendarViews.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlgoSecure/Pollenisator/HEAD/documentation/captures/calendarViews.png -------------------------------------------------------------------------------- /exports/pollenisator_group_commands.gzip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlgoSecure/Pollenisator/HEAD/exports/pollenisator_group_commands.gzip -------------------------------------------------------------------------------- /documentation/captures/pollenisatorMainFrame: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlgoSecure/Pollenisator/HEAD/documentation/captures/pollenisatorMainFrame -------------------------------------------------------------------------------- /documentation/captures/pollenisator_flux.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlgoSecure/Pollenisator/HEAD/documentation/captures/pollenisator_flux.png -------------------------------------------------------------------------------- /documentation/captures/repr_applicative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlgoSecure/Pollenisator/HEAD/documentation/captures/repr_applicative.png -------------------------------------------------------------------------------- /documentation/captures/pollenisator_launch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlgoSecure/Pollenisator/HEAD/documentation/captures/pollenisator_launch.png -------------------------------------------------------------------------------- /documentation/captures/Pollenisator_installation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlgoSecure/Pollenisator/HEAD/documentation/captures/Pollenisator_installation.png -------------------------------------------------------------------------------- /documentation/captures/calendarEditorMainFrame.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlgoSecure/Pollenisator/HEAD/documentation/captures/calendarEditorMainFrame.png -------------------------------------------------------------------------------- /documentation/captures/pollenisator_creation_database.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlgoSecure/Pollenisator/HEAD/documentation/captures/pollenisator_creation_database.png -------------------------------------------------------------------------------- /AllInOne/config/settings.cfg: -------------------------------------------------------------------------------- 1 | include_all_domains:False 2 | include_domains_with_ip_in_scope:False 3 | include_domains_with_topdomain_in_scope:True 4 | centralizeResults:True 5 | -------------------------------------------------------------------------------- /documentation/pdoc/Pollenisator/worker/index.md: -------------------------------------------------------------------------------- 1 | Namespace Pollenisator.worker 2 | ============================= 3 | 4 | Sub-modules 5 | ----------- 6 | * Pollenisator.worker.crtsh -------------------------------------------------------------------------------- /documentation/pdoc/Pollenisator/worker/crtsh/index.md: -------------------------------------------------------------------------------- 1 | Namespace Pollenisator.worker.crtsh 2 | =================================== 3 | 4 | Sub-modules 5 | ----------- 6 | * Pollenisator.worker.crtsh.crtsh -------------------------------------------------------------------------------- /worker/crtsh/res.txt: -------------------------------------------------------------------------------- 1 | doc.api.trax-distribution.com. 3599 IN CNAME hosting.gitbook.com. 2 | hosting.gitbook.com. 299 IN CNAME fasthosting.gitbook.com. 3 | fasthosting.gitbook.com. 299 IN A 207.154.212.156 4 | -------------------------------------------------------------------------------- /AllInOne/crtsh/res.txt: -------------------------------------------------------------------------------- 1 | doc.api.trax-distribution.com. 3599 IN CNAME hosting.gitbook.com. 2 | hosting.gitbook.com. 299 IN CNAME fasthosting.gitbook.com. 3 | fasthosting.gitbook.com. 299 IN A 207.154.212.156 4 | -------------------------------------------------------------------------------- /config/clientSample.cfg: -------------------------------------------------------------------------------- 1 | { 2 | "host":"127.0.0.1", 3 | "mongo_port":"27017", 4 | "sftp_port":"22", 5 | "ssl":"False", 6 | "user":"", 7 | "password":"", 8 | "sftp_user":"", 9 | "sftp_password":"" 10 | } -------------------------------------------------------------------------------- /documentation/pdoc/Pollenisator/index.md: -------------------------------------------------------------------------------- 1 | Namespace Pollenisator 2 | ====================== 3 | 4 | Sub-modules 5 | ----------- 6 | * Pollenisator.AutoScanWorker 7 | * Pollenisator.core 8 | * Pollenisator.pollenisator 9 | * Pollenisator.worker -------------------------------------------------------------------------------- /AllInOne/config/client.cfg: -------------------------------------------------------------------------------- 1 | { 2 | "host":"127.0.0.1", 3 | "mongo_port":"27017", 4 | "sftp_port":"22", 5 | "ssl":"False", 6 | "user":"", 7 | "password":"", 8 | "sftp_user":"pollenisator", 9 | "sftp_password":"pollenisator123" 10 | } 11 | -------------------------------------------------------------------------------- /documentation/pdoc/Pollenisator/core/Reporting/index.md: -------------------------------------------------------------------------------- 1 | Module Pollenisator.core.Reporting 2 | ================================== 3 | 4 | Sub-modules 5 | ----------- 6 | * Pollenisator.core.Reporting.ExcelExport 7 | * Pollenisator.core.Reporting.PowerpointExport 8 | * Pollenisator.core.Reporting.WordExport -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | celery==3.1.16 2 | cryptography>=2.5 3 | dnspython 4 | feedparser 5 | lark-parser>=0.7.8 6 | netaddr>=0.7.19 7 | Pillow>=6.0.0 8 | pymongo>=3.11.0 9 | pyperclip 10 | pysftp>=0.2.9 11 | python-docx>=0.8.10 12 | python-pptx>=0.6.8 13 | requests>=2.18.4 14 | XlsxWriter>=1.0.2 15 | -------------------------------------------------------------------------------- /documentation/pdoc/Pollenisator/core/Application/index.md: -------------------------------------------------------------------------------- 1 | Module Pollenisator.core.Application 2 | ==================================== 3 | 4 | Sub-modules 5 | ----------- 6 | * Pollenisator.core.Application.Appli 7 | * Pollenisator.core.Application.Dialogs 8 | * Pollenisator.core.Application.StatusBar 9 | * Pollenisator.core.Application.Treeviews -------------------------------------------------------------------------------- /core/plugins/Default.py: -------------------------------------------------------------------------------- 1 | """Implement a default to plugin. Using Plugin inheritied functions""" 2 | from core.plugins.plugin import Plugin 3 | 4 | 5 | class Default(Plugin): 6 | """Attributes: 7 | autoDefect: a boolean indication that this plugin should be used to autodetect file. 8 | """ 9 | autoDetect = False # Override default True value 10 | -------------------------------------------------------------------------------- /documentation/pdoc/Pollenisator/core/Application/Treeviews/index.md: -------------------------------------------------------------------------------- 1 | Module Pollenisator.core.Application.Treeviews 2 | ============================================== 3 | 4 | Sub-modules 5 | ----------- 6 | * Pollenisator.core.Application.Treeviews.CalendarTreeview 7 | * Pollenisator.core.Application.Treeviews.CommandsTreeview 8 | * Pollenisator.core.Application.Treeviews.PollenisatorTreeview -------------------------------------------------------------------------------- /setupTerminalForPentest.sh: -------------------------------------------------------------------------------- 1 | POLLENISATOR_CURRENT_DB=Mytest 2 | source ~/.bashrc 3 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" 4 | alias pollex="$DIR"'/pollenisator.py --calendar '"$POLLENISATOR_CURRENT_DB"' --exec ''$1''' 5 | 6 | echo "Ready for pentest against $POLLENISATOR_CURRENT_DB. Just type pollex before every command you want to be integrated to this database" 7 | -------------------------------------------------------------------------------- /documentation/pdoc/Pollenisator/core/Components/Modules/index.md: -------------------------------------------------------------------------------- 1 | Namespace Pollenisator.core.Components.Modules 2 | ============================================== 3 | 4 | Sub-modules 5 | ----------- 6 | * Pollenisator.core.Components.Modules.DashBoard 7 | * Pollenisator.core.Components.Modules.Report 8 | * Pollenisator.core.Components.Modules.Summary 9 | * Pollenisator.core.Components.Modules.Terminal -------------------------------------------------------------------------------- /documentation/pdoc/Pollenisator/core/index.md: -------------------------------------------------------------------------------- 1 | Module Pollenisator.core 2 | ======================== 3 | 4 | Sub-modules 5 | ----------- 6 | * Pollenisator.core.Application 7 | * Pollenisator.core.Components 8 | * Pollenisator.core.Controllers 9 | * Pollenisator.core.Forms 10 | * Pollenisator.core.Models 11 | * Pollenisator.core.Reporting 12 | * Pollenisator.core.Views 13 | * Pollenisator.core.plugins -------------------------------------------------------------------------------- /AllInOne/start.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | service ssh restart 3 | mongod --bind_ip_all & 4 | ./startWorker.sh & 5 | myvar=`mongo pollenisator --quiet --eval "db.getCollectionNames()"` 6 | while [[ $myvar != *"calendars"* ]]; do 7 | sleep 2 8 | myvar=`mongo pollenisator --quiet --eval "db.getCollectionNames()"` 9 | done 10 | ps -u | grep "celery -A" | awk 'NR>1 {print $2}' | xargs kill -9 11 | ./startWorker.sh 12 | -------------------------------------------------------------------------------- /startServices.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | ssl=false 3 | if [ "$1" ]; then 4 | ssl=true 5 | fi 6 | 7 | if [ "$ssl" == true ] 8 | then 9 | echo "Launching mongod with ssl" 10 | mongod --dbpath=/var/lib/mongodb --sslMode requireSSL --sslPEMKeyFile ./ssl/server.pem --sslCAFile ./ssl/ca.pem -f /etc/mongod.conf 11 | else 12 | echo "Launching mongod without ssl" 13 | mongod --dbpath=/var/lib/mongodb -f /etc/mongod.conf 14 | fi 15 | 16 | -------------------------------------------------------------------------------- /documentation/pdoc/Pollenisator/core/Components/Modules/Terminal.md: -------------------------------------------------------------------------------- 1 | Module Pollenisator.core.Components.Modules.Terminal 2 | ==================================================== 3 | 4 | Classes 5 | ------- 6 | 7 | `Terminal(parent, settings)` 8 | : 9 | 10 | ### Class variables 11 | 12 | `iconName` 13 | : 14 | 15 | `tabName` 16 | : 17 | 18 | ### Methods 19 | 20 | `initUI(self, parent, nbk, treevw)` 21 | : 22 | 23 | `open(self)` 24 | : -------------------------------------------------------------------------------- /server/README.md: -------------------------------------------------------------------------------- 1 | Build docker 2 | docker build --build-arg SSHPASSWORD=pollenisator123 -t pollenisatorserver . --no-cache 3 | 4 | Run docker, port can be changed to whatever you want, just change the config file of workers and clients 5 | docker run -p 22:22 -p 27017:27017 -d pollenisatorserver 6 | 7 | for example, run on port 22222 8 | docker run -p 22222:22 -p 27017:27017 -d pollenisatorserver 9 | and change config/client.cfg as well as worker/config/client.cfg 10 | sftp_port:22222 11 | -------------------------------------------------------------------------------- /documentation/pdoc/Pollenisator/core/plugins/Default.md: -------------------------------------------------------------------------------- 1 | Module Pollenisator.core.plugins.Default 2 | ======================================== 3 | Implement a default to plugin. Using Plugin inheritied functions 4 | 5 | Classes 6 | ------- 7 | 8 | `Default()` 9 | : Attributes: 10 | autoDefect: a boolean indication that this plugin should be used to autodetect file. 11 | 12 | ### Ancestors (in MRO) 13 | 14 | * core.plugins.plugin.Plugin 15 | 16 | ### Class variables 17 | 18 | `autoDetect` 19 | : -------------------------------------------------------------------------------- /documentation/pdoc/Pollenisator/core/Models/index.md: -------------------------------------------------------------------------------- 1 | Module Pollenisator.core.Models 2 | =============================== 3 | 4 | Sub-modules 5 | ----------- 6 | * Pollenisator.core.Models.Command 7 | * Pollenisator.core.Models.CommandGroup 8 | * Pollenisator.core.Models.Defect 9 | * Pollenisator.core.Models.Element 10 | * Pollenisator.core.Models.Interval 11 | * Pollenisator.core.Models.Ip 12 | * Pollenisator.core.Models.Port 13 | * Pollenisator.core.Models.Scope 14 | * Pollenisator.core.Models.Tool 15 | * Pollenisator.core.Models.Wave -------------------------------------------------------------------------------- /worker/README.MD: -------------------------------------------------------------------------------- 1 | # Build docker 2 | ## Generic command 3 | docker build -t pollenisator . 4 | 5 | ## Rebuild all tools (updated them) 6 | docker build --no-cache -t pollenisator . 7 | 8 | # Run worker (if it's for local to local add --net=host) 9 | 10 | docker run -v `pwd`/../:/home/Pollenisator/ -d pollenisator 11 | 12 | or enter docker (if it's for local to local add --net=host) 13 | 14 | docker run -v `pwd`/../:/home/Pollenisator/ -ti pollenisator /bin/bash 15 | 16 | # Stop docker 17 | 18 | docker container ls 19 | docker stop Xxxxxxx 20 | -------------------------------------------------------------------------------- /config/settings.cfg: -------------------------------------------------------------------------------- 1 | {"search_show_hidden": true, "search_exact_match": false, "histo_filters": ["\"error\" in status", "\"error\" in status", "\"error\" in status", "\"error\" in status", "\"error\" in status", "\"done\" not in status", "\"error\" in status", "type==\"tool\" and \"done\" in status", "type == \"port\" and \"445\" == port", "type == \"port\" and \"445\" == port"], "terms": ["gnome-terminal --window -- bash --rcfile setupTerminalForPentest.sh", "xfce4-terminal -x bash --rcfile setupTerminalForPentest.sh", "xterm -e bash --rcfile setupTerminalForPentest.sh"], "fav_term": "gnome-terminal"} -------------------------------------------------------------------------------- /documentation/pdoc/Pollenisator/worker/crtsh/crtsh.md: -------------------------------------------------------------------------------- 1 | Module Pollenisator.worker.crtsh.crtsh 2 | ====================================== 3 | 4 | Functions 5 | --------- 6 | 7 | 8 | `format_entries(results, do_resolve_dns)` 9 | : Sort and deduplicate hostnames and, if DNS resolution is turned on, resolve hostname 10 | 11 | 12 | `get_rss_for_domain(domain)` 13 | : Pull the domain identity information from crt.sh 14 | 15 | 16 | `parse_entries(identity, results_list)` 17 | : This is pretty gross, but necessary when using crt.sh: parse the contents of the summary 18 | entry and return individual host names. -------------------------------------------------------------------------------- /AllInOne/README.MD: -------------------------------------------------------------------------------- 1 | # Build docker 2 | 3 | ## Generic command 4 | docker build -t allinone-pollenisator . 5 | 6 | ## Rebuild all tools (update them) 7 | docker build --no-cache -t allinone-pollenisator . 8 | 9 | # Run worker (if it's for local to local replace -p paramaters with --net=host) 10 | 11 | ```docker run -p 127.0.0.1:2222:22 -p 127.0.0.1:27017:27017 -d allinone-pollenisator``` 12 | 13 | or enter docker 14 | 15 | ```docker run -p 127.0.0.1:2222:22 -p 127.0.0.1:27017:27017 -ti allinone-pollenisator /bin/bash``` 16 | 17 | and run ./start.sh 18 | 19 | # Stop docker 20 | 21 | ``` 22 | docker ps 23 | docker stop Xxxxxxx 24 | ``` 25 | -------------------------------------------------------------------------------- /documentation/pdoc/Pollenisator/core/Components/index.md: -------------------------------------------------------------------------------- 1 | Module Pollenisator.core.Components 2 | =================================== 3 | 4 | Sub-modules 5 | ----------- 6 | * Pollenisator.core.Components.AutoScanMaster 7 | * Pollenisator.core.Components.FileStorage 8 | * Pollenisator.core.Components.Filter 9 | * Pollenisator.core.Components.Modules 10 | * Pollenisator.core.Components.Monitor 11 | * Pollenisator.core.Components.ScanManager 12 | * Pollenisator.core.Components.Search 13 | * Pollenisator.core.Components.Settings 14 | * Pollenisator.core.Components.Utils 15 | * Pollenisator.core.Components.Worker 16 | * Pollenisator.core.Components.mongo -------------------------------------------------------------------------------- /documentation/pdoc/Pollenisator/core/Controllers/index.md: -------------------------------------------------------------------------------- 1 | Module Pollenisator.core.Controllers 2 | ==================================== 3 | 4 | Sub-modules 5 | ----------- 6 | * Pollenisator.core.Controllers.CommandController 7 | * Pollenisator.core.Controllers.CommandGroupController 8 | * Pollenisator.core.Controllers.ControllerElement 9 | * Pollenisator.core.Controllers.DefectController 10 | * Pollenisator.core.Controllers.IntervalController 11 | * Pollenisator.core.Controllers.IpController 12 | * Pollenisator.core.Controllers.PortController 13 | * Pollenisator.core.Controllers.ScopeController 14 | * Pollenisator.core.Controllers.ToolController 15 | * Pollenisator.core.Controllers.WaveController -------------------------------------------------------------------------------- /documentation/pdoc/Pollenisator/core/Views/index.md: -------------------------------------------------------------------------------- 1 | Module Pollenisator.core.Views 2 | ============================== 3 | 4 | Sub-modules 5 | ----------- 6 | * Pollenisator.core.Views.CommandGroupView 7 | * Pollenisator.core.Views.CommandView 8 | * Pollenisator.core.Views.DefectView 9 | * Pollenisator.core.Views.IntervalView 10 | * Pollenisator.core.Views.IpView 11 | * Pollenisator.core.Views.MultiSelectionView 12 | * Pollenisator.core.Views.MultipleIpView 13 | * Pollenisator.core.Views.MultipleScopeView 14 | * Pollenisator.core.Views.PortView 15 | * Pollenisator.core.Views.ScopeView 16 | * Pollenisator.core.Views.ToolView 17 | * Pollenisator.core.Views.ViewElement 18 | * Pollenisator.core.Views.WaveView -------------------------------------------------------------------------------- /documentation/pdoc/Pollenisator/core/Forms/FormHidden.md: -------------------------------------------------------------------------------- 1 | Module Pollenisator.core.Forms.FormHidden 2 | ========================================= 3 | Widget with no display that holds a value 4 | 5 | Classes 6 | ------- 7 | 8 | `FormHidden(name, default='')` 9 | : Form field hidden, to store a value. 10 | 11 | Constructor for a hidden form. 12 | 13 | Args: 14 | name: the form name. 15 | default: a default value to store in it. 16 | 17 | ### Ancestors (in MRO) 18 | 19 | * core.Forms.Form.Form 20 | 21 | ### Methods 22 | 23 | `getValue(self)` 24 | : Return the form value. Required for a form. 25 | 26 | Returns: 27 | Return the form value. -------------------------------------------------------------------------------- /documentation/pdoc/Pollenisator/core/Forms/index.md: -------------------------------------------------------------------------------- 1 | Module Pollenisator.core.Forms 2 | ============================== 3 | 4 | Sub-modules 5 | ----------- 6 | * Pollenisator.core.Forms.Form 7 | * Pollenisator.core.Forms.FormButton 8 | * Pollenisator.core.Forms.FormCheckbox 9 | * Pollenisator.core.Forms.FormChecklist 10 | * Pollenisator.core.Forms.FormCombo 11 | * Pollenisator.core.Forms.FormDate 12 | * Pollenisator.core.Forms.FormFile 13 | * Pollenisator.core.Forms.FormHelper 14 | * Pollenisator.core.Forms.FormHidden 15 | * Pollenisator.core.Forms.FormLabel 16 | * Pollenisator.core.Forms.FormPanel 17 | * Pollenisator.core.Forms.FormSearchBar 18 | * Pollenisator.core.Forms.FormStr 19 | * Pollenisator.core.Forms.FormText 20 | * Pollenisator.core.Forms.FormTreevw -------------------------------------------------------------------------------- /core/Forms/FormHidden.py: -------------------------------------------------------------------------------- 1 | """Widget with no display that holds a value""" 2 | from core.Forms.Form import Form 3 | 4 | 5 | class FormHidden(Form): 6 | """ 7 | Form field hidden, to store a value. 8 | """ 9 | 10 | def __init__(self, name, default=""): 11 | """ 12 | Constructor for a hidden form. 13 | 14 | Args: 15 | name: the form name. 16 | default: a default value to store in it. 17 | """ 18 | super().__init__(name) 19 | self.default = default 20 | 21 | def getValue(self): 22 | """ 23 | Return the form value. Required for a form. 24 | 25 | Returns: 26 | Return the form value. 27 | """ 28 | return self.default 29 | -------------------------------------------------------------------------------- /documentation/pdoc/Pollenisator/core/Application/Dialogs/ChildDialogInfo.md: -------------------------------------------------------------------------------- 1 | Module Pollenisator.core.Application.Dialogs.ChildDialogInfo 2 | ============================================================ 3 | Display a simple information for the user. 4 | 5 | Classes 6 | ------- 7 | 8 | `ChildDialogInfo(parent, title, msg)` 9 | : Open a child dialog of a tkinter application to inform the user. 10 | 11 | Open a child dialog of a tkinter application to choose autoscan settings. 12 | 13 | Args: 14 | parent: the tkinter parent view to use for this window construction. 15 | title: title of the popup window 16 | msg: Message to show to the user 17 | 18 | ### Methods 19 | 20 | `destroy(self)` 21 | : Close the window. 22 | 23 | `show(self)` 24 | : Start displaying this window. -------------------------------------------------------------------------------- /server/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mongo 2 | ARG SSHPASSWORD=pollenisator123 3 | RUN apt-get update 4 | RUN apt-get install -y openssh-server 5 | RUN adduser pollenisator && usermod -s /bin/false pollenisator && usermod -d / pollenisator && mkdir -p /etc/Pollenisator/files/ && chown root.root /etc/Pollenisator && chown pollenisator.pollenisator /etc/Pollenisator/files 6 | RUN echo "pollenisator:$SSHPASSWORD" | chpasswd 7 | RUN sed -i 's/Subsystem\tsftp\t\/usr\/lib\/openssh\/sftp-server/Subsystem sftp internal-sftp/g' /etc/ssh/sshd_config 8 | RUN echo "Match User pollenisator\n\tChrootDirectory /etc/Pollenisator/\n\tPermitTunnel no\n\tX11Forwarding no\n\tAllowTcpForwarding no\n\tForceCommand internal-sftp\n\tPasswordAuthentication yes\n" >> /etc/ssh/sshd_config 9 | RUN service ssh stop 10 | RUN service ssh start 11 | EXPOSE 22 12 | EXPOSE 27017 13 | CMD ["/bin/sh", "-c", "service ssh restart && mongod --bind_ip_all"] 14 | -------------------------------------------------------------------------------- /core/Views/MultipleIpView.py: -------------------------------------------------------------------------------- 1 | """View for ip list object. Present an multi insertion form to user when interacted with.""" 2 | 3 | from core.Views.ViewElement import ViewElement 4 | 5 | 6 | class MultipleIpView(ViewElement): 7 | """View for ip list object. Present an multi insertion form to user when interacted with.""" 8 | 9 | 10 | def openInsertWindow(self): 11 | """ 12 | Creates a tkinter form using Forms classes. This form aims to insert many new Ips 13 | """ 14 | toppanel = self.form.addFormPanel(grid=True) 15 | toppanel.addFormLabel("IPs") 16 | toppanel.addFormHelper( 17 | "Add IP or hostnames that you want to include in the scans\nEach ip/hostname must on a separated line", column=1) 18 | self.form.addFormText("IPs", r"^(?!https?://).+$", 19 | "", None, side="top") 20 | self.completeInsertWindow() 21 | -------------------------------------------------------------------------------- /documentation/pdoc/Pollenisator/core/Application/Dialogs/ChildDialogNewCalendar.md: -------------------------------------------------------------------------------- 1 | Module Pollenisator.core.Application.Dialogs.ChildDialogNewCalendar 2 | =================================================================== 3 | Help the user to create a new pentest database. 4 | 5 | Classes 6 | ------- 7 | 8 | `ChildDialogNewCalendar(parent, default)` 9 | : Open a child dialog of a tkinter application to ask details about 10 | a new pentest database to create. 11 | 12 | Open a child dialog of a tkinter application to ask details about 13 | the new pentest. 14 | 15 | Args: 16 | parent: the tkinter parent view to use for this window construction. 17 | 18 | ### Methods 19 | 20 | `onOk(self, _event)` 21 | : Called when the user clicked the validation button. Set the rvalue attributes to the value selected and close the window. 22 | 23 | Args: 24 | _event: not used but mandatory -------------------------------------------------------------------------------- /documentation/pdoc/Pollenisator/core/Application/Dialogs/ChildDialogQuestion.md: -------------------------------------------------------------------------------- 1 | Module Pollenisator.core.Application.Dialogs.ChildDialogQuestion 2 | ================================================================ 3 | Ask a question to the user. 4 | 5 | Classes 6 | ------- 7 | 8 | `ChildDialogQuestion(parent, title, question, answers=('Yes', 'No'))` 9 | : Open a child dialog of a tkinter application to ask a question. 10 | 11 | Open a child dialog of a tkinter application to ask a question. 12 | 13 | Args: 14 | parent: the tkinter parent view to use for this window construction. 15 | title: title of the new window 16 | question: question to answer 17 | answers: a tuple with possible answers. Default to ("Yes" ,"No") 18 | 19 | ### Methods 20 | 21 | `onOk(self, event)` 22 | : Called when the user clicked the validation button. 23 | Set the rvalue attributes to the answer string choosen. -------------------------------------------------------------------------------- /documentation/pdoc/Pollenisator/core/Components/Modules/DashBoard.md: -------------------------------------------------------------------------------- 1 | Module Pollenisator.core.Components.Modules.DashBoard 2 | ===================================================== 3 | Dashboard module to display pentest info 4 | 5 | Classes 6 | ------- 7 | 8 | `DashBoard(parent, settings)` 9 | : Shows information about ongoing pentest. 10 | 11 | Constructor 12 | 13 | ### Class variables 14 | 15 | `conName` 16 | : 17 | 18 | `tabName` 19 | : 20 | 21 | ### Methods 22 | 23 | `displayData(self)` 24 | : Display loaded data in treeviews 25 | 26 | `initUI(self, parent, nbk, treevw)` 27 | : Initialize Dashboard widgets 28 | Args: 29 | parent: its parent widget 30 | 31 | `loadData(self)` 32 | : Fetch data from database 33 | 34 | `mycallback(self, event)` 35 | : 36 | 37 | `open(self)` 38 | : 39 | 40 | `refreshUI(self)` 41 | : Reload data and display them -------------------------------------------------------------------------------- /documentation/pdoc/Pollenisator/core/Views/MultipleIpView.md: -------------------------------------------------------------------------------- 1 | Module Pollenisator.core.Views.MultipleIpView 2 | ============================================= 3 | View for ip list object. Present an multi insertion form to user when interacted with. 4 | 5 | Classes 6 | ------- 7 | 8 | `MultipleIpView(appTw, appViewFrame, mainApp, controller)` 9 | : View for ip list object. Present an multi insertion form to user when interacted with. 10 | 11 | Constructor 12 | Args: 13 | appTw: a PollenisatorTreeview instance to put this view in 14 | appViewFrame: an view frame to build the forms in. 15 | mainApp: the Application instance 16 | controller: a CommandController for this view. 17 | 18 | ### Ancestors (in MRO) 19 | 20 | * core.Views.ViewElement.ViewElement 21 | 22 | ### Methods 23 | 24 | `openInsertWindow(self)` 25 | : Creates a tkinter form using Forms classes. This form aims to insert many new Ips -------------------------------------------------------------------------------- /documentation/pdoc/Pollenisator/core/Application/Dialogs/ChildDialogDate.md: -------------------------------------------------------------------------------- 1 | Module Pollenisator.core.Application.Dialogs.ChildDialogDate 2 | ============================================================ 3 | Simple calendar using ttk Treeview together with calendar and datetime 4 | classes. 5 | Adapted from github. 6 | 7 | Functions 8 | --------- 9 | 10 | 11 | `get_calendar(locale, fwday)` 12 | : 13 | 14 | Classes 15 | ------- 16 | 17 | `ChildDialogDate(parent=None)` 18 | : 19 | 20 | ### Instance variables 21 | 22 | `selection` 23 | : Return a datetime representing the current selected date. 24 | 25 | ### Methods 26 | 27 | `destroy(self)` 28 | : Close the window. 29 | 30 | `initCalendar(self, master=None, **kw)` 31 | : WIDGET-SPECIFIC OPTIONS 32 | 33 | locale, firstweekday, year, month, selectbackground, 34 | selectforeground 35 | 36 | `show(self)` 37 | : Start displaying this window. -------------------------------------------------------------------------------- /documentation/pdoc/Pollenisator/core/plugins/index.md: -------------------------------------------------------------------------------- 1 | Module Pollenisator.core.plugins 2 | ================================ 3 | 4 | Sub-modules 5 | ----------- 6 | * Pollenisator.core.plugins.BlueKeep 7 | * Pollenisator.core.plugins.CME 8 | * Pollenisator.core.plugins.Crtsh 9 | * Pollenisator.core.plugins.Default 10 | * Pollenisator.core.plugins.DigReverseLookup 11 | * Pollenisator.core.plugins.Dirsearch 12 | * Pollenisator.core.plugins.EternalBlue 13 | * Pollenisator.core.plugins.HttpMethods 14 | * Pollenisator.core.plugins.Knockpy 15 | * Pollenisator.core.plugins.Nikto 16 | * Pollenisator.core.plugins.Nmap 17 | * Pollenisator.core.plugins.PythonReverseLookup 18 | * Pollenisator.core.plugins.SSHScan 19 | * Pollenisator.core.plugins.SearchSploit 20 | * Pollenisator.core.plugins.SmbMap 21 | * Pollenisator.core.plugins.Sublist3r 22 | * Pollenisator.core.plugins.TestSSL 23 | * Pollenisator.core.plugins.WhatWeb 24 | * Pollenisator.core.plugins.dnsrecon 25 | * Pollenisator.core.plugins.plugin -------------------------------------------------------------------------------- /documentation/pdoc/Pollenisator/core/Application/Dialogs/index.md: -------------------------------------------------------------------------------- 1 | Module Pollenisator.core.Application.Dialogs 2 | ============================================ 3 | 4 | Sub-modules 5 | ----------- 6 | * Pollenisator.core.Application.Dialogs.ChildDialogCombo 7 | * Pollenisator.core.Application.Dialogs.ChildDialogConnect 8 | * Pollenisator.core.Application.Dialogs.ChildDialogCustomCommand 9 | * Pollenisator.core.Application.Dialogs.ChildDialogDate 10 | * Pollenisator.core.Application.Dialogs.ChildDialogDefectView 11 | * Pollenisator.core.Application.Dialogs.ChildDialogException 12 | * Pollenisator.core.Application.Dialogs.ChildDialogExportSelection 13 | * Pollenisator.core.Application.Dialogs.ChildDialogFileParser 14 | * Pollenisator.core.Application.Dialogs.ChildDialogInfo 15 | * Pollenisator.core.Application.Dialogs.ChildDialogNewCalendar 16 | * Pollenisator.core.Application.Dialogs.ChildDialogProgress 17 | * Pollenisator.core.Application.Dialogs.ChildDialogQuestion 18 | * Pollenisator.core.Application.Dialogs.ChildDialogToast -------------------------------------------------------------------------------- /documentation/pdoc/Pollenisator/core/Application/Dialogs/ChildDialogExportSelection.md: -------------------------------------------------------------------------------- 1 | Module Pollenisator.core.Application.Dialogs.ChildDialogExportSelection 2 | ======================================================================= 3 | ChildDialogExportSelection class 4 | Ask the user to select fields and returns the selected options 5 | 6 | Classes 7 | ------- 8 | 9 | `ChildDialogExportSelection(parent, keys)` 10 | : Open a child dialog of a tkinter application to ask the user to select fields between many. 11 | 12 | Open a child dialog of a tkinter application to ask details about 13 | an export of treeview items. 14 | 15 | Args: 16 | parent: the tkinter parent view to use for this window construction. 17 | keys: The keys to export 18 | 19 | ### Methods 20 | 21 | `onOk(self)` 22 | : Called the the Export button is pressed. 23 | return a list of strings corresponding to the selected fields. 24 | 25 | Args: 26 | _event: not used but mandatory -------------------------------------------------------------------------------- /documentation/pdoc/Pollenisator/core/Application/Dialogs/ChildDialogCustomCommand.md: -------------------------------------------------------------------------------- 1 | Module Pollenisator.core.Application.Dialogs.ChildDialogCustomCommand 2 | ===================================================================== 3 | Deprecated. 4 | Ask the user to enter a command and select a worker and plugin to launch it. 5 | 6 | Classes 7 | ------- 8 | 9 | `ChildDialogCustomCommand(parent, workers, default_worker='localhost')` 10 | : Open a child dialog of a tkinter application to ask details about 11 | a custom command to launch on target. 12 | 13 | Open a child dialog of a tkinter application to ask details about 14 | a custom command to launch on target. 15 | 16 | Args: 17 | parent: the tkinter parent view to use for this window construction. 18 | workers: A list of workers registered. 19 | default_worker: a worker to be selected by default. 20 | 21 | ### Methods 22 | 23 | `onOk(self)` 24 | : Called when the user clicked the validation button. Set the rvalue attributes to the value selected and close the window. -------------------------------------------------------------------------------- /documentation/pdoc/Pollenisator/pollenisator.md: -------------------------------------------------------------------------------- 1 | Module Pollenisator.pollenisator 2 | ================================ 3 | @author: Fabien Barré for AlgoSecure 4 | # Date: 11/07/2017 5 | # Major version released: 09/2019 6 | # @version: 1.0 7 | 8 | Functions 9 | --------- 10 | 11 | 12 | `main()` 13 | : Main function. Start pollenisator application 14 | 15 | Classes 16 | ------- 17 | 18 | `GracefulKiller(app)` 19 | : Signal handler to shut down properly. 20 | 21 | Attributes: 22 | kill_now: a boolean that can checked to know that it's time to stop. 23 | 24 | Constructor. Hook the signals SIGINT and SIGTERM to method exitGracefully 25 | 26 | Args: 27 | app: The appli object to stop 28 | 29 | ### Class variables 30 | 31 | `kill_now` 32 | : 33 | 34 | ### Methods 35 | 36 | `exitGracefully(self, _signum, _frame)` 37 | : Set the kill_now class attributes to True. Call the onClosing function of the application given at init. 38 | 39 | Args: 40 | signum: not used 41 | frame: not used -------------------------------------------------------------------------------- /documentation/pdoc/Pollenisator/core/Components/Search.md: -------------------------------------------------------------------------------- 1 | Module Pollenisator.core.Components.Search 2 | ========================================== 3 | DEPRECATED Hold functions to interact with the search bar. NOW LOCATED IN Filter.py 4 | 5 | Classes 6 | ------- 7 | 8 | `Operator(op, arg, exact_match=True)` 9 | : 10 | 11 | ### Methods 12 | 13 | `getMongo(self)` 14 | : 15 | 16 | `ParseError(...)` 17 | : To raise parsing error 18 | 19 | ### Ancestors (in MRO) 20 | 21 | * builtins.Exception 22 | * builtins.BaseException 23 | 24 | `Search(query='', exactMatch=True)` 25 | : 26 | 27 | ### Class variables 28 | 29 | `classes` 30 | : 31 | 32 | `exact_match` 33 | : 34 | 35 | ### Static methods 36 | 37 | `getKeywordsSuggestion(coll, start, terms)` 38 | : 39 | 40 | `getSuggestions(searchValue, entry)` 41 | : 42 | 43 | `help()` 44 | : 45 | 46 | `parse(query, ignoreException=False)` 47 | : 48 | 49 | ### Methods 50 | 51 | `getIds(self)` 52 | : 53 | 54 | `getViews(self, appTw, viewFrame, mainApp)` 55 | : -------------------------------------------------------------------------------- /documentation/sftp_installation/README.md: -------------------------------------------------------------------------------- 1 | ## Requirements ## 2 | 3 | Connect to backend then: 4 | 5 | `$ sudo apt-get install openssh-server` 6 | 7 | `$ sudo adduser pollenisator` 8 | 9 | `$ sudo usermod -s /bin/false pollenisator` 10 | 11 | `$ sudo usermod -d / pollenisator` 12 | 13 | `$ sudo mkdir -p /etc/Pollenisator/files/` 14 | 15 | `$ sudo chown root.root /etc/Pollenisator` 16 | 17 | `$ sudo chown pollenisator.pollenisator /etc/Pollenisator/files` 18 | 19 | Add a password usng the following command for the new pollenisator user 20 | 21 | `$ sudo passwd pollenisator` 22 | 23 | Then open your ssh config file (located in /etc/ssh/sshd_config) 24 | For example with nano 25 | 26 | `$ sudo nano /etc/ssh/sshd_config` 27 | 28 | And replace the line: 29 | ` Subsystem sftp /usr/lib/openssh/sftp-server` 30 | 31 | By 32 | 33 | `Subsystem sftp internal-sftp` 34 | 35 | And add at the end of the file: 36 | 37 | ``` 38 | Match User pollenisator 39 | ChrootDirectory /etc/Pollenisator/ 40 | PermitTunnel no 41 | X11Forwarding no 42 | AllowTcpForwarding no 43 | ForceCommand internal-sftp 44 | PasswordAuthentication yes 45 | ``` 46 | 47 | Then restart ssh service: 48 | 49 | `$ sudo systemctl restart ssh` -------------------------------------------------------------------------------- /documentation/pdoc/Pollenisator/core/Application/Dialogs/ChildDialogCombo.md: -------------------------------------------------------------------------------- 1 | Module Pollenisator.core.Application.Dialogs.ChildDialogCombo 2 | ============================================================= 3 | Defines a dialog window for choosing 1 between option many thourgh a combobox 4 | 5 | Classes 6 | ------- 7 | 8 | `ChildDialogCombo(parent, options, displayMsg='Choose a database to open:', default=None)` 9 | : Open a child dialog of a tkinter application to ask a user a calendar name. 10 | 11 | Open a child dialog of a tkinter application to ask a combobox option. 12 | 13 | Args: 14 | parent: the tkinter parent view to use for this window construction. 15 | options: A list of string correspondig to options of the combobox 16 | displayMsg: The message that will explain to the user what he is choosing. 17 | default: Choose a default selected option (one of the string in options). default is None 18 | 19 | ### Methods 20 | 21 | `onError(self)` 22 | : Close the dialog and set rvalue to None 23 | 24 | `onOk(self)` 25 | : Called when the user clicked the validation button. Set the rvalue attributes to the value selected and close the window. -------------------------------------------------------------------------------- /documentation/pdoc/Pollenisator/core/Forms/FormLabel.md: -------------------------------------------------------------------------------- 1 | Module Pollenisator.core.Forms.FormLabel 2 | ======================================== 3 | Describe tkinter Label with default common args 4 | 5 | Classes 6 | ------- 7 | 8 | `FormLabel(name, text, **kwargs)` 9 | : Form field representing a label. 10 | Default setted values: 11 | width=500 12 | if pack : padx = pady = 5, side = left 13 | if grid: row = column = 0 sticky = "East" 14 | 15 | Constructor for a form label 16 | Args: 17 | name: the label name. 18 | text: the text showed by the label. 19 | kwargs: same keyword args as you would give to ttk.Label 20 | 21 | ### Ancestors (in MRO) 22 | 23 | * core.Forms.Form.Form 24 | 25 | ### Methods 26 | 27 | `constructView(self, parent)` 28 | : Create the label view inside the parent view given 29 | 30 | Args: 31 | parent: parent FormPanel. 32 | 33 | `getValue(self)` 34 | : Return the form value. Required for a form. 35 | 36 | Returns: 37 | Return the label text. 38 | 39 | `setValue(self, _newval)` 40 | : nothing to set so overwrite 41 | Args: 42 | _newval: not used -------------------------------------------------------------------------------- /ssl/initServerSSL.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | if [[ $1 == "" ]] 3 | then 4 | echo "Usage: ./initServerSSL.sh " 5 | exit 1 6 | fi 7 | domain=$1 8 | openssl req -out ca.pem -new -x509 -days 3650 -subj "/C=AU/ST=NSW/O=Organisation/CN=root/emailAddress=user@domain.com" -passout pass:"password" 9 | echo "42" > file.srl 10 | openssl genrsa -out server.key 2048 11 | openssl req -key server.key -new -out server.req -subj "/C=AU/ST=NSW/O=Organisation/CN=$domain/emailAddress=user@domain.com" 12 | openssl x509 -req -in server.req -CA ca.pem -CAkey privkey.pem -CAserial file.srl -out server.crt -days 3650 -passin pass:"password" 13 | cat server.key server.crt > server.pem 14 | openssl verify -CAfile ca.pem server.pem 15 | echo "Do you want to create a client certificat ? (Y/n)" 16 | read answer 17 | if [[ $answer == "n" ]] 18 | then 19 | exit 0 20 | fi 21 | openssl genrsa -out client.key 2048 22 | openssl req -key client.key -new -out client.req -subj "/C=AU/ST=NSW/O=Organisation/CN=client1/emailAddress=user@domain.com" 23 | openssl x509 -req -in client.req -CA ca.pem -CAkey privkey.pem -CAserial file.srl -out client.crt -days 3650 -passin pass:"password" 24 | cat client.key client.crt > client.pem 25 | openssl verify -CAfile ca.pem client.pem 26 | -------------------------------------------------------------------------------- /documentation/pdoc/Pollenisator/core/Forms/FormButton.md: -------------------------------------------------------------------------------- 1 | Module Pollenisator.core.Forms.FormButton 2 | ========================================= 3 | Describe tkinter button with default common args 4 | 5 | Classes 6 | ------- 7 | 8 | `FormButton(name, callback, **kwargs)` 9 | : Form field representing a button. 10 | Default setted values: 11 | if pack : padx = pady = 5, side = right 12 | if grid: row = column = 0 sticky = "west 13 | 14 | Constructor for a form button 15 | 16 | Args: 17 | name: the button text. 18 | callback: a function that will be called when the button is clicked. 19 | kwargs: same keyword args as you would give to ttk.Button 20 | 21 | ### Ancestors (in MRO) 22 | 23 | * core.Forms.Form.Form 24 | 25 | ### Methods 26 | 27 | `configure(self, **kwargs)` 28 | : Change kwargs to given one. Must be called before constructView 29 | Args: 30 | **kwargs: any ttk Button keyword arguments. 31 | 32 | `constructView(self, parent)` 33 | : Create the button view inside the parent view given 34 | 35 | Args: 36 | parent: parent form panel. 37 | 38 | `setFocus(self)` 39 | : Set the focus to the ttk button. -------------------------------------------------------------------------------- /documentation/pdoc/Pollenisator/core/Views/MultiSelectionView.md: -------------------------------------------------------------------------------- 1 | Module Pollenisator.core.Views.MultiSelectionView 2 | ================================================= 3 | View for multi selected object clicked. Present an multi modify form to user when interacted with. 4 | 5 | Classes 6 | ------- 7 | 8 | `MultiSelectionView(appliTw, appViewFrame, mainApp)` 9 | : View for multi selected object clicked. Present an multi modify form to user when interacted with. 10 | 11 | Constructor 12 | Args: 13 | appTw: a PollenisatorTreeview instance to put this view in 14 | appViewFrame: an view frame to build the forms in. 15 | mainApp: the Application instance 16 | controller: a CommandController for this view. 17 | 18 | ### Ancestors (in MRO) 19 | 20 | * core.Views.ViewElement.ViewElement 21 | 22 | ### Methods 23 | 24 | `openModifyWindow(self)` 25 | : Creates a tkinter form using Forms classes. This form aims to update or perform actions on multiple different objects common properties like tags. 26 | 27 | `tagClicked(self, name)` 28 | : Separate callback to apply when a tag button is clicked 29 | Applies the clicked tag to all selected objects 30 | Args: 31 | name: tag name clicked -------------------------------------------------------------------------------- /documentation/pdoc/Pollenisator/core/Application/Dialogs/ChildDialogFileParser.md: -------------------------------------------------------------------------------- 1 | Module Pollenisator.core.Application.Dialogs.ChildDialogFileParser 2 | ================================================================== 3 | Ask the user to select a file or directory and then parse it with the selected parser 4 | 5 | Functions 6 | --------- 7 | 8 | 9 | `md5(fname)` 10 | : Compute md5 hash of the given file name. 11 | Args: 12 | fname: path to the file you want to compute the md5 of. 13 | Return: 14 | The digested hash of the file in an hexadecimal string format. 15 | 16 | Classes 17 | ------- 18 | 19 | `ChildDialogFileParser(parent)` 20 | : Open a child dialog of a tkinter application to ask details about 21 | existing files parsing. 22 | 23 | Open a child dialog of a tkinter application to ask details about 24 | existing files parsing. 25 | 26 | Args: 27 | parent: the tkinter parent view to use for this window construction. 28 | 29 | ### Methods 30 | 31 | `onOk(self)` 32 | : Called when the user clicked the validation button. 33 | launch parsing with selected parser on selected file/directory. 34 | Close the window. 35 | 36 | Args: 37 | _event: not used but mandatory -------------------------------------------------------------------------------- /documentation/pdoc/Pollenisator/core/Views/MultipleScopeView.md: -------------------------------------------------------------------------------- 1 | Module Pollenisator.core.Views.MultipleScopeView 2 | ================================================ 3 | View for scope list object. Present an multi insertion form to user when interacted with. 4 | 5 | Classes 6 | ------- 7 | 8 | `MultipleScopeView(appTw, appViewFrame, mainApp, controller)` 9 | : View for scope list object. Present an multi insertion form to user when interacted with. 10 | 11 | Constructor 12 | Args: 13 | appTw: a PollenisatorTreeview instance to put this view in 14 | appViewFrame: an view frame to build the forms in. 15 | mainApp: the Application instance 16 | controller: a CommandController for this view. 17 | 18 | ### Ancestors (in MRO) 19 | 20 | * core.Views.ViewElement.ViewElement 21 | 22 | ### Methods 23 | 24 | `addChildrenBaseNodes(self, newNode)` 25 | : Add to the given node from a treeview the mandatory childrens. 26 | For a scope it is the tools parent node and the ips parent node. 27 | 28 | Args: 29 | newNode: the newly created node we want to add children to. 30 | 31 | `openInsertWindow(self)` 32 | : Creates a tkinter form using Forms classes. This form aims to insert many new Scopes -------------------------------------------------------------------------------- /documentation/pdoc/Pollenisator/core/Application/Dialogs/ChildDialogDefectView.md: -------------------------------------------------------------------------------- 1 | Module Pollenisator.core.Application.Dialogs.ChildDialogDefectView 2 | ================================================================== 3 | This class pop a defect view form in a subdialog 4 | 5 | Classes 6 | ------- 7 | 8 | `ChildDialogDefectView(parent, settings, defectModel=None)` 9 | : Open a child dialog of a tkinter application to answer a question. 10 | 11 | Open a child dialog of a tkinter application to choose autoscan settings. 12 | 13 | Args: 14 | parent: the tkinter parent view to use for this window construction. 15 | defectModel : A Defect Model object to load default values. None to have empty fields, default is None. 16 | 17 | ### Methods 18 | 19 | `cancel(self)` 20 | : called when canceling the window. 21 | Close the window and set rvalue to False 22 | Args: 23 | _event: Not used but mandatory 24 | 25 | `okCallback(self)` 26 | : called when pressing the validating button 27 | Close the window if the form is valid. 28 | Set rvalue to True and perform the defect update/insert if validated. 29 | Args: 30 | _event: Not used but mandatory 31 | 32 | `DummyMainApp(settings)` 33 | : -------------------------------------------------------------------------------- /documentation/pdoc/Pollenisator/core/Forms/FormSearchBar.md: -------------------------------------------------------------------------------- 1 | Module Pollenisator.core.Forms.FormSearchBar 2 | ============================================ 3 | 4 | Classes 5 | ------- 6 | 7 | `FormSearchBar(name, searchCallback, panel_to_fill, list_of_forms_to_fill, default='', **kwargs)` 8 | : Form field representing a string input. 9 | 10 | Constructor for a form entry 11 | 12 | Args: 13 | name: the entry name (id). 14 | regexValidation: a regex used to check the input in the checkForm function., default is "" 15 | default: a default value for the Entry, defauult is "" 16 | 17 | ### Ancestors (in MRO) 18 | 19 | * core.Forms.Form.Form 20 | 21 | ### Methods 22 | 23 | `constructView(self, parent)` 24 | : Create the string view inside the parent view given 25 | 26 | Args: 27 | parent: parent FormPanel. 28 | 29 | `getValue(self)` 30 | : Return the form value. Required for a form. 31 | 32 | Returns: 33 | Return the entry value as string. 34 | 35 | `postSelect(self)` 36 | : 37 | 38 | `selectAll(self, _event)` 39 | : 40 | 41 | `setFocus(self)` 42 | : Defines what item should be focused inside the form widget 43 | 44 | `updateValues(self)` 45 | : -------------------------------------------------------------------------------- /documentation/pdoc/Pollenisator/core/Application/Dialogs/ChildDialogToast.md: -------------------------------------------------------------------------------- 1 | Module Pollenisator.core.Application.Dialogs.ChildDialogToast 2 | ============================================================= 3 | Show a message to the user for a limited amount of time 4 | 5 | Classes 6 | ------- 7 | 8 | `ChildDialogToast(parent, text, *args, **kwargs)` 9 | : floating basic window with info text inside, fading away after a short time. 10 | 11 | 12 | create the floating window but do not display it 13 | 14 | Args: 15 | parent: the tkinter parent view to use for this window construction. 16 | text: the text to display inside the toast 17 | args: not used 18 | kwargs: 19 | - if fadingTime is defined, delay before fading starts. Default to 1.0s 20 | - if x is defined, x position of the toast top left corner, else default to parent x +25 . 21 | - if y is defined, y position of the toast top left corner, else default to parent botoom - 100. 22 | 23 | ### Ancestors (in MRO) 24 | 25 | * tkinter.Toplevel 26 | * tkinter.BaseWidget 27 | * tkinter.Misc 28 | * tkinter.Wm 29 | 30 | ### Methods 31 | 32 | `fade(self)` 33 | : 34 | 35 | `show(self)` 36 | : show the floating window, fading on 1.0 sec -------------------------------------------------------------------------------- /documentation/pdoc/Pollenisator/core/Reporting/ExcelExport.md: -------------------------------------------------------------------------------- 1 | Module Pollenisator.core.Reporting.ExcelExport 2 | ============================================== 3 | 4 | Functions 5 | --------- 6 | 7 | 8 | `addDefectsRecap(workbook, defectDicts)` 9 | : Function triggered when a report is generated. 10 | Args: 11 | workbook: a workbook object to write in. 12 | 13 | 14 | `addDefectsReport(workbook)` 15 | : Function triggered when a report is generated. 16 | Args: 17 | workbook: a workbook object to write in. 18 | 19 | 20 | `addGlobalStatus(workbook)` 21 | : Add a global status reporting sheet to the given workbook. 22 | 23 | Args: 24 | workbook: The workbook to add the created sheet into. 25 | 26 | 27 | `addNotesReport(workbook)` 28 | : Function triggered when a report is generated. 29 | Args: 30 | workbook: a workbook object to write in. 31 | 32 | 33 | `addReport(workbook)` 34 | : Function triggered when a report is generated. 35 | Args: 36 | workbook: a workbook object to write in. 37 | 38 | 39 | `exportExcel(defectsDict, outname=None)` 40 | : Export a given database calendar name to an excel reporting file. 41 | 42 | Args: 43 | dbName: The database name to be reported in the excel file. -------------------------------------------------------------------------------- /documentation/pdoc/Pollenisator/core/Application/Dialogs/ChildDialogException.md: -------------------------------------------------------------------------------- 1 | Module Pollenisator.core.Application.Dialogs.ChildDialogException 2 | ================================================================= 3 | Defines a dialog window to display an error 4 | 5 | Functions 6 | --------- 7 | 8 | 9 | `postIssue(_err)` 10 | : Open a tab in a browser to github issues page. 11 | Args: 12 | _err: Not used 13 | 14 | Classes 15 | ------- 16 | 17 | `ChildDialogException(parent, title, err)` 18 | : Open a child dialog of a tkinter application to present the user to an unhandled exception. 19 | Can be used to report issue to github. 20 | 21 | Open a child dialog of a tkinter application to present the user to an unhandled exception. 22 | Can be used to report issue to github. 23 | Args: 24 | parent: the tkinter parent view to use for this window construction. 25 | title: A title for the new windows 26 | err: the error that occured causing this window to appear 27 | 28 | ### Methods 29 | 30 | `onError(self)` 31 | : Close the dialog and set rvalue to None 32 | Args: 33 | _event: not used but mandatory 34 | 35 | `onOk(self)` 36 | : Called when the user clicked the validation button. Set the rvalue attributes to the value selected and close the window. 37 | 38 | Args: 39 | _event: not used but mandatory -------------------------------------------------------------------------------- /core/Application/Dialogs/ChildDialogInfo.py: -------------------------------------------------------------------------------- 1 | """Display a simple information for the user. 2 | """ 3 | import tkinter as tk 4 | import tkinter.ttk as ttk 5 | 6 | 7 | class ChildDialogInfo: 8 | """ 9 | Open a child dialog of a tkinter application to inform the user. 10 | """ 11 | 12 | def __init__(self, parent, title, msg): 13 | """ 14 | Open a child dialog of a tkinter application to choose autoscan settings. 15 | 16 | Args: 17 | parent: the tkinter parent view to use for this window construction. 18 | title: title of the popup window 19 | msg: Message to show to the user 20 | """ 21 | self.app = tk.Toplevel(parent) 22 | self.app.transient(parent) 23 | self.app.wait_visibility() 24 | self.app.grab_set() 25 | self.app.resizable(False, False) 26 | self.app.title(title) 27 | appFrame = ttk.Frame(self.app) 28 | self.rvalue = None 29 | self.parent = parent 30 | lbl = ttk.Label(appFrame, text=msg) 31 | lbl.pack(side=tk.TOP, padx=10, pady=10, fill=tk.X) 32 | appFrame.pack(fill=tk.BOTH) 33 | 34 | def show(self): 35 | """Start displaying this window.""" 36 | self.app.update() 37 | 38 | def destroy(self): 39 | """ 40 | Close the window. 41 | """ 42 | # send the data to the parent 43 | self.app.destroy() 44 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *.pyc 5 | # Distribution / packaging 6 | .Python 7 | env/ 8 | build/ 9 | develop-eggs/ 10 | dist/ 11 | downloads/ 12 | eggs/ 13 | .eggs/ 14 | lib/ 15 | lib64/ 16 | parts/ 17 | sdist/ 18 | var/ 19 | *.egg-info/ 20 | .installed.cfg 21 | *.egg 22 | 23 | # PyInstaller 24 | # Usually these files are written by a python script from a template 25 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 26 | *.manifest 27 | *.spec 28 | 29 | # Installer logs 30 | pip-log.txt 31 | pip-delete-this-directory.txt 32 | 33 | # Unit test / coverage reports 34 | htmlcov/ 35 | .tox/ 36 | .coverage 37 | .coverage.* 38 | .cache 39 | nosetests.xml 40 | coverage.xml 41 | *,cover 42 | 43 | # Translations 44 | *.mo 45 | *.pot 46 | 47 | # Django stuff: 48 | *.log 49 | 50 | # Sphinx documentation 51 | docs/_build/ 52 | 53 | # PyBuilder 54 | target/ 55 | 56 | # Application 57 | results/* 58 | local/* 59 | local/states/* 60 | centralizedResults/* 61 | *.pyc 62 | ssl/* 63 | !ssl/initServerSSL.ssh 64 | core/*.pyc 65 | core/Models/*.pyc 66 | core/Views/*.pyc 67 | core/Forms/*.pyc 68 | core/Components/*.pyc 69 | exports/* 70 | !exports/pollenisator_commands.gzip 71 | !exports/pollenisator_group_commands.gzip 72 | config/tools.d/* 73 | !config/tools.d/tools.json 74 | .vscode 75 | venv/ 76 | config/client.cfg 77 | config/settings.cfg 78 | AllInOne/results/* 79 | !AllInOne/results 80 | -------------------------------------------------------------------------------- /documentation/pdoc/Pollenisator/core/Components/Worker.md: -------------------------------------------------------------------------------- 1 | Module Pollenisator.core.Components.Worker 2 | ========================================== 3 | Handle Workers specific work 4 | 5 | Classes 6 | ------- 7 | 8 | `Worker(name)` 9 | : Represents one worker state. 10 | 11 | Constructor. 12 | Args: 13 | name: The celery worker name 14 | 15 | ### Methods 16 | 17 | `getNbOfLaunchedCommand(self, commandName)` 18 | : Get the total number of running commands which have the given command name 19 | 20 | Args: 21 | commandName: The command name to count running tools. 22 | 23 | Returns: 24 | Return the total of running tools with this command's name as an integer. 25 | 26 | `hasRegistered(self, launchableTool)` 27 | : Returns a bool indicating if the worker has registered a given tool 28 | Args: 29 | launchableTool: the tool object to check registration of. 30 | Returns: 31 | Return bool. 32 | 33 | `hasSpaceFor(self, launchableTool)` 34 | : Check if this worker has space for the given tool. (this checks the command and every group of commands max_thred settings) 35 | 36 | Args: 37 | launchableTool: a tool documents fetched from database that has to be launched 38 | 39 | Returns: 40 | Return True if a command of the tool's type can be launched on this worker, False otherwise. -------------------------------------------------------------------------------- /documentation/pdoc/Pollenisator/core/Forms/FormHelper.md: -------------------------------------------------------------------------------- 1 | Module Pollenisator.core.Forms.FormHelper 2 | ========================================= 3 | Widget with a button that display an helping message when hovered 4 | 5 | Classes 6 | ------- 7 | 8 | `FormHelper(name, text, **kwargs)` 9 | : Form field representing a helper button. 10 | Default setted values: 11 | state="readonly" 12 | if pack : padx = pady = 5, side = "right" 13 | if grid: row = column = 0 sticky = "west" 14 | entry "width"= 20 15 | 16 | Constructor for a form button 17 | 18 | Args: 19 | name: the helper name. Should not matter as it does not return data 20 | text: the helping message to be displayed 21 | kwargs: same keyword args as you would give to ttk.Label 22 | 23 | ### Ancestors (in MRO) 24 | 25 | * core.Forms.Form.Form 26 | 27 | ### Class variables 28 | 29 | `img_class` 30 | : 31 | 32 | ### Methods 33 | 34 | `close(self)` 35 | : Callback for the event 36 | Stops displaying the help message 37 | Args: 38 | _event: not used but mandatory 39 | 40 | `constructView(self, parent)` 41 | : Create the button view inside the parent view given 42 | 43 | Args: 44 | parent: parent form panel. 45 | 46 | `enter(self)` 47 | : Callback for the event 48 | Starts displaying the help message 49 | Args: 50 | _event: not used but mandatory -------------------------------------------------------------------------------- /documentation/pdoc/Pollenisator/core/Application/StatusBar.md: -------------------------------------------------------------------------------- 1 | Module Pollenisator.core.Application.StatusBar 2 | ============================================== 3 | StatusBar class. Show tagged elements numbers to user. 4 | 5 | Classes 6 | ------- 7 | 8 | `StatusBar(master, registeredTags, statusbarController)` 9 | : StatusBar class. Show tagged numbers to user. 10 | Inherits ttk.Frame 11 | 12 | Constructor of the status bar 13 | Args: 14 | master: parent tkinter window 15 | registeredTags: a list of tag names registred in settings 16 | statusbarController: a controller to handle clicks on status bar. 17 | It has to delcare a statusbarClicked function taking 1 arg : a tag name 18 | 19 | ### Ancestors (in MRO) 20 | 21 | * tkinter.ttk.Frame 22 | * tkinter.ttk.Widget 23 | * tkinter.Widget 24 | * tkinter.BaseWidget 25 | * tkinter.Misc 26 | * tkinter.Pack 27 | * tkinter.Place 28 | * tkinter.Grid 29 | 30 | ### Methods 31 | 32 | `notify(self, addedTags, removedTags=[])` 33 | : Notify is called when tags are added or removed 34 | Args: 35 | addedTags: a list of tag names added 36 | removedTags: a list of tag names removed, default to [] 37 | 38 | `reset(self)` 39 | : Rest all displayed tags count to 0 40 | 41 | `tagClicked(self, name)` 42 | : A lambda to call the statusbarController.statusbarClicked with the tag name clicked 43 | Args: 44 | name: the tag name clicked 45 | 46 | `update(self)` 47 | : Update all tags label to tags count -------------------------------------------------------------------------------- /documentation/pdoc/Pollenisator/core/Forms/FormCheckbox.md: -------------------------------------------------------------------------------- 1 | Module Pollenisator.core.Forms.FormCheckbox 2 | =========================================== 3 | Describe tkinter checkbox with default common args 4 | 5 | Classes 6 | ------- 7 | 8 | `FormCheckbox(name, text, default, **kwargs)` 9 | : Form field representing a checkbox. 10 | Default setted values: 11 | if pack : padx = pady = 5, side = right 12 | if grid: row = column = 0 sticky = "west" 13 | 14 | Constructor for a form checkbox 15 | 16 | Args: 17 | name: the checkbox name (id). 18 | text: the text on the checkbox 19 | default: boolean indicating if the checkbox should be checked by default. 20 | kwargs: same keyword args as you would give to ttk.CheckButton 21 | 22 | ### Ancestors (in MRO) 23 | 24 | * core.Forms.Form.Form 25 | 26 | ### Methods 27 | 28 | `checkForm(self)` 29 | : Check if this form is correctly filled. A checkbox cannot be malformed. 30 | 31 | Returns: 32 | { 33 | "correct": True if the form is correctly filled, False otherwise. 34 | "msg": A message indicating what is not correctly filled. 35 | } 36 | 37 | `constructView(self, parent)` 38 | : Create the checkbox view inside the parent view given 39 | 40 | Args: 41 | parent: parent form panel. 42 | 43 | `getValue(self)` 44 | : Return the form value. Required for a form. 45 | 46 | Returns: 47 | Return True if the checkbox was checked, False otherwise. 48 | 49 | `setFocus(self)` 50 | : Set the focus to the ttk checkbutton. -------------------------------------------------------------------------------- /documentation/pdoc/Pollenisator/core/Components/ScanManager.md: -------------------------------------------------------------------------------- 1 | Module Pollenisator.core.Components.ScanManager 2 | =============================================== 3 | Hold functions to interact form the scan tab in the notebook 4 | 5 | Functions 6 | --------- 7 | 8 | 9 | `autoscan_execute(calendarName)` 10 | : Call the autoScan function with given pentest name as endless and no reprint. 11 | 12 | Args: 13 | calendarName: the pentest database name to auto scan. 14 | 15 | Classes 16 | ------- 17 | 18 | `ScanManager(nbk, linkedTreeview, calendarToScan, settings)` 19 | : Scan model class 20 | 21 | Constructor, initialize a Monitor object 22 | 23 | ### Methods 24 | 25 | `OnDoubleClick(self, event)` 26 | : Callback for a double click on ongoing scan tool treeview. Open the clicked tool in main view and focus on it. 27 | Args: 28 | event: Automatically filled when event is triggered. Holds info about which line was double clicked 29 | 30 | `initUI(self, parent)` 31 | : Create widgets and initialize them 32 | Args: 33 | parent: the parent tkinter widget container. 34 | 35 | `notify(self, _iid, _action)` 36 | : Reload UI when notified 37 | 38 | `parseFiles(self)` 39 | : Ask user to import existing files to import. 40 | 41 | `refreshUI(self)` 42 | : Reload informations and renew widgets 43 | 44 | `startAutoscan(self)` 45 | : Start an automatic scan. Will try to launch all undone tools. 46 | 47 | `stop(self)` 48 | : Stop an automatic scan. Will try to stop running tools. 49 | 50 | `stopAutoscan(self)` 51 | : Stop an automatic scan. Will terminate celery running tasks. -------------------------------------------------------------------------------- /documentation/pdoc/Pollenisator/core/Views/CommandGroupView.md: -------------------------------------------------------------------------------- 1 | Module Pollenisator.core.Views.CommandGroupView 2 | =============================================== 3 | View for command group object. Handle node in treeview and present forms to user when interacted with. 4 | 5 | Classes 6 | ------- 7 | 8 | `CommandGroupView(appTw, appViewFrame, mainApp, controller)` 9 | : View for command group object. Handle node in treeview and present forms to user when interacted with. 10 | Attributes: 11 | icon: icon name to show in treeview. Icon filename must be in icon directory. 12 | 13 | Constructor 14 | Args: 15 | appTw: a PollenisatorTreeview instance to put this view in 16 | appViewFrame: an view frame to build the forms in. 17 | mainApp: the Application instance 18 | controller: a CommandController for this view. 19 | 20 | ### Ancestors (in MRO) 21 | 22 | * core.Views.ViewElement.ViewElement 23 | 24 | ### Class variables 25 | 26 | `icon` 27 | : 28 | 29 | ### Methods 30 | 31 | `addInTreeview(self, parentNode=None)` 32 | : Add this view in treeview. Also stores infos in application treeview. 33 | Args: 34 | parentNode: not used 35 | 36 | `getParent(self)` 37 | : Return the id of the parent node in treeview. 38 | 39 | Returns: 40 | return the saved group_command_node node inside the Appli class. 41 | 42 | `openInsertWindow(self)` 43 | : Creates a tkinter form using Forms classes. This form aims to insert a new CommandGroup 44 | 45 | `openModifyWindow(self)` 46 | : Creates a tkinter form using Forms classes. This form aims to update or delete an existing CommandGroup -------------------------------------------------------------------------------- /documentation/pdoc/Pollenisator/core/Forms/Form.md: -------------------------------------------------------------------------------- 1 | Module Pollenisator.core.Forms.Form 2 | =================================== 3 | Describe custom tkinter widgets or extended tkinter widgets 4 | 5 | Classes 6 | ------- 7 | 8 | `Form(name)` 9 | : Describe custom tkinter widgets or extended tkinter widgets 10 | Form field empty, should be inherited to create a new Form. 11 | 12 | Constructor for an empty form. 13 | 14 | Args: 15 | name: the button text. 16 | 17 | ### Methods 18 | 19 | `checkForm(self)` 20 | : Check if this form is correctly filled. 21 | 22 | Returns: 23 | { 24 | "correct": True if the form is correctly filled, False otherwise. 25 | "msg": A message indicating what is not correctly filled. 26 | } 27 | 28 | `constructView(self, parent)` 29 | : Create the view inside the parent view given 30 | Args: 31 | parent: parent tkinter container widget 32 | 33 | `getKw(self, key, default)` 34 | : Read and delete the given key inside the stored kwargs. 35 | If key does not exist, default will be returned. 36 | Args: 37 | key: the key matching the wanted value in kwargs 38 | default: a default value to be returned in case the key does not exist. 39 | 40 | `getValue(self)` 41 | : Return the form value. Required for a form. 42 | 43 | Returns: 44 | Return None 45 | 46 | `setFocus(self)` 47 | : Defines what item should be focused inside the form widget 48 | 49 | `setValue(self, newval)` 50 | : Set the form value. Required for a form. 51 | Args: 52 | newval: new value to be setted -------------------------------------------------------------------------------- /documentation/pdoc/Pollenisator/core/Application/Dialogs/ChildDialogProgress.md: -------------------------------------------------------------------------------- 1 | Module Pollenisator.core.Application.Dialogs.ChildDialogProgress 2 | ================================================================ 3 | Show a progess bar for the user. 4 | 5 | Classes 6 | ------- 7 | 8 | `ChildDialogProgress(parent, title, msg, length=200, progress_mode='indeterminate')` 9 | : Open a child dialog of a tkinter application to inform the user about a ongoing process. 10 | 11 | Open a child dialog of a tkinter application to display a progress bar. 12 | 13 | Args: 14 | parent: the tkinter parent view to use for this window construction. 15 | title: Title for the new window 16 | msg: Message to display on the window to inform about a progession. 17 | length: Length of the progress bar, default to 200 18 | progress_mode: mode of progression. Either "determinate" or "inderterminate". Default to the second. 19 | indeterminate: bouncing progress bar. 20 | determinate: Show progression of a value against a max value. 21 | 22 | ### Methods 23 | 24 | `destroy(self)` 25 | : Close the window and stop the progressbar. 26 | 27 | `show(self, maximum=None, startValue=0)` 28 | : Start displaying the progressbar. 29 | Args: 30 | - maximum: only for determinate mode. Set the goal value. Default to None. 31 | - startValue: only for determinate mode. Set the starting value. Default to None. 32 | 33 | `update(self, value=None)` 34 | : Update the progressbar and show progression value. 35 | Call this regularly if on inderminate mode. 36 | Args: 37 | - value: The new value for the progressbar. Default to None. -------------------------------------------------------------------------------- /core/Forms/FormLabel.py: -------------------------------------------------------------------------------- 1 | """Describe tkinter Label with default common args""" 2 | 3 | import tkinter as tk 4 | from core.Forms.Form import Form 5 | 6 | 7 | class FormLabel(Form): 8 | """ 9 | Form field representing a label. 10 | Default setted values: 11 | width=500 12 | if pack : padx = pady = 5, side = left 13 | if grid: row = column = 0 sticky = "East" 14 | """ 15 | def __init__(self, name, text, **kwargs): 16 | """ 17 | Constructor for a form label 18 | Args: 19 | name: the label name. 20 | text: the text showed by the label. 21 | kwargs: same keyword args as you would give to ttk.Label 22 | """ 23 | super().__init__(name) 24 | self.text = text 25 | self.kwargs = kwargs 26 | 27 | def constructView(self, parent): 28 | """ 29 | Create the label view inside the parent view given 30 | 31 | Args: 32 | parent: parent FormPanel. 33 | """ 34 | lbl = tk.Message(parent.panel, text=self.name+" : "+self.text, bg="white", width=self.getKw("width", 500), justify=tk.LEFT) 35 | if parent.gridLayout: 36 | 37 | lbl.grid(column=self.getKw("column", 0), row=self.getKw("row", 0), sticky=self.getKw("sticky", tk.E) , padx=self.getKw("padx", 5), pady=self.getKw("pady", 5), **self.kwargs) 38 | else: 39 | lbl.pack(side=self.getKw("side", "left"), padx=self.getKw("padx", 10), pady=self.getKw("pady", 5), **self.kwargs) 40 | 41 | def getValue(self): 42 | """ 43 | Return the form value. Required for a form. 44 | 45 | Returns: 46 | Return the label text. 47 | """ 48 | return self.text 49 | 50 | def setValue(self, _newval): 51 | """nothing to set so overwrite 52 | Args: 53 | _newval: not used""" 54 | return -------------------------------------------------------------------------------- /documentation/pdoc/Pollenisator/core/plugins/SSHScan.md: -------------------------------------------------------------------------------- 1 | Module Pollenisator.core.plugins.SSHScan 2 | ======================================== 3 | A plugin to parse sshscan 4 | 5 | Classes 6 | ------- 7 | 8 | `SSHScan()` 9 | : Parent base plugin to be inherited 10 | Attributes: 11 | autoDetect: indicating to auto-detect that this plugin is able to auto detect. 12 | 13 | ### Ancestors (in MRO) 14 | 15 | * core.plugins.plugin.Plugin 16 | 17 | ### Methods 18 | 19 | `Parse(self, file_opened, **_kwargs)` 20 | : Parse a opened file to extract information 21 | Args: 22 | file_opened: the open file 23 | _kwargs: not used 24 | Returns: 25 | a tuple with 4 values (All set to None if Parsing wrong file): 26 | 0. notes: notes to be inserted in tool giving direct info to pentester 27 | 1. tags: a list of tags to be added to tool 28 | 2. lvl: the level of the command executed to assign to given targets 29 | 3. targets: a list of composed keys allowing retrieve/insert from/into database targerted objects. 30 | 31 | `checkReturnCode(self, _returncode)` 32 | : Default check for return code 33 | Returns: 34 | Always True. To be overidden 35 | 36 | `getFileOutputArg(self)` 37 | : Returns the command line paramater giving the output file 38 | Returns: 39 | string 40 | 41 | `getFileOutputExt(self)` 42 | : Returns the expected file extension for this command result file 43 | Returns: 44 | string 45 | 46 | `getFileOutputPath(self, commandExecuted)` 47 | : Returns the output file path given in the executed command using getFileOutputArg 48 | Args: 49 | commandExecuted: the command that was executed with an output file inside. 50 | Returns: 51 | string: the path to file created -------------------------------------------------------------------------------- /core/Forms/FormImage.py: -------------------------------------------------------------------------------- 1 | """Describe tkinter Label as image with default common args""" 2 | 3 | import tkinter as tk 4 | from core.Forms.Form import Form 5 | from PIL import ImageTk, Image 6 | 7 | 8 | class FormImage(Form): 9 | """ 10 | Form field representing a label Image. 11 | Default setted values: 12 | if pack : padx = pady = 5, side = left 13 | if grid: row = column = 0 sticky = "East" 14 | """ 15 | def __init__(self, path, **kwargs): 16 | """ 17 | Constructor for a form label 18 | Args: 19 | path: the path to the image 20 | kwargs: same keyword args as you would give to ttk.Label 21 | """ 22 | super().__init__("Image") 23 | self.path = path 24 | self.kwargs = kwargs 25 | 26 | def constructView(self, parent): 27 | """ 28 | Create the label view inside the parent view given 29 | 30 | Args: 31 | parent: parent FormPanel. 32 | """ 33 | self.img = Image.open(self.path) 34 | self.tkimage = ImageTk.PhotoImage(self.img) 35 | self.lbl = tk.Label(parent.panel, image=self.tkimage, bg="white", justify=tk.LEFT) 36 | if parent.gridLayout: 37 | self.lbl.grid(column=self.getKw("column", 0), row=self.getKw("row", 0), sticky=self.getKw("sticky", tk.E) , padx=self.getKw("padx", 5), pady=self.getKw("pady", 5), **self.kwargs) 38 | else: 39 | self.lbl.pack(side=self.getKw("side", "left"), padx=self.getKw("padx", 10), pady=self.getKw("pady", 5), **self.kwargs) 40 | 41 | 42 | def setImage(self, newPath): 43 | """nothing to set so overwrite 44 | Args: 45 | _newval: not used""" 46 | self.path = newPath 47 | self.img = Image.open(newPath) 48 | self.tkimage = ImageTk.PhotoImage(self.img) 49 | self.lbl.configure(image=self.tkimage) 50 | self.lbl.image = self.tkimage 51 | -------------------------------------------------------------------------------- /core/Application/Dialogs/ChildDialogQuestion.py: -------------------------------------------------------------------------------- 1 | """Ask a question to the user. 2 | """ 3 | import tkinter as tk 4 | import tkinter.ttk as ttk 5 | 6 | 7 | class ChildDialogQuestion: 8 | """ 9 | Open a child dialog of a tkinter application to ask a question. 10 | """ 11 | 12 | def __init__(self, parent, title, question, answers=("Yes", "No")): 13 | """ 14 | Open a child dialog of a tkinter application to ask a question. 15 | 16 | Args: 17 | parent: the tkinter parent view to use for this window construction. 18 | title: title of the new window 19 | question: question to answer 20 | answers: a tuple with possible answers. Default to ("Yes" ,"No") 21 | """ 22 | self.app = tk.Toplevel(parent) 23 | self.app.title(title) 24 | self.app.resizable(False, False) 25 | appFrame = ttk.Frame(self.app) 26 | self.rvalue = None 27 | self.parent = parent 28 | lbl = ttk.Label(appFrame, text=question) 29 | lbl.pack(side=tk.TOP, padx=10, pady=10, fill=tk.X) 30 | buttonsFrame = ttk.Frame(appFrame) 31 | for i, answer in enumerate(answers): 32 | _button = ttk.Button(buttonsFrame, text=answer) 33 | _button.bind("", self.onOk) 34 | _button.grid(row=0, column=i, padx=15) 35 | buttonsFrame.pack(side=tk.TOP, ipadx=5, pady=5) 36 | appFrame.pack(fill=tk.BOTH) 37 | self.app.transient(parent) 38 | try: 39 | self.app.wait_visibility() 40 | self.app.grab_set() 41 | except tk.TclError: 42 | pass 43 | 44 | def onOk(self, event): 45 | """ 46 | Called when the user clicked the validation button. 47 | Set the rvalue attributes to the answer string choosen. 48 | """ 49 | # send the data to the parent 50 | self.rvalue = event.widget["text"] 51 | self.app.destroy() 52 | -------------------------------------------------------------------------------- /documentation/pdoc/Pollenisator/core/Controllers/IntervalController.md: -------------------------------------------------------------------------------- 1 | Module Pollenisator.core.Controllers.IntervalController 2 | ======================================================= 3 | Controller for interval object. Mostly handles conversion between mongo data and python objects 4 | 5 | Classes 6 | ------- 7 | 8 | `IntervalController(model)` 9 | : Inherits ControllerElement 10 | Controller for interval object. Mostly handles conversion between mongo data and python objects 11 | 12 | Constructor 13 | Args: 14 | model: Any instance of classe that inherits core.Models.Element 15 | 16 | ### Ancestors (in MRO) 17 | 18 | * core.Controllers.ControllerElement.ControllerElement 19 | 20 | ### Methods 21 | 22 | `doInsert(self, values)` 23 | : Insert the Interval represented by this model in the database with the given values. 24 | 25 | Args: 26 | values: A dictionary crafted by IntervalView containg all form fields values needed. 27 | 28 | Returns: 29 | { 30 | '_id': The mongo ObjectId _id of the inserted command document. 31 | 'nbErrors': The number of objects that has not been inserted in database due to errors. 32 | } 33 | 34 | `doUpdate(self, values)` 35 | : Update the Interval represented by this model in database with the given values. 36 | 37 | Args: 38 | values: A dictionary crafted by IntervalView containg all form fields values needed. 39 | 40 | Returns: 41 | The mongo ObjectId _id of the updated interval document. 42 | 43 | `getData(self)` 44 | : Return interval attributes as a dictionnary matching Mongo stored intervals 45 | Returns: 46 | dict with keys wave, dated, datef, _id, tags and infos 47 | 48 | `getType(self)` 49 | : Return a string describing the type of object 50 | Returns: 51 | "interval" -------------------------------------------------------------------------------- /documentation/pdoc/Pollenisator/core/Controllers/CommandController.md: -------------------------------------------------------------------------------- 1 | Module Pollenisator.core.Controllers.CommandController 2 | ====================================================== 3 | Controller for command object. Mostly handles conversion between mongo data and python objects 4 | 5 | Classes 6 | ------- 7 | 8 | `CommandController(model)` 9 | : Inherits ControllerElement 10 | Controller for command object. Mostly handles conversion between mongo data and python objects 11 | 12 | Constructor 13 | Args: 14 | model: Any instance of classe that inherits core.Models.Element 15 | 16 | ### Ancestors (in MRO) 17 | 18 | * core.Controllers.ControllerElement.ControllerElement 19 | 20 | ### Methods 21 | 22 | `doInsert(self, values)` 23 | : Insert the command represented by this model in the database with the given values. 24 | 25 | Args: 26 | values: A dictionary crafted by CommandView containg all form fields values needed. 27 | 28 | Returns: 29 | { 30 | 'Command': The Command object associated 31 | 'nbErrors': The number of objects that has not been inserted in database due to errors. 32 | } 33 | 34 | `doUpdate(self, values)` 35 | : Update the command represented by this self.model in database with the given values. 36 | 37 | Args: 38 | values: A dictionary crafted by CommandView containg all form fields values needed. 39 | 40 | Returns: 41 | The mongo ObjectId _id of the updated command document. 42 | 43 | `getData(self)` 44 | : Return command attributes as a dictionnary matching Mongo stored commands 45 | Returns: 46 | dict with keys name, lvl, safe, text, ports, sleep_between, max_thread, priority, types, _id, tags and infos 47 | 48 | `getType(self)` 49 | : Return a string describing the type of object 50 | Returns: 51 | "command" -------------------------------------------------------------------------------- /core/Components/Modules/Terminal.py: -------------------------------------------------------------------------------- 1 | import os 2 | from shutil import which 3 | import tkinter.messagebox 4 | 5 | import core.Components.Utils as Utils 6 | from core.Components.mongo import MongoCalendar 7 | 8 | class Terminal: 9 | iconName = "tab_terminal.png" 10 | tabName = " Terminal " 11 | 12 | def __init__(self, parent, settings): 13 | self.settings = settings 14 | 15 | def initUI(self, parent, nbk, treevw): 16 | return 17 | 18 | def open(self): 19 | mainDir = os.path.normpath(Utils.getMainDir()) 20 | mongoInstance = MongoCalendar.getInstance() 21 | with open(os.path.join(mainDir, "setupTerminalForPentest.sh"), "r") as f: 22 | data = f.read() 23 | lines = data.split("\n") 24 | lines[0] = "POLLENISATOR_CURRENT_DB="+str(mongoInstance.calendarName) 25 | data = "\n".join(lines) 26 | with open(os.path.join(mainDir, "setupTerminalForPentest.sh"), "w") as f: 27 | f.write(data) 28 | favorite = self.settings.getFavoriteTerm() 29 | if favorite is None: 30 | tkinter.messagebox.showerror("Terminal settings invalid", "None of the terminals given in the settings are installed on this computer.") 31 | return False 32 | 33 | if which(favorite) is not None: 34 | terms = self.settings.getTerms() 35 | terms_dict = {} 36 | for term in terms: 37 | terms_dict[term.split(" ")[0]] = term 38 | command_term = terms_dict.get(favorite, None) 39 | if command_term is not None: 40 | Utils.execute(terms_dict[favorite]) 41 | return True 42 | else: 43 | tkinter.messagebox.showerror("Terminal settings invalid", "Check your terminal settings") 44 | else: 45 | tkinter.messagebox.showerror("Terminal settings invalid", "The selected favorite terminal is not available on this computer.") 46 | return False 47 | -------------------------------------------------------------------------------- /documentation/pdoc/Pollenisator/core/Controllers/CommandGroupController.md: -------------------------------------------------------------------------------- 1 | Module Pollenisator.core.Controllers.CommandGroupController 2 | =========================================================== 3 | Controller for command group object. Mostly handles conversion between mongo data and python objects 4 | 5 | Classes 6 | ------- 7 | 8 | `CommandGroupController(model)` 9 | : Inherits ControllerElement 10 | Controller for command group object. Mostly handles conversion between mongo data and python objects 11 | 12 | Constructor 13 | Args: 14 | model: Any instance of classe that inherits core.Models.Element 15 | 16 | ### Ancestors (in MRO) 17 | 18 | * core.Controllers.ControllerElement.ControllerElement 19 | 20 | ### Methods 21 | 22 | `doInsert(self, values)` 23 | : Insert the command group represented by this model in the database with the given values. 24 | 25 | Args: 26 | values: A dictionary crafted by CommandGroupView containg all form fields values needed. 27 | 28 | Returns: 29 | { 30 | '_id': The mongo ObjectId _id of the inserted command document. 31 | 'nbErrors': The number of objects that has not been inserted in database due to errors. 32 | } 33 | 34 | `doUpdate(self, values)` 35 | : Update the command group represented by this model in database with the given values. 36 | 37 | Args: 38 | values: A dictionary crafted by CommandGroupView containg all form fields values needed. 39 | 40 | Returns: 41 | The mongo ObjectId _id of the updated command group document. 42 | 43 | `getData(self)` 44 | : Return command attributes as a dictionnary matching Mongo stored commands groups 45 | Returns: 46 | dict with keys name, commands,, sleep_between, max_thread, _id, tags and infos 47 | 48 | `getType(self)` 49 | : Return a string describing the type of object 50 | Returns: 51 | "commandgroup" -------------------------------------------------------------------------------- /documentation/pdoc/Pollenisator/core/Forms/FormCombo.md: -------------------------------------------------------------------------------- 1 | Module Pollenisator.core.Forms.FormCombo 2 | ======================================== 3 | Describe tkinter combobox with default common args 4 | 5 | Classes 6 | ------- 7 | 8 | `FormCombo(name, choicesList, default, **kwargs)` 9 | : Form field representing a combobox. 10 | Default setted values: 11 | state="readonly" 12 | if pack : padx = pady = 5, side = "right" 13 | if grid: row = column = 0 sticky = "west" 14 | Additional values to kwargs: 15 | binds: a dictionnary of tkinter binding with shortcut as key and callback as value 16 | 17 | Constructor for a form checkbox 18 | 19 | Args: 20 | name: the checklist name (id). 21 | choicesList: a list of string forming all the possible choices. 22 | default: a list of string that should be prechecked if in the choice list. 23 | kwargs: same keyword args as you would give to ttk.Combobox 24 | 25 | ### Ancestors (in MRO) 26 | 27 | * core.Forms.Form.Form 28 | 29 | ### Methods 30 | 31 | `checkForm(self)` 32 | : Check if this form is correctly filled. Formal verification if the selected value is still on the choice list. 33 | 34 | Returns: 35 | { 36 | "correct": True if the form is correctly filled, False otherwise. 37 | "msg": A message indicating what is not correctly filled. 38 | } 39 | 40 | `constructView(self, parent)` 41 | : Create the combobox view inside the parent view given 42 | 43 | Args: 44 | parent: parent FormPanel. 45 | 46 | `getValue(self)` 47 | : Return the form value. Required for a form. 48 | 49 | Returns: 50 | Return the selected text inside the comboxbox. 51 | 52 | `setFocus(self)` 53 | : Set the focus to the ttk combobox. 54 | 55 | `setValue(self, newval)` 56 | : Set the combo value. 57 | Args: 58 | newval: the new value to be set inside the combobox -------------------------------------------------------------------------------- /core/Forms/FormButton.py: -------------------------------------------------------------------------------- 1 | """Describe tkinter button with default common args""" 2 | import tkinter as tk 3 | import tkinter.ttk as ttk 4 | 5 | from core.Forms.Form import Form 6 | 7 | 8 | class FormButton(Form): 9 | """ 10 | Form field representing a button. 11 | Default setted values: 12 | if pack : padx = pady = 5, side = right 13 | if grid: row = column = 0 sticky = "west 14 | """ 15 | 16 | def __init__(self, name, callback, **kwargs): 17 | """ 18 | Constructor for a form button 19 | 20 | Args: 21 | name: the button text. 22 | callback: a function that will be called when the button is clicked. 23 | kwargs: same keyword args as you would give to ttk.Button 24 | """ 25 | super().__init__(name) 26 | self.callback = callback 27 | self.kwargs = kwargs 28 | self.btn = None 29 | self.wid_kwargs = None 30 | 31 | def constructView(self, parent): 32 | """ 33 | Create the button view inside the parent view given 34 | 35 | Args: 36 | parent: parent form panel. 37 | """ 38 | self.btn = ttk.Button(parent.panel, text=self.name, image=self.getKw("image", None)) 39 | if parent.gridLayout: 40 | self.btn.grid(row=self.getKw("row", 0), column=self.getKw("column", 0), sticky=self.getKw("sticky", tk.W), **self.kwargs) 41 | else: 42 | self.btn.pack(side=self.getKw("side", "right"), padx=self.getKw("padx", 5), pady=self.getKw("pady", 5), **self.kwargs) 43 | self.btn.bind('', self.callback) 44 | if self.wid_kwargs is not None: 45 | self.btn.configure(**self.wid_kwargs) 46 | 47 | def configure(self, **kwargs): 48 | """Change kwargs to given one. Must be called before constructView 49 | Args: 50 | **kwargs: any ttk Button keyword arguments.""" 51 | self.wid_kwargs = kwargs 52 | 53 | def setFocus(self): 54 | """Set the focus to the ttk button. 55 | """ 56 | self.btn.focus_set() -------------------------------------------------------------------------------- /documentation/pdoc/Pollenisator/core/plugins/Sublist3r.md: -------------------------------------------------------------------------------- 1 | Module Pollenisator.core.plugins.Sublist3r 2 | ========================================== 3 | A plugin to parse sublist3r 4 | 5 | Classes 6 | ------- 7 | 8 | `Sublist3r()` 9 | : Parent base plugin to be inherited 10 | Attributes: 11 | autoDetect: indicating to auto-detect that this plugin is able to auto detect. 12 | 13 | ### Ancestors (in MRO) 14 | 15 | * core.plugins.plugin.Plugin 16 | 17 | ### Methods 18 | 19 | `Parse(self, file_opened, **_kwargs)` 20 | : Parse a opened file to extract information 21 | Args: 22 | file_opened: the open file 23 | _kwargs: not used 24 | Returns: 25 | a tuple with 4 values (All set to None if Parsing wrong file): 26 | 0. notes: notes to be inserted in tool giving direct info to pentester 27 | 1. tags: a list of tags to be added to tool 28 | 2. lvl: the level of the command executed to assign to given targets 29 | 3. targets: a list of composed keys allowing retrieve/insert from/into database targerted objects. 30 | 31 | `checkReturnCode(self, returncode)` 32 | : Check if the command was executed successfully using the final exit code. 33 | Args: 34 | returncode: the exit code of the command executed. 35 | Returns: 36 | bool: True if successful returncode, False otherwise. 37 | 38 | `getFileOutputArg(self)` 39 | : Returns the command line paramater giving the output file 40 | Returns: 41 | string 42 | 43 | `getFileOutputExt(self)` 44 | : Returns the expected file extension for this command result file 45 | Returns: 46 | string 47 | 48 | `getFileOutputPath(self, commandExecuted)` 49 | : Returns the output file path given in the executed command using getFileOutputArg 50 | Args: 51 | commandExecuted: the command that was executed with an output file inside. 52 | Returns: 53 | string: the path to file created -------------------------------------------------------------------------------- /documentation/pdoc/Pollenisator/core/plugins/EternalBlue.md: -------------------------------------------------------------------------------- 1 | Module Pollenisator.core.plugins.EternalBlue 2 | ============================================ 3 | A plugin to parse namp script ms17-010 scan 4 | 5 | Classes 6 | ------- 7 | 8 | `EternalBlue()` 9 | : Parent base plugin to be inherited 10 | Attributes: 11 | autoDetect: indicating to auto-detect that this plugin is able to auto detect. 12 | 13 | ### Ancestors (in MRO) 14 | 15 | * core.plugins.plugin.Plugin 16 | 17 | ### Methods 18 | 19 | `Parse(self, file_opened, **kwargs)` 20 | : Parse a opened file to extract information 21 | Args: 22 | file_opened: the open file 23 | _kwargs: not used 24 | Returns: 25 | a tuple with 4 values (All set to None if Parsing wrong file): 26 | 0. notes: notes to be inserted in tool giving direct info to pentester 27 | 1. tags: a list of tags to be added to tool 28 | 2. lvl: the level of the command executed to assign to given targets 29 | 3. targets: a list of composed keys allowing retrieve/insert from/into database targerted objects. 30 | 31 | `checkReturnCode(self, returncode)` 32 | : Check if the command was executed successfully using the final exit code. 33 | Args: 34 | returncode: the exit code of the command executed. 35 | Returns: 36 | bool: True if successful returncode, False otherwise. 37 | 38 | `getFileOutputArg(self)` 39 | : Returns the command line paramater giving the output file 40 | Returns: 41 | string 42 | 43 | `getFileOutputExt(self)` 44 | : Returns the expected file extension for this command result file 45 | Returns: 46 | string 47 | 48 | `getFileOutputPath(self, commandExecuted)` 49 | : Returns the output file path given in the executed command using getFileOutputArg 50 | Args: 51 | commandExecuted: the command that was executed with an output file inside. 52 | Returns: 53 | string: the path to file created -------------------------------------------------------------------------------- /documentation/pdoc/Pollenisator/core/plugins/SearchSploit.md: -------------------------------------------------------------------------------- 1 | Module Pollenisator.core.plugins.SearchSploit 2 | ============================================= 3 | A plugin to parse python reverse searchsploit scan 4 | 5 | Classes 6 | ------- 7 | 8 | `SearchSploit()` 9 | : Parent base plugin to be inherited 10 | Attributes: 11 | autoDetect: indicating to auto-detect that this plugin is able to auto detect. 12 | 13 | ### Ancestors (in MRO) 14 | 15 | * core.plugins.plugin.Plugin 16 | 17 | ### Methods 18 | 19 | `Parse(self, file_opened, **_kwargs)` 20 | : Parse a opened file to extract information 21 | Args: 22 | file_opened: the open file 23 | _kwargs: not used 24 | Returns: 25 | a tuple with 4 values (All set to None if Parsing wrong file): 26 | 0. notes: notes to be inserted in tool giving direct info to pentester 27 | 1. tags: a list of tags to be added to tool 28 | 2. lvl: the level of the command executed to assign to given targets 29 | 3. targets: a list of composed keys allowing retrieve/insert from/into database targerted objects. 30 | 31 | `checkReturnCode(self, returncode)` 32 | : Check if the command was executed successfully using the final exit code. 33 | Args: 34 | returncode: the exit code of the command executed. 35 | Returns: 36 | bool: True if successful returncode, False otherwise. 37 | 38 | `getFileOutputArg(self)` 39 | : Returns the command line paramater giving the output file 40 | Returns: 41 | string 42 | 43 | `getFileOutputExt(self)` 44 | : Returns the expected file extension for this command result file 45 | Returns: 46 | string 47 | 48 | `getFileOutputPath(self, commandExecuted)` 49 | : Returns the output file path given in the executed command using getFileOutputArg 50 | Args: 51 | commandExecuted: the command that was executed with an output file inside. 52 | Returns: 53 | string: the path to file created -------------------------------------------------------------------------------- /documentation/pdoc/Pollenisator/core/Controllers/ScopeController.md: -------------------------------------------------------------------------------- 1 | Module Pollenisator.core.Controllers.ScopeController 2 | ==================================================== 3 | Controller for Scope object. Mostly handles conversion between mongo data and python objects 4 | 5 | Classes 6 | ------- 7 | 8 | `ScopeController(model)` 9 | : Inherits ControllerElement 10 | Controller for Scope object. Mostly handles conversion between mongo data and python objects 11 | 12 | Constructor 13 | Args: 14 | model: Any instance of classe that inherits core.Models.Element 15 | 16 | ### Ancestors (in MRO) 17 | 18 | * core.Controllers.ControllerElement.ControllerElement 19 | 20 | ### Methods 21 | 22 | `doInsert(self, values)` 23 | : Insert the Scope represented by this model in the database with the given values. 24 | 25 | Args: 26 | values: A dictionary crafted by MultipleScopeView or ScopeView containg all form fields values needed. 27 | 28 | Returns: 29 | { 30 | '_id': The mongo ObjectId _id of the inserted command document. 31 | 'nbErrors': The number of objects that has not been inserted in database due to errors. 32 | } 33 | 34 | `doUpdate(self, values)` 35 | : Update the Scope represented by this model in database with the given values. 36 | 37 | Args: 38 | values: A dictionary crafted by ScopeView containg all form fields values needed. 39 | 40 | Returns: 41 | The mongo ObjectId _id of the updated Scope document. 42 | 43 | `getData(self)` 44 | : Return scope attributes as a dictionnary matching Mongo stored scopes 45 | Returns: 46 | dict with keys wave, scope, notes, _id, tags and infos 47 | 48 | `getTools(self)` 49 | : Return scope assigned tools as a list of mongo fetched tools dict 50 | Returns: 51 | list of defect raw mongo data dictionnaries 52 | 53 | `getType(self)` 54 | : Returns a string describing the type of object 55 | Returns: 56 | "scope" -------------------------------------------------------------------------------- /core/Application/Dialogs/ChildDialogExportSelection.py: -------------------------------------------------------------------------------- 1 | """ChildDialogExportSelection class 2 | Ask the user to select fields and returns the selected options""" 3 | import tkinter as tk 4 | import tkinter.ttk as ttk 5 | from core.Forms.FormPanel import FormPanel 6 | from core.Views.ViewElement import ViewElement 7 | 8 | 9 | class ChildDialogExportSelection: 10 | """ 11 | Open a child dialog of a tkinter application to ask the user to select fields between many. 12 | """ 13 | 14 | def __init__(self, parent, keys): 15 | """ 16 | Open a child dialog of a tkinter application to ask details about 17 | an export of treeview items. 18 | 19 | Args: 20 | parent: the tkinter parent view to use for this window construction. 21 | keys: The keys to export 22 | """ 23 | self.rvalue = None 24 | self.parent = parent 25 | self.app = tk.Toplevel(parent) 26 | self.app.title("Export selection") 27 | appFrame = ttk.Frame(self.app) 28 | self.form = FormPanel() 29 | self.form.addFormChecklist("Fields", sorted(keys), []) 30 | self.form.addFormButton("Export", self.onOk) 31 | self.rvalue = None 32 | self.form.constructView(appFrame) 33 | appFrame.pack(ipadx=10, ipady=10) 34 | self.app.transient(parent) 35 | self.app.wait_visibility() 36 | self.app.grab_set() 37 | 38 | def onOk(self, _event=None): 39 | """Called the the Export button is pressed. 40 | return a list of strings corresponding to the selected fields. 41 | 42 | Args: 43 | _event: not used but mandatory""" 44 | res, msg = self.form.checkForm() 45 | if res: 46 | form_values = self.form.getValue() 47 | form_values_as_dicts = ViewElement.list_tuple_to_dict(form_values) 48 | mfields = form_values_as_dicts["Fields"] 49 | fields = [k for k, v in mfields.items() if v == 1] 50 | self.rvalue = fields 51 | self.app.destroy() 52 | else: 53 | tk.messagebox.showwarning( 54 | "Form not validated", msg, parent=self.app) 55 | -------------------------------------------------------------------------------- /documentation/pdoc/Pollenisator/core/plugins/BlueKeep.md: -------------------------------------------------------------------------------- 1 | Module Pollenisator.core.plugins.BlueKeep 2 | ========================================= 3 | A plugin to parse a bluekeep scan : rdpscan 4 | 5 | Classes 6 | ------- 7 | 8 | `BlueKeep()` 9 | : Inherits Plugin 10 | A plugin to parse a bluekeep scan : rdpscan 11 | 12 | ### Ancestors (in MRO) 13 | 14 | * core.plugins.plugin.Plugin 15 | 16 | ### Methods 17 | 18 | `Parse(self, file_opened, **kwargs)` 19 | : Parse a opened file to extract information 20 | Example file: 21 | 10.0.0.1 - UNKNOWN - no connection - timeout 22 | 10.0.0.2 - VULNERABLE - ?? - ???? 23 | 24 | Args: 25 | file_opened: the open file 26 | kwargs: port("") and proto("") are valid 27 | Returns: 28 | a tuple with 4 values (All set to None if Parsing wrong file): 29 | 0. notes: notes to be inserted in tool giving direct info to pentester 30 | 1. tags: a list of tags to be added to tool 31 | 2. lvl: the level of the command executed to assign to given targets 32 | 3. targets: a list of composed keys allowing retrieve/insert from/into database targerted objects. 33 | 34 | `checkReturnCode(self, returncode)` 35 | : Check if the command was executed successfully using the final exit code. 36 | Args: 37 | returncode: the exit code of the command executed. 38 | Returns: 39 | bool: True if successful returncode, False otherwise. 40 | 41 | `getFileOutputArg(self)` 42 | : Returns the command line paramater giving the output file 43 | Returns: 44 | string 45 | 46 | `getFileOutputExt(self)` 47 | : Returns the expected file extension for this command result file 48 | Returns: 49 | string 50 | 51 | `getFileOutputPath(self, commandExecuted)` 52 | : Returns the output file path given in the executed command using getFileOutputArg 53 | Args: 54 | commandExecuted: the command that was executed with an output file inside. 55 | Returns: 56 | string: the path to file created -------------------------------------------------------------------------------- /documentation/pdoc/Pollenisator/core/Forms/FormChecklist.md: -------------------------------------------------------------------------------- 1 | Module Pollenisator.core.Forms.FormChecklist 2 | ============================================ 3 | Widget with a list of checkbox packed and wrapping. A checkbox to check or uncheck all is at the top 4 | #TODO improve looking and constructing 5 | 6 | Classes 7 | ------- 8 | 9 | `FormChecklist(name, choicesList, default, **kwargs)` 10 | : Form field representing a checklist. 11 | Default setted values: 12 | if pack : padx = 10, pady = 5, side = top, fill = "x" 13 | if grid: row = column = 0 14 | 15 | Constructor for a form checklist 16 | Args: 17 | name: the checklist name (id). 18 | choicesList: a list of string forming all the possible choices. 19 | default: a list of string that should be prechecked if in the choice list. 20 | kwargs: same keyword args as you would give to ttk.Frame 21 | 22 | ### Ancestors (in MRO) 23 | 24 | * core.Forms.Form.Form 25 | 26 | ### Methods 27 | 28 | `checkForm(self)` 29 | : Check if this form is correctly filled. A checklist cannot be malformed. 30 | 31 | Returns: 32 | { 33 | "correct": True if the form is correctly filled, False otherwise. 34 | "msg": A message indicating what is not correctly filled. 35 | } 36 | 37 | `checkall(self)` 38 | : Will check all the checkbox or uncheck same depending on the checkbox state. 39 | 40 | `constructView(self, parent)` 41 | : Create the checlist view inside the parent view given 42 | 43 | Args: 44 | FormPanel: parent form panel. 45 | 46 | `getValue(self)` 47 | : Return the form value. Required for a form. 48 | 49 | Returns: 50 | Return a dictionnary of all checkboxs with texts as keys and 0 or 1 as value. 1 is if the checkbox was ticked. 51 | 52 | `setFocus(self)` 53 | : Set the focus to the first ttk checkbox of the list. 54 | 55 | `setValue(self, newval)` 56 | : Set value of checkboxes defined in given list. 57 | Args: 58 | newval: A list with checkbox texts. If a checkbox text matches one in the list, it will checked. -------------------------------------------------------------------------------- /core/Forms/Form.py: -------------------------------------------------------------------------------- 1 | """Describe custom tkinter widgets or extended tkinter widgets""" 2 | import tkinter as tk 3 | 4 | class Form(object): 5 | """ 6 | Describe custom tkinter widgets or extended tkinter widgets 7 | Form field empty, should be inherited to create a new Form. 8 | """ 9 | 10 | def __init__(self, name): 11 | """ 12 | Constructor for an empty form. 13 | 14 | Args: 15 | name: the button text. 16 | """ 17 | self.name = name 18 | self.val = tk.StringVar() 19 | self.kwargs = dict() 20 | 21 | def constructView(self, parent): 22 | """ 23 | Create the view inside the parent view given 24 | Args: 25 | parent: parent tkinter container widget 26 | """ 27 | # pass 28 | 29 | def getValue(self): 30 | """ 31 | Return the form value. Required for a form. 32 | 33 | Returns: 34 | Return None 35 | """ 36 | return None 37 | 38 | def setValue(self, newval): 39 | """ 40 | Set the form value. Required for a form. 41 | Args: 42 | newval: new value to be setted 43 | """ 44 | self.val.set(newval) 45 | 46 | def checkForm(self): 47 | """ 48 | Check if this form is correctly filled. 49 | 50 | Returns: 51 | { 52 | "correct": True if the form is correctly filled, False otherwise. 53 | "msg": A message indicating what is not correctly filled. 54 | } 55 | """ 56 | return True, "" 57 | 58 | def setFocus(self): 59 | """Defines what item should be focused inside the form widget""" 60 | return 61 | 62 | def getKw(self, key, default): 63 | """Read and delete the given key inside the stored kwargs. 64 | If key does not exist, default will be returned. 65 | Args: 66 | key: the key matching the wanted value in kwargs 67 | default: a default value to be returned in case the key does not exist. 68 | """ 69 | if key in self.kwargs: 70 | v = self.kwargs[key] 71 | del self.kwargs[key] 72 | return v 73 | return default -------------------------------------------------------------------------------- /core/Views/MultipleScopeView.py: -------------------------------------------------------------------------------- 1 | """View for scope list object. Present an multi insertion form to user when interacted with.""" 2 | 3 | from core.Views.ViewElement import ViewElement 4 | from core.Views.ScopeView import ScopeView 5 | 6 | 7 | class MultipleScopeView(ViewElement): 8 | """View for scope list object. Present an multi insertion form to user when interacted with.""" 9 | 10 | 11 | def openInsertWindow(self): 12 | """ 13 | Creates a tkinter form using Forms classes. This form aims to insert many new Scopes 14 | """ 15 | modelData = self.controller.getData() 16 | top_panel = self.form.addFormPanel(grid=True) 17 | top_panel.addFormLabel("Scopes") 18 | top_panel.addFormHelper( 19 | "Add Network IP 'XXX.XXX.XXX.XXX/XX' or domain names to the pentest's scope\nEach network/domain name must on a separated line", column=1) 20 | top_panel = self.form.addFormPanel() 21 | top_panel.addFormText("Scopes", r"^(?!https?://).+$", "", None, side="top") 22 | top_panel = self.form.addFormPanel() 23 | top_panel.addFormCheckbox( 24 | "Split", "Make ip range split into /24 at most", False, side="left") 25 | top_panel.addFormHelper( 26 | "This will split big ranges in smaller one. May slow pollenisator opening.\nBut you will have scan results quicker", side="left") 27 | top_panel = self.form.addFormPanel() 28 | top_panel.addFormCheckbox( 29 | "Settings", "Check domain scope", True, side="left") 30 | top_panel.addFormHelper( 31 | "If you want to insert a brand new scope in the scope, you will have to disable this security", side="left") 32 | self.form.addFormHidden("wave", modelData["wave"]) 33 | self.completeInsertWindow() 34 | 35 | def addChildrenBaseNodes(self, newNode): 36 | """ 37 | Add to the given node from a treeview the mandatory childrens. 38 | For a scope it is the tools parent node and the ips parent node. 39 | 40 | Args: 41 | newNode: the newly created node we want to add children to. 42 | """ 43 | ScopeView(self.appliTw, self.appliViewFrame, self.mainApp, 44 | self.controller).addChildrenBaseNodes(newNode) 45 | -------------------------------------------------------------------------------- /documentation/pdoc/Pollenisator/core/Views/WaveView.md: -------------------------------------------------------------------------------- 1 | Module Pollenisator.core.Views.WaveView 2 | ======================================= 3 | View for wavr object. Handle node in treeview and present forms to user when interacted with. 4 | 5 | Classes 6 | ------- 7 | 8 | `WaveView(appTw, appViewFrame, mainApp, controller)` 9 | : View for wavr object. Handle node in treeview and present forms to user when interacted with. 10 | Attributes: 11 | icon: icon name to show in treeview. Icon filename must be in icon directory 12 | 13 | Constructor 14 | Args: 15 | appTw: a PollenisatorTreeview instance to put this view in 16 | appViewFrame: an view frame to build the forms in. 17 | mainApp: the Application instance 18 | controller: a CommandController for this view. 19 | 20 | ### Ancestors (in MRO) 21 | 22 | * core.Views.ViewElement.ViewElement 23 | 24 | ### Class variables 25 | 26 | `icon` 27 | : 28 | 29 | ### Methods 30 | 31 | `addChildrenBaseNodes(self, newNode)` 32 | : Add to the given node from a treeview the mandatory childrens. 33 | For a wave it is the intervals parent node and the copes parent node. 34 | 35 | Args: 36 | newNode: the newly created node we want to add children to. 37 | Returns: 38 | * the created Intervals parent node 39 | * the created Scope parent node 40 | 41 | `addInTreeview(self, parentNode=None, addChildren=True)` 42 | : Add this view in treeview. Also stores infos in application treeview. 43 | Args: 44 | parentNode: if None, will calculate the parent. If setted, forces the node to be inserted inside given parentNode. 45 | addChildren: If False: skip interval, tools and scope insert. Useful when displaying search results. 46 | 47 | `getParent(self)` 48 | : Return the id of the parent node in treeview. 49 | 50 | Returns: 51 | return the saved waves_node inside the Appli class. 52 | 53 | `openInsertWindow(self)` 54 | : Creates a tkinter form using Forms classes. This form aims to insert a new Wave 55 | 56 | `openModifyWindow(self)` 57 | : Creates a tkinter form using Forms classes. This form aims to update or delete an existing Wave -------------------------------------------------------------------------------- /core/Views/MultiSelectionView.py: -------------------------------------------------------------------------------- 1 | """View for multi selected object clicked. Present an multi modify form to user when interacted with.""" 2 | 3 | from tkinter import ttk 4 | from core.Views.ViewElement import ViewElement 5 | from core.Components.Settings import Settings 6 | from bson.objectid import ObjectId 7 | from bson.errors import InvalidId 8 | 9 | class MultiSelectionView(ViewElement): 10 | """View for multi selected object clicked. Present an multi modify form to user when interacted with.""" 11 | 12 | def __init__(self, appliTw, appViewFrame, mainApp): 13 | super().__init__(appliTw, appViewFrame, mainApp, None) 14 | 15 | def tagClicked(self, name): 16 | """Separate callback to apply when a tag button is clicked 17 | Applies the clicked tag to all selected objects 18 | Args: 19 | name: tag name clicked 20 | """ 21 | return lambda _event: self.appliTw.setTagFromMenubar(name) 22 | 23 | def openModifyWindow(self): 24 | """ 25 | Creates a tkinter form using Forms classes. This form aims to update or perform actions on multiple different objects common properties like tags. 26 | """ 27 | top_panel = self.form.addFormPanel() 28 | top_panel.addFormButton("Export", self.appliTw.exportSelection) 29 | top_panel.addFormButton("Hide", self.appliTw.hideSelection) 30 | top_panel.addFormButton("Custom Command", self.appliTw.customCommand) 31 | top_panel.addFormButton("Delete", self.appliTw.deleteSelected) 32 | panTags = self.form.addFormPanel(grid=True) 33 | registeredTags = Settings.getTags() 34 | keys = list(registeredTags.keys()) 35 | column = 0 36 | listOfLambdas = [self.tagClicked(keys[i]) for i in range(len(keys))] 37 | for registeredTag, color in registeredTags.items(): 38 | s = ttk.Style(self.mainApp.parent) 39 | s.configure(""+color+".TButton", background=color, foreground="black") 40 | s.map(""+color+".TButton", foreground=[('active', "dark gray")], background=[('active', color)]) 41 | btn_tag = panTags.addFormButton(registeredTag, listOfLambdas[column], column=column) 42 | btn_tag.configure(style=""+color+".TButton") 43 | column += 1 44 | self.showForm() -------------------------------------------------------------------------------- /documentation/pdoc/Pollenisator/core/Forms/FormDate.md: -------------------------------------------------------------------------------- 1 | Module Pollenisator.core.Forms.FormDate 2 | ======================================= 3 | Widget with an entry to type a date and a calendar button to choose a date. 4 | 5 | Classes 6 | ------- 7 | 8 | `FormDate(name, root, default='', dateformat='%d/%m/%Y %H:%M:%S', **kwargs)` 9 | : Form field representing a date. 10 | Default setted values: 11 | state="readonly" 12 | if pack : padx = pady = 5, side = "right" 13 | if grid: row = column = 0 sticky = "west" 14 | 15 | Constructor for a form checkbox 16 | 17 | Args: 18 | name: the date name (id). 19 | root: the tkinter root window 20 | default: a list of string that should be prechecked if in the choice list. 21 | dateformat: a date format as a string see datetime.strptime documentation. 22 | kwargs: same keyword args as you would give to ttk.Frame 23 | 24 | ### Ancestors (in MRO) 25 | 26 | * core.Forms.Form.Form 27 | 28 | ### Methods 29 | 30 | `checkForm(self)` 31 | : Check if this form is correctly filled. Check with the dateformat given in constructorn or "None". 32 | 33 | Returns: 34 | { 35 | "correct": True if the form is correctly filled, False otherwise. 36 | "msg": A message indicating what is not correctly filled. 37 | } 38 | 39 | `constructView(self, parent)` 40 | : Create the date view inside the parent view given 41 | 42 | Args: 43 | parent: parent FormPanel. 44 | 45 | `getValue(self)` 46 | : Return the form value. Required for a form. 47 | 48 | Returns: 49 | Return the date as string text. 50 | 51 | `selectAll(self, _event)` 52 | : Callback to select all the text in the date Entry. 53 | Args: 54 | _event: mandatory but not used 55 | Returns: 56 | Returns the string "break" to prevent the event to be treated by the Entry, thus inserting unwanted value. 57 | 58 | `setFocus(self)` 59 | : Set the focus to the ttk entry part of the widget. 60 | 61 | `showDatePicker(self)` 62 | : Callback to start displaying the date picker calendar window 63 | Args: 64 | _event: mandatory but not used -------------------------------------------------------------------------------- /core/Controllers/IntervalController.py: -------------------------------------------------------------------------------- 1 | """Controller for interval object. Mostly handles conversion between mongo data and python objects""" 2 | 3 | from core.Controllers.ControllerElement import ControllerElement 4 | 5 | 6 | class IntervalController(ControllerElement): 7 | """Inherits ControllerElement 8 | Controller for interval object. Mostly handles conversion between mongo data and python objects""" 9 | 10 | def doUpdate(self, values): 11 | """ 12 | Update the Interval represented by this model in database with the given values. 13 | 14 | Args: 15 | values: A dictionary crafted by IntervalView containg all form fields values needed. 16 | 17 | Returns: 18 | The mongo ObjectId _id of the updated interval document. 19 | """ 20 | self.model.dated = values.get("Start date", self.model.dated) 21 | self.model.datef = values.get("End date", self.model.datef) 22 | self.model.update() 23 | 24 | def doInsert(self, values): 25 | """ 26 | Insert the Interval represented by this model in the database with the given values. 27 | 28 | Args: 29 | values: A dictionary crafted by IntervalView containg all form fields values needed. 30 | 31 | Returns: 32 | { 33 | '_id': The mongo ObjectId _id of the inserted command document. 34 | 'nbErrors': The number of objects that has not been inserted in database due to errors. 35 | } 36 | """ 37 | # Get form values 38 | dated = values["Start date"] 39 | datef = values["End date"] 40 | # Insert in database 41 | self.model.initialize(values["waveName"], dated, datef) 42 | ret, _ = self.model.addInDb() 43 | return ret, 0 # 0 errors 44 | 45 | def getData(self): 46 | """Return interval attributes as a dictionnary matching Mongo stored intervals 47 | Returns: 48 | dict with keys wave, dated, datef, _id, tags and infos 49 | """ 50 | return {"wave": self.model.wave, "dated": self.model.dated, "datef": self.model.datef, "_id": self.model.getId(), "tags": self.model.tags, "infos": self.model.infos} 51 | 52 | def getType(self): 53 | """Return a string describing the type of object 54 | Returns: 55 | "interval" """ 56 | return "interval" -------------------------------------------------------------------------------- /config/tools.d/tools.json: -------------------------------------------------------------------------------- 1 | {"Nmap.tcp": {"bin": "nmap", "plugin": "Nmap"}, "Nmap.top_udp": {"bin": "nmap", "plugin": "Nmap"}, "Nmap.bdd": {"bin": "nmap", "plugin": "Nmap"}, "Nmap.vpn": {"bin": "nmap", "plugin": "Nmap"}, "Nmap.supervision": {"bin": "nmap", "plugin": "Nmap"}, "Nmap.services": {"bin": "nmap", "plugin": "NmapServices"}, "Nmap.services.udp": {"bin": "nmap", "plugin": "NmapServices"}, "Nmap.services_scripts": {"bin": "nmap", "plugin": "Default"}, "Nmap.all.tcp": {"bin": "nmap", "plugin": "Nmap"}, "Nmap.ip.allTcp": {"bin": "nmap", "plugin": "Nmap"}, "Nmap.ip.udp": {"bin": "nmap", "plugin": "Nmap"}, "WhatWeb.http": {"bin": "whatweb", "plugin": "WhatWeb"}, "WhatWeb.https": {"bin": "whatweb", "plugin": "WhatWeb"}, "TestSSL": {"bin": "testssl.sh", "plugin": "TestSSL"}, "Nikto": {"bin": "nikto", "plugin": "Nikto"}, "digReverseLookUp": {"bin": "dig", "plugin": "DigReverseLookup"}, "pythonReverseLookUp": {"bin": "python", "plugin": "PythonReverseLookup"}, "Sublist3r": {"bin": "sublist3r.py", "plugin": "Sublist3r"}, "Dirsearch.http": {"bin": "dirsearch.py", "plugin": "Dirsearch"}, "Dirsearch.https": {"bin": "dirsearch.py", "plugin": "Dirsearch"}, "Knockpy": {"bin": "knockpy.py", "plugin": "Knockpy"}, "crtsh": {"bin": "crtsh.py", "plugin": "Crtsh"}, "ssh_scan": {"bin": "ssh_scan", "plugin": "SSHScan"}, "amap": {"bin": "amap", "plugin": "Default"}, "amap.udp": {"bin": "amap", "plugin": "Default"}, "http-methods": {"bin": "nmap", "plugin": "HttpMethods"}, "smbmap": {"bin": "smbmap.py", "plugin": "SmbMap"}, "smbmap_anon": {"bin": "smbmap.py", "plugin": "SmbMap"}, "smbmap_greybox": {"bin": "smbmap.py", "plugin": "SmbMap"}, "smb-enum-users": {"bin": "nmap", "plugin": "Default"}, "nmap-script-vuln": {"bin": "nmap", "plugin": "Default"}, "enum4linux": {"bin": "enum4linux.pl", "plugin": "Default"}, "ftp-anon": {"bin": "nmap", "plugin": "Default"}, "Nmap.quick": {"bin": "nmap", "plugin": "Nmap"}, "ike-scan": {"bin": "ike-scan", "plugin": "Default"}, "Nmap.verify.tcp": {"bin": "nmap", "plugin": "Nmap"}, "Nmap.verify.udp": {"bin": "nmap", "plugin": "Nmap"}, "CME.recon": {"bin": "cme", "plugin": "CME"}, "CME.usecreds": {"bin": "cme", "plugin": "CME"}, "eternalblue": {"bin": "nmap", "plugin": "EternalBlue"}, "bluekeep": {"bin": "rdpscan", "plugin": "BlueKeep"}, "openrelay": {"bin": "nmap", "plugin": "Default"}, "searchsploit": {"bin": "searchsploit", "plugin": "SearchSploit"}, "dnsrecon": {"bin": "dnsrecon", "plugin": "dnsrecon"}} 2 | -------------------------------------------------------------------------------- /core/Application/Dialogs/ChildDialogCombo.py: -------------------------------------------------------------------------------- 1 | """Defines a dialog window for choosing 1 between option many thourgh a combobox""" 2 | 3 | import tkinter as tk 4 | import tkinter.ttk as ttk 5 | 6 | 7 | class ChildDialogCombo: 8 | """ 9 | Open a child dialog of a tkinter application to ask a user a calendar name. 10 | """ 11 | 12 | def __init__(self, parent, options, displayMsg="Choose a database to open:", default=None): 13 | """ 14 | Open a child dialog of a tkinter application to ask a combobox option. 15 | 16 | Args: 17 | parent: the tkinter parent view to use for this window construction. 18 | options: A list of string correspondig to options of the combobox 19 | displayMsg: The message that will explain to the user what he is choosing. 20 | default: Choose a default selected option (one of the string in options). default is None 21 | """ 22 | self.app = tk.Toplevel(parent, bg="white") 23 | self.app.resizable(False, False) 24 | appFrame = ttk.Frame(self.app) 25 | self.rvalue = None 26 | self.parent = parent 27 | if options is None: 28 | self.onError() 29 | lbl = ttk.Label(appFrame, text=displayMsg) 30 | lbl.pack(pady=5) 31 | self.box_template = ttk.Combobox( 32 | appFrame, values=tuple(options), state="readonly") 33 | if default is not None: 34 | self.box_template.set(default) 35 | self.box_template.pack(padx=10, pady=5) 36 | self.ok_button = ttk.Button(appFrame, text="OK", command=self.onOk) 37 | self.ok_button.pack(padx=10, pady=5) 38 | appFrame.pack(ipadx=10, ipady=5) 39 | try: 40 | self.app.wait_visibility() 41 | self.app.transient(parent) 42 | self.app.grab_set() 43 | except tk.TclError: 44 | pass 45 | 46 | def onOk(self): 47 | """ 48 | Called when the user clicked the validation button. Set the rvalue attributes to the value selected and close the window. 49 | """ 50 | # send the data to the parent 51 | self.rvalue = self.box_template.get() 52 | self.app.destroy() 53 | 54 | def onError(self): 55 | """ 56 | Close the dialog and set rvalue to None 57 | """ 58 | self.rvalue = None 59 | self.app.destroy() 60 | -------------------------------------------------------------------------------- /documentation/pdoc/Pollenisator/core/plugins/Nmap.md: -------------------------------------------------------------------------------- 1 | Module Pollenisator.core.plugins.Nmap 2 | ===================================== 3 | A plugin to parse nmap scan 4 | 5 | Functions 6 | --------- 7 | 8 | 9 | `getIpPortsNmap(nmapFile)` 10 | : Read the given nmap .nmap file results and return a dictionnary with ips and a list of their open ports. 11 | Args: 12 | nmapFile: the path to the .nmap file generated by an nmap scan 13 | 14 | Returns: 15 | notes about inseted ip and ports 16 | 17 | Classes 18 | ------- 19 | 20 | `Nmap()` 21 | : Parent base plugin to be inherited 22 | Attributes: 23 | autoDetect: indicating to auto-detect that this plugin is able to auto detect. 24 | 25 | ### Ancestors (in MRO) 26 | 27 | * core.plugins.plugin.Plugin 28 | 29 | ### Methods 30 | 31 | `Parse(self, file_opened, **_kwargs)` 32 | : Parse a opened file to extract information 33 | Args: 34 | file_opened: the open file 35 | _kwargs: not used 36 | Returns: 37 | a tuple with 4 values (All set to None if Parsing wrong file): 38 | 0. notes: notes to be inserted in tool giving direct info to pentester 39 | 1. tags: a list of tags to be added to tool 40 | 2. lvl: the level of the command executed to assign to given targets 41 | 3. targets: a list of composed keys allowing retrieve/insert from/into database targerted objects. 42 | 43 | `checkReturnCode(self, returncode)` 44 | : Check if the command was executed successfully using the final exit code. 45 | Args: 46 | returncode: the exit code of the command executed. 47 | Returns: 48 | bool: True if successful returncode, False otherwise. 49 | 50 | `getFileOutputArg(self)` 51 | : Returns the command line paramater giving the output file 52 | Returns: 53 | string 54 | 55 | `getFileOutputExt(self)` 56 | : Returns the expected file extension for this command result file 57 | Returns: 58 | string 59 | 60 | `getFileOutputPath(self, commandExecuted)` 61 | : Returns the output file path given in the executed command using getFileOutputArg 62 | Args: 63 | commandExecuted: the command that was executed with an output file inside. 64 | Returns: 65 | string: the path to file created -------------------------------------------------------------------------------- /documentation/pdoc/Pollenisator/core/plugins/DigReverseLookup.md: -------------------------------------------------------------------------------- 1 | Module Pollenisator.core.plugins.DigReverseLookup 2 | ================================================= 3 | A plugin to parse a dig scan 4 | 5 | Functions 6 | --------- 7 | 8 | 9 | `parse_reverse_dig(result_dig)` 10 | : Parse the results of a reverse lookup by dig 11 | Args: 12 | result_dig: the output of the command dig -x 13 | Returns: 14 | Returns the domain found by dig -x as a string or None if no domains was found. 15 | 16 | Classes 17 | ------- 18 | 19 | `DigReverseLookup()` 20 | : Parent base plugin to be inherited 21 | Attributes: 22 | autoDetect: indicating to auto-detect that this plugin is able to auto detect. 23 | 24 | ### Ancestors (in MRO) 25 | 26 | * core.plugins.plugin.Plugin 27 | 28 | ### Methods 29 | 30 | `Parse(self, file_opened, **_kwargs)` 31 | : Parse a opened file to extract information 32 | Args: 33 | file_opened: the open file 34 | _kwargs: not used 35 | Returns: 36 | a tuple with 4 values (All set to None if Parsing wrong file): 37 | 0. notes: notes to be inserted in tool giving direct info to pentester 38 | 1. tags: a list of tags to be added to tool 39 | 2. lvl: the level of the command executed to assign to given targets 40 | 3. targets: a list of composed keys allowing retrieve/insert from/into database targerted objects. 41 | 42 | `checkReturnCode(self, returncode)` 43 | : Check if the command was executed successfully using the final exit code. 44 | Args: 45 | returncode: the exit code of the command executed. 46 | Returns: 47 | bool: True if successful returncode, False otherwise. 48 | 49 | `getFileOutputArg(self)` 50 | : Returns the command line paramater giving the output file 51 | Returns: 52 | string 53 | 54 | `getFileOutputExt(self)` 55 | : Returns the expected file extension for this command result file 56 | Returns: 57 | string 58 | 59 | `getFileOutputPath(self, commandExecuted)` 60 | : Returns the output file path given in the executed command using getFileOutputArg 61 | Args: 62 | commandExecuted: the command that was executed with an output file inside. 63 | Returns: 64 | string: the path to file created -------------------------------------------------------------------------------- /documentation/pdoc/Pollenisator/core/Controllers/IpController.md: -------------------------------------------------------------------------------- 1 | Module Pollenisator.core.Controllers.IpController 2 | ================================================= 3 | Controller for IP object. Mostly handles conversion between mongo data and python objects 4 | 5 | Classes 6 | ------- 7 | 8 | `IpController(model)` 9 | : Inherits ControllerElement 10 | Controller for IP object. Mostly handles conversion between mongo data and python objects 11 | 12 | Constructor 13 | Args: 14 | model: Any instance of classe that inherits core.Models.Element 15 | 16 | ### Ancestors (in MRO) 17 | 18 | * core.Controllers.ControllerElement.ControllerElement 19 | 20 | ### Methods 21 | 22 | `doInsert(self, values)` 23 | : Insert the Ip represented by this model in the database with the given values. 24 | 25 | Args: 26 | values: A dictionary crafted by MultipleIpView or IpView containg all form fields values needed. 27 | 28 | Returns: 29 | { 30 | '_id': The mongo ObjectId _id of the inserted command document. 31 | 'nbErrors': The number of objects that has not been inserted in database due to errors. 32 | } 33 | 34 | `doUpdate(self, values)` 35 | : Update the Ip represented by this model in database with the given values. 36 | 37 | Args: 38 | values: A dictionary crafted by IpView containg all form fields values needed. 39 | 40 | Returns: 41 | The mongo ObjectId _id of the updated Ip document. 42 | 43 | `getData(self)` 44 | : Returns ip attributes as a dictionnary matching Mongo stored ips 45 | Returns: 46 | dict with keys ip, in_scopes, notes, _id, tags and infos 47 | 48 | `getDefects(self)` 49 | : Return ip assigned defects as a list of mongo fetched defects dict 50 | Returns: 51 | list of defect raw mongo data dictionnaries 52 | 53 | `getPorts(self)` 54 | : Return ip assigned ports as a list of mongo fetched defects dict 55 | Returns: 56 | list of defect raw mongo data dictionnaries 57 | 58 | `getTools(self)` 59 | : Return ip assigned tools as a list of mongo fetched defects dict 60 | Returns: 61 | list of defect raw mongo data dictionnaries 62 | 63 | `getType(self)` 64 | : Return a string describing the type of object 65 | Returns: 66 | "ip" -------------------------------------------------------------------------------- /documentation/pdoc/Pollenisator/core/plugins/SmbMap.md: -------------------------------------------------------------------------------- 1 | Module Pollenisator.core.plugins.SmbMap 2 | ======================================= 3 | A plugin to parse smbmap scan 4 | 5 | Functions 6 | --------- 7 | 8 | 9 | `smbmap_format(smbmap_output)` 10 | : Parse raw smbmap file 11 | Args: 12 | smbmap_output: raw smbmap file content 13 | Returns: 14 | A tuple with values: 15 | 0. a string formated where each line are : fullpath permissions date 16 | 1. a list of interesting name file found 17 | 2. targets as described in Parse 18 | 19 | Classes 20 | ------- 21 | 22 | `SmbMap()` 23 | : Parent base plugin to be inherited 24 | Attributes: 25 | autoDetect: indicating to auto-detect that this plugin is able to auto detect. 26 | 27 | ### Ancestors (in MRO) 28 | 29 | * core.plugins.plugin.Plugin 30 | 31 | ### Methods 32 | 33 | `Parse(self, file_opened, **_kwargs)` 34 | : Parse a opened file to extract information 35 | Args: 36 | file_opened: the open file 37 | _kwargs: not used 38 | Returns: 39 | a tuple with 4 values (All set to None if Parsing wrong file): 40 | 0. notes: notes to be inserted in tool giving direct info to pentester 41 | 1. tags: a list of tags to be added to tool 42 | 2. lvl: the level of the command executed to assign to given targets 43 | 3. targets: a list of composed keys allowing retrieve/insert from/into database targerted objects. 44 | 45 | `checkReturnCode(self, returncode)` 46 | : Check if the command was executed successfully using the final exit code. 47 | Args: 48 | returncode: the exit code of the command executed. 49 | Returns: 50 | bool: True if successful returncode, False otherwise. 51 | 52 | `getFileOutputArg(self)` 53 | : Returns the command line paramater giving the output file 54 | Returns: 55 | string 56 | 57 | `getFileOutputExt(self)` 58 | : Returns the expected file extension for this command result file 59 | Returns: 60 | string 61 | 62 | `getFileOutputPath(self, commandExecuted)` 63 | : Returns the output file path given in the executed command using getFileOutputArg 64 | Args: 65 | commandExecuted: the command that was executed with an output file inside. 66 | Returns: 67 | string: the path to file created -------------------------------------------------------------------------------- /documentation/pdoc/Pollenisator/core/Controllers/ToolController.md: -------------------------------------------------------------------------------- 1 | Module Pollenisator.core.Controllers.ToolController 2 | =================================================== 3 | Controller for Tool object. Mostly handles conversion between mongo data and python objects 4 | 5 | Classes 6 | ------- 7 | 8 | `ToolController(model)` 9 | : Inherits ControllerElement 10 | Controller for Tool object. Mostly handles conversion between mongo data and python objects 11 | 12 | Constructor 13 | Args: 14 | model: Any instance of classe that inherits core.Models.Element 15 | 16 | ### Ancestors (in MRO) 17 | 18 | * core.Controllers.ControllerElement.ControllerElement 19 | 20 | ### Methods 21 | 22 | `doUpdate(self, values)` 23 | : Update the Tool represented by this model in database with the given values. 24 | 25 | Args: 26 | values: A dictionary crafted by ToolView containg all form fields values needed. 27 | 28 | Returns: 29 | The mongo ObjectId _id of the updated Tool document. 30 | 31 | `getData(self)` 32 | : Return scope attributes as a dictionnary matching Mongo stored scopes 33 | Returns: 34 | dict with keys name, wave, scope, ip, port, proto, lvl, text, dated, datef, scanner_ip, notes, status, _id, tags and infos 35 | 36 | `getName(self)` 37 | : Returns the model tool name 38 | Returns: 39 | string 40 | 41 | `getOutputDir(self, calendarName)` 42 | : Returns directory of the tool file output 43 | Args: 44 | calendarName: the pentest database name 45 | Returns: 46 | string (path) 47 | 48 | `getResultFile(self)` 49 | : Returns path of the tool resulting file output 50 | Returns: 51 | string (path) 52 | 53 | `getStatus(self)` 54 | : Returns a string describing the tool current status 55 | Returns: 56 | string with possible values : "OOS"/"OOT"/"running"/"done". OOS = Out of Scope, OOT = Out of Time range 57 | 58 | `getType(self)` 59 | : Returns a string describing the type of object 60 | Returns: 61 | "tool" 62 | 63 | `markAsNotDone(self)` 64 | : Change this model tool to status not done. (resets dates and scanner) 65 | 66 | `setStatus(self, status)` 67 | : Set the tool model status 68 | Args: 69 | status: string with possible values : "OOS"/"OOT"/"running"/"done". OOS = Out of Scope, OOT = Out of Time range -------------------------------------------------------------------------------- /documentation/pdoc/Pollenisator/core/Views/PortView.md: -------------------------------------------------------------------------------- 1 | Module Pollenisator.core.Views.PortView 2 | ======================================= 3 | View for port object. Handle node in treeview and present forms to user when interacted with. 4 | 5 | Classes 6 | ------- 7 | 8 | `PortView(appTw, appViewFrame, mainApp, controller)` 9 | : View for port object. Handle node in treeview and present forms to user when interacted with. 10 | Attributes: 11 | icon: icon name to show in treeview. Icon filename must be in icon directory 12 | 13 | Constructor 14 | Args: 15 | appTw: a PollenisatorTreeview instance to put this view in 16 | appViewFrame: an view frame to build the forms in. 17 | mainApp: the Application instance 18 | controller: a CommandController for this view. 19 | 20 | ### Ancestors (in MRO) 21 | 22 | * core.Views.ViewElement.ViewElement 23 | 24 | ### Class variables 25 | 26 | `icon` 27 | : 28 | 29 | ### Methods 30 | 31 | `addDefectCallback(self, _event)` 32 | : Create an empty defect model and its attached view. Open this view insert window. 33 | 34 | Args: 35 | event: Automatically generated with a button Callback, not used but mandatory. 36 | 37 | `addInTreeview(self, parentNode=None, addChildren=True)` 38 | : Add this view in treeview. Also stores infos in application treeview. 39 | Args: 40 | parentNode: if None, will calculate the parent. If setted, forces the node to be inserted inside given parentNode. 41 | addChildren: If False, skip the tool and defects insert. Useful when displaying search results 42 | 43 | `insertReceived(self)` 44 | : Called when a port insertion is received by notification. 45 | Insert the node in summary. 46 | 47 | `key(self)` 48 | : Returns a key for sorting this node 49 | Returns: 50 | Tuple of 1 integer valus representing the prot number 51 | 52 | `openInBrowser(self, _event)` 53 | : Callback for action open in browser 54 | Args: 55 | _event: nut used but mandatory 56 | 57 | `openInsertWindow(self)` 58 | : Creates a tkinter form using Forms classes. This form aims to insert a new Port 59 | 60 | `openModifyWindow(self)` 61 | : Creates a tkinter form using Forms classes. This form aims to update or delete an existing Port 62 | 63 | `updateReceived(self)` 64 | : Called when a port update is received by notification. 65 | Update the port node in summary -------------------------------------------------------------------------------- /documentation/pdoc/Pollenisator/core/plugins/Crtsh.md: -------------------------------------------------------------------------------- 1 | Module Pollenisator.core.plugins.Crtsh 2 | ====================================== 3 | A plugin to parse a crtsh scan 4 | 5 | Functions 6 | --------- 7 | 8 | 9 | `parse_crtsh_line(line)` 10 | : Parse one line of crtsh result file 11 | Args: 12 | line: one line of crtsh result file 13 | 14 | Returns: 15 | Returns the domain found by crtsh on this line or None if no domain exists on this line. 16 | 17 | Classes 18 | ------- 19 | 20 | `Crtsh()` 21 | : Parent base plugin to be inherited 22 | Attributes: 23 | autoDetect: indicating to auto-detect that this plugin is able to auto detect. 24 | 25 | ### Ancestors (in MRO) 26 | 27 | * core.plugins.plugin.Plugin 28 | 29 | ### Methods 30 | 31 | `Parse(self, file_opened, **_kwargs)` 32 | : Parse a opened file to extract information 33 | 34 | foe.test.fr. 801 IN A 18.19.20.21 35 | blog.test.fr. 10800 IN CNAME 22.33.44.55 36 | Args: 37 | file_opened: the open file 38 | _kwargs: not used 39 | Returns: 40 | a tuple with 4 values (All set to None if Parsing wrong file): 41 | 0. notes: notes to be inserted in tool giving direct info to pentester 42 | 1. tags: a list of tags to be added to tool 43 | 2. lvl: the level of the command executed to assign to given targets 44 | 3. targets: a list of composed keys allowing retrieve/insert from/into database targerted objects. 45 | 46 | `checkReturnCode(self, returncode)` 47 | : Check if the command was executed successfully using the final exit code. 48 | Args: 49 | returncode: the exit code of the command executed. 50 | Returns: 51 | bool: True if successful returncode, False otherwise. 52 | 53 | `getFileOutputArg(self)` 54 | : Returns the command line paramater giving the output file 55 | Returns: 56 | string 57 | 58 | `getFileOutputExt(self)` 59 | : Returns the expected file extension for this command result file 60 | Returns: 61 | string 62 | 63 | `getFileOutputPath(self, commandExecuted)` 64 | : Returns the output file path given in the executed command using getFileOutputArg 65 | Args: 66 | commandExecuted: the command that was executed with an output file inside. 67 | Returns: 68 | string: the path to file created -------------------------------------------------------------------------------- /core/Forms/FormCheckbox.py: -------------------------------------------------------------------------------- 1 | """Describe tkinter checkbox with default common args""" 2 | 3 | import tkinter as tk 4 | import tkinter.ttk as ttk 5 | from core.Forms.Form import Form 6 | 7 | 8 | class FormCheckbox(Form): 9 | """ 10 | Form field representing a checkbox. 11 | Default setted values: 12 | if pack : padx = pady = 5, side = right 13 | if grid: row = column = 0 sticky = "west" 14 | """ 15 | def __init__(self, name, text, default, **kwargs): 16 | """ 17 | Constructor for a form checkbox 18 | 19 | Args: 20 | name: the checkbox name (id). 21 | text: the text on the checkbox 22 | default: boolean indicating if the checkbox should be checked by default. 23 | kwargs: same keyword args as you would give to ttk.CheckButton 24 | """ 25 | super().__init__(name) 26 | self.text = text 27 | self.default = default 28 | self.kwargs = kwargs 29 | self.chk = None 30 | 31 | def constructView(self, parent): 32 | """ 33 | Create the checkbox view inside the parent view given 34 | 35 | Args: 36 | parent: parent form panel. 37 | """ 38 | self.val = tk.IntVar() 39 | if self.default: 40 | self.val.set(1) 41 | else: 42 | self.val.set(0) 43 | self.chk = ttk.Checkbutton( 44 | parent.panel, text=self.text, variable=self.val) 45 | if parent.gridLayout: 46 | self.chk.grid(row=self.getKw("row", 0), column=self.getKw("column", 0), sticky=self.getKw("sticky", tk.W), **self.kwargs) 47 | else: 48 | self.chk.pack(side=self.getKw("side", "right"), padx=self.getKw("padx", 10), pady=self.getKw("pady", 5), **self.kwargs) 49 | 50 | def getValue(self): 51 | """ 52 | Return the form value. Required for a form. 53 | 54 | Returns: 55 | Return True if the checkbox was checked, False otherwise. 56 | """ 57 | return self.val.get() == 1 58 | 59 | def checkForm(self): 60 | """ 61 | Check if this form is correctly filled. A checkbox cannot be malformed. 62 | 63 | Returns: 64 | { 65 | "correct": True if the form is correctly filled, False otherwise. 66 | "msg": A message indicating what is not correctly filled. 67 | } 68 | """ 69 | return True, "" 70 | 71 | def setFocus(self): 72 | """Set the focus to the ttk checkbutton.""" 73 | self.chk.focus_set() -------------------------------------------------------------------------------- /documentation/pdoc/Pollenisator/core/plugins/WhatWeb.md: -------------------------------------------------------------------------------- 1 | Module Pollenisator.core.plugins.WhatWeb 2 | ======================================== 3 | A plugin to parse whatweb 4 | 5 | Classes 6 | ------- 7 | 8 | `WhatWeb()` 9 | : Parent base plugin to be inherited 10 | Attributes: 11 | autoDetect: indicating to auto-detect that this plugin is able to auto detect. 12 | 13 | ### Ancestors (in MRO) 14 | 15 | * core.plugins.plugin.Plugin 16 | 17 | ### Methods 18 | 19 | `Parse(self, file_opened, **_kwargs)` 20 | : Parse a opened file to extract information 21 | Args: 22 | file_opened: the open file 23 | _kwargs: not used 24 | Returns: 25 | a tuple with 4 values (All set to None if Parsing wrong file): 26 | 0. notes: notes to be inserted in tool giving direct info to pentester 27 | 1. tags: a list of tags to be added to tool 28 | 2. lvl: the level of the command executed to assign to given targets 29 | 3. targets: a list of composed keys allowing retrieve/insert from/into database targerted objects. 30 | 31 | `checkReturnCode(self, returncode)` 32 | : Check if the command was executed successfully using the final exit code. 33 | Args: 34 | returncode: the exit code of the command executed. 35 | Returns: 36 | bool: True if successful returncode, False otherwise. 37 | 38 | `getActions(self, toolmodel)` 39 | : Summary: Add buttons to the tool view. 40 | Args: 41 | * toolmodel : the tool model opened in the pollenisator client. 42 | Return: 43 | A dictionary with buttons text as key and function callback as value. 44 | 45 | `getFileOutputArg(self)` 46 | : Returns the command line paramater giving the output file 47 | Returns: 48 | string 49 | 50 | `getFileOutputExt(self)` 51 | : Returns the expected file extension for this command result file 52 | Returns: 53 | string 54 | 55 | `getFileOutputPath(self, commandExecuted)` 56 | : Returns the output file path given in the executed command using getFileOutputArg 57 | Args: 58 | commandExecuted: the command that was executed with an output file inside. 59 | Returns: 60 | string: the path to file created 61 | 62 | `openInBrowser(self)` 63 | : Callback of action Open 200 in browser 64 | Open scanned host port in browser as tabs. 65 | Args: 66 | _event: not used but mandatory -------------------------------------------------------------------------------- /documentation/pdoc/Pollenisator/core/Models/Interval.md: -------------------------------------------------------------------------------- 1 | Module Pollenisator.core.Models.Interval 2 | ======================================== 3 | Interval Model. Useful to limit in a time frame some tools 4 | 5 | Classes 6 | ------- 7 | 8 | `Interval(valuesFromDb=None)` 9 | : Represents an interval object that defines an time interval where a wave can be executed. 10 | 11 | Attributes: 12 | coll_name: collection name in pollenisator database 13 | 14 | Constructor 15 | Args: 16 | valueFromDb: a dict holding values to load into the object. A mongo fetched interval is optimal. 17 | possible keys with default values are : _id (None), parent (None), tags([]), infos({}), 18 | wave(""), dated("None"), datef("None") 19 | 20 | ### Ancestors (in MRO) 21 | 22 | * core.Models.Element.Element 23 | 24 | ### Class variables 25 | 26 | `coll_name` 27 | : 28 | 29 | ### Methods 30 | 31 | `addInDb(self)` 32 | : Add this interval in database. 33 | 34 | Returns: a tuple with : 35 | * bool for success 36 | * mongo ObjectId : already existing object if duplicate, create object id otherwise 37 | 38 | `delete(self)` 39 | : Delete the Interval represented by this model in database. 40 | 41 | `getDbKey(self)` 42 | : Return a dict from model to use as unique composed key. 43 | Returns: 44 | A dict (1 key :"wave") 45 | 46 | `getEndingDate(self)` 47 | : Returns the ending date and time of this interval 48 | Returns: 49 | a datetime object. 50 | 51 | `initialize(self, wave, dated='None', datef='None', infos=None)` 52 | : Set values of interval 53 | Args: 54 | wave: the parent wave name 55 | dated: a starting date and tiem for this interval in format : '%d/%m/%Y %H:%M:%S'. or the string "None" 56 | datef: an ending date and tiem for this interval in format : '%d/%m/%Y %H:%M:%S'. or the string "None" 57 | infos: a dictionnary with key values as additional information. Default to None 58 | Returns: 59 | this object 60 | 61 | `setToolsInTime(self)` 62 | : Get all OOT (Out of Time) tools in this wave and checks if this Interval makes them in time. 63 | If it is the case, set them in time. 64 | 65 | `update(self, pipeline_set=None)` 66 | : Update this object in database. 67 | Args: 68 | pipeline_set: (Opt.) A dictionnary with custom values. If None (default) use model attributes. -------------------------------------------------------------------------------- /documentation/pdoc/Pollenisator/core/plugins/PythonReverseLookup.md: -------------------------------------------------------------------------------- 1 | Module Pollenisator.core.plugins.PythonReverseLookup 2 | ==================================================== 3 | A plugin to parse python reverse lookup scan 4 | 5 | Functions 6 | --------- 7 | 8 | 9 | `parse_reverse_python(result_socket)` 10 | : Parse the result of a reverse lookup from python socket module 11 | Args: 12 | result_socket: the response of the socket module for a dns reverse lookup 13 | Returns: 14 | Returns a tuple with (all value are None if not a valid python reverse lookup): 15 | 0. the domain found by the socket module or None if no domain was found. 16 | 1. its ip 17 | EXAMPLE FILE: 18 | pythonReverseLookup//10.0.0.1//('foe.lan', [], ['10.0.0.1']) 19 | 20 | Classes 21 | ------- 22 | 23 | `PythonReverseLookup()` 24 | : Parent base plugin to be inherited 25 | Attributes: 26 | autoDetect: indicating to auto-detect that this plugin is able to auto detect. 27 | 28 | ### Ancestors (in MRO) 29 | 30 | * core.plugins.plugin.Plugin 31 | 32 | ### Methods 33 | 34 | `Parse(self, file_opened, **_kwargs)` 35 | : Parse a opened file to extract information 36 | Args: 37 | file_opened: the open file 38 | _kwargs: not used 39 | Returns: 40 | a tuple with 4 values (All set to None if Parsing wrong file): 41 | 0. notes: notes to be inserted in tool giving direct info to pentester 42 | 1. tags: a list of tags to be added to tool 43 | 2. lvl: the level of the command executed to assign to given targets 44 | 3. targets: a list of composed keys allowing retrieve/insert from/into database targerted objects. 45 | 46 | `checkReturnCode(self, _returncode)` 47 | : Default check for return code 48 | Returns: 49 | Always True. To be overidden 50 | 51 | `getFileOutputArg(self)` 52 | : Returns the command line paramater giving the output file 53 | Returns: 54 | string 55 | 56 | `getFileOutputExt(self)` 57 | : Returns the expected file extension for this command result file 58 | Returns: 59 | string 60 | 61 | `getFileOutputPath(self, commandExecuted)` 62 | : Returns the output file path given in the executed command using getFileOutputArg 63 | Args: 64 | commandExecuted: the command that was executed with an output file inside. 65 | Returns: 66 | string: the path to file created -------------------------------------------------------------------------------- /documentation/pdoc/Pollenisator/core/plugins/Knockpy.md: -------------------------------------------------------------------------------- 1 | Module Pollenisator.core.plugins.Knockpy 2 | ======================================== 3 | A plugin to parse knockpy scan 4 | 5 | Functions 6 | --------- 7 | 8 | 9 | `parse_knockpy_line(line)` 10 | : Parse one line of knockpy result file 11 | Args: 12 | line: one line of knockpy result file 13 | 14 | Returns: 15 | a tuple with 3 values: 16 | 0. the ip found by knockpy on this line or None if no domain exists on this line. 17 | 1. the domain found by knockpy on this line or None if no domain exists on this line. 18 | 2. a boolean indicating that knockpy marked this domain as alias 19 | 20 | Classes 21 | ------- 22 | 23 | `Knockpy()` 24 | : Parent base plugin to be inherited 25 | Attributes: 26 | autoDetect: indicating to auto-detect that this plugin is able to auto detect. 27 | 28 | ### Ancestors (in MRO) 29 | 30 | * core.plugins.plugin.Plugin 31 | 32 | ### Methods 33 | 34 | `Parse(self, file_opened, **_kwargs)` 35 | : Parse a opened file to extract information 36 | Args: 37 | file_opened: the open file 38 | _kwargs: not used 39 | Returns: 40 | a tuple with 4 values (All set to None if Parsing wrong file): 41 | 0. notes: notes to be inserted in tool giving direct info to pentester 42 | 1. tags: a list of tags to be added to tool 43 | 2. lvl: the level of the command executed to assign to given targets 44 | 3. targets: a list of composed keys allowing retrieve/insert from/into database targerted objects. 45 | 46 | `checkReturnCode(self, returncode)` 47 | : Check if the command was executed successfully using the final exit code. 48 | Args: 49 | returncode: the exit code of the command executed. 50 | Returns: 51 | bool: True if successful returncode, False otherwise. 52 | 53 | `getFileOutputArg(self)` 54 | : Returns the command line paramater giving the output file 55 | Returns: 56 | string 57 | 58 | `getFileOutputExt(self)` 59 | : Returns the expected file extension for this command result file 60 | Returns: 61 | string 62 | 63 | `getFileOutputPath(self, commandExecuted)` 64 | : Returns the output file path given in the executed command using getFileOutputArg 65 | Args: 66 | commandExecuted: the command that was executed with an output file inside. 67 | Returns: 68 | string: the path to file created -------------------------------------------------------------------------------- /core/Application/Dialogs/ChildDialogToast.py: -------------------------------------------------------------------------------- 1 | """Show a message to the user for a limited amount of time 2 | """ 3 | import tkinter as tk 4 | import tkinter.ttk as ttk 5 | import threading 6 | 7 | 8 | class ChildDialogToast(tk.Toplevel): 9 | """floating basic window with info text inside, fading away after a short time. 10 | """ 11 | 12 | def __init__(self, parent, text, *args, **kwargs): 13 | """ 14 | create the floating window but do not display it 15 | 16 | Args: 17 | parent: the tkinter parent view to use for this window construction. 18 | text: the text to display inside the toast 19 | args: not used 20 | kwargs: 21 | - if fadingTime is defined, delay before fading starts. Default to 1.0s 22 | - if x is defined, x position of the toast top left corner, else default to parent x +25 . 23 | - if y is defined, y position of the toast top left corner, else default to parent botoom - 100. 24 | """ 25 | self.text = text 26 | self.parent = parent 27 | self.kwargs = kwargs 28 | 29 | def show(self): 30 | """ 31 | show the floating window, fading on 1.0 sec 32 | """ 33 | x = y = 0 34 | x += self.kwargs.get("x", self.parent.winfo_rootx() + 25) 35 | y += self.kwargs.get("y", (self.parent.winfo_rooty() + self.parent.winfo_reqheight() - 100)) 36 | # creates a toplevel window 37 | super().__init__() 38 | # Leaves only the label and removes the app window 39 | self.wm_overrideredirect(True) 40 | self.wm_geometry("+%d+%d" % (x, y)) 41 | w = self.kwargs.get("width", 200) 42 | h = self.kwargs.get("height", 20) 43 | self.geometry("%dx%d" % (w, h)) 44 | label = tk.Label(self, text=self.text, justify='left', 45 | background='white', relief='solid', borderwidth=1, 46 | font=("times", "12", "normal")) 47 | label.pack(fill=tk.BOTH) 48 | self.transparency = 1.0 49 | fadingTime = self.kwargs.get("fadingTime", 1.0) 50 | self.timer_fade = threading.Timer(fadingTime, self.fade) 51 | self.timer_fade.start() 52 | 53 | def fade(self): 54 | try: 55 | self.transparency -= 0.2 56 | if self.transparency <= 0.0: 57 | self.destroy() 58 | del self 59 | return 60 | self.wm_attributes("-alpha", self.transparency) 61 | self.timer_fade = threading.Timer(0.1, self.fade) 62 | self.timer_fade.start() 63 | except RuntimeError: 64 | return -------------------------------------------------------------------------------- /documentation/pdoc/Pollenisator/core/Application/Treeviews/CommandsTreeview.md: -------------------------------------------------------------------------------- 1 | Module Pollenisator.core.Application.Treeviews.CommandsTreeview 2 | =============================================================== 3 | Ttk treeview class with added functions. 4 | 5 | Classes 6 | ------- 7 | 8 | `CommandsTreeview(appli, parentFrame)` 9 | : CommandsTreeview class 10 | Inherit PollenisatorTreeview. 11 | Ttk treeview class with added functions to handle the command objects. 12 | 13 | Args: 14 | appli: a reference to the main Application object. 15 | parentFrame: the parent tkinter window object. 16 | 17 | ### Ancestors (in MRO) 18 | 19 | * core.Application.Treeviews.PollenisatorTreeview.PollenisatorTreeview 20 | * tkinter.ttk.Treeview 21 | * tkinter.ttk.Widget 22 | * tkinter.Widget 23 | * tkinter.BaseWidget 24 | * tkinter.Misc 25 | * tkinter.Pack 26 | * tkinter.Place 27 | * tkinter.Grid 28 | * tkinter.XView 29 | * tkinter.YView 30 | 31 | ### Methods 32 | 33 | `doPopup(self, event)` 34 | : Open the popup 35 | Args: 36 | event: filled with the callback, contains data about line clicked 37 | 38 | `initUI(self)` 39 | : Initialize the user interface widgets and binds them. 40 | Args: 41 | _event: not used but mandatory 42 | 43 | `load(self)` 44 | : Load the treeview with database information 45 | 46 | Args: 47 | _searchModel: (Deprecated) inherited not used. 48 | 49 | `notify(self, db, collection, iid, action, parent)` 50 | : Callback for the observer pattern implemented in mongo.py. 51 | 52 | Args: 53 | collection: the collection that has been modified 54 | iid: the mongo ObjectId _id that was modified/inserted/deleted 55 | action: update/insert/delete. It was the action performed on the iid 56 | parent: the mongo ObjectId of the parent. Only if action in an insert. 57 | 58 | `onTreeviewSelect(self, event=None)` 59 | : Called when a line is selected on the treeview 60 | Open the selected object view on the view frame. 61 | IF it's a parent commands or command_groups node, opens Insert 62 | ELSE open a modify window 63 | Args: 64 | event: filled with the callback, contains data about line clicked 65 | 66 | `openModifyWindowOf(self, dbId)` 67 | : Retrieve the View of the database id given and open the modifying form for its model and open it. 68 | 69 | Args: 70 | dbId: the database Mongo Id to modify. 71 | 72 | `refresh(self)` 73 | : Alias to self.load method -------------------------------------------------------------------------------- /documentation/pdoc/Pollenisator/core/Views/IntervalView.md: -------------------------------------------------------------------------------- 1 | Module Pollenisator.core.Views.IntervalView 2 | =========================================== 3 | View for interval object. Handle node in treeview and present forms to user when interacted with. 4 | 5 | Classes 6 | ------- 7 | 8 | `IntervalView(appTw, appViewFrame, mainApp, controller)` 9 | : View for interval object. Handle node in treeview and present forms to user when interacted with. 10 | Attributes: 11 | icon: icon name to show in treeview. Icon filename must be in icon directory. 12 | 13 | Constructor 14 | Args: 15 | appTw: a PollenisatorTreeview instance to put this view in 16 | appViewFrame: an view frame to build the forms in. 17 | mainApp: the Application instance 18 | controller: a CommandController for this view. 19 | 20 | ### Ancestors (in MRO) 21 | 22 | * core.Views.ViewElement.ViewElement 23 | 24 | ### Class variables 25 | 26 | `icon` 27 | : 28 | 29 | ### Static methods 30 | 31 | `DbToTreeviewListId(parent_db_id)` 32 | : Converts a mongo Id to a unique string identifying a list of intervals given its parent 33 | Args: 34 | parent_db_id: the parent node mongo ID 35 | Returns: 36 | A string that should be unique to describe the parent list of interval node 37 | 38 | `treeviewListIdToDb(treeview_id)` 39 | : Extract from the unique string identifying a list of intervals the parent db ID 40 | Args: 41 | treeviewId: the treeview node id of a list of intervals node 42 | Returns: 43 | the parent object mongo id as string 44 | 45 | ### Methods 46 | 47 | `addInTreeview(self, parentNode=None)` 48 | : Add this view in treeview. Also stores infos in application treeview. 49 | Args: 50 | parentNode: if None, will calculate the parent. If setted, forces the node to be inserted inside given parentNode. 51 | _addChildren: not used here 52 | 53 | `insertReceived(self)` 54 | : Called when a interval insertion is received by notification. 55 | Insert the node in treeview. 56 | Also tells to the parent wave to update (its tools) 57 | 58 | `openInsertWindow(self)` 59 | : Creates a tkinter form using Forms classes. This form aims to insert a new Interval 60 | 61 | `openModifyWindow(self)` 62 | : Creates a tkinter form using Forms classes. This form aims to update or delete an existing Interval 63 | 64 | `updateReceived(self)` 65 | : Called when a interval update is received by notification. 66 | Update the interval node and tells to the parent wave to update (its tools). -------------------------------------------------------------------------------- /documentation/pdoc/Pollenisator/core/Components/Modules/Summary.md: -------------------------------------------------------------------------------- 1 | Module Pollenisator.core.Components.Modules.Summary 2 | =================================================== 3 | Controllers for summary view of notebook 4 | 5 | Functions 6 | --------- 7 | 8 | 9 | `smart_grid(parent, root, *args, **kwargs)` 10 | : Grid adapted to each treeview size. 11 | Adapted from stackoverflow but cannot find it anymore =/ 12 | 13 | Classes 14 | ------- 15 | 16 | `ScrollFrame(parent)` 17 | : A scrollable frame using canvas 18 | 19 | Constructor 20 | 21 | ### Ancestors (in MRO) 22 | 23 | * tkinter.Frame 24 | * tkinter.Widget 25 | * tkinter.BaseWidget 26 | * tkinter.Misc 27 | * tkinter.Pack 28 | * tkinter.Place 29 | * tkinter.Grid 30 | 31 | ### Methods 32 | 33 | `onFrameConfigure(self, _event)` 34 | : Reset the scroll region to encompass the inner frame 35 | 36 | `Summary(root, settings)` 37 | : Store elements to summarize the ongoing pentest 38 | 39 | Constructor 40 | Args: 41 | root: the root widget of tkinter 42 | 43 | ### Class variables 44 | 45 | `iconName` 46 | : 47 | 48 | `tabName` 49 | : 50 | 51 | ### Methods 52 | 53 | `OnDoubleClick(self, event)` 54 | : Callback for treeview double click. 55 | If a link treeview is defined, open mainview and focus on the item with same iid clicked. 56 | Args: 57 | event: used to identified which link was clicked. Auto filled 58 | 59 | `deleteIp(self, ip)` 60 | : Remvoe an IP from the summary. 61 | Args: 62 | ip: an IP object to be removed 63 | 64 | `initUI(self, parent, nbk, linkTw)` 65 | : Initialize widgets of the summary 66 | Args: 67 | parent: parent tkinter container widget 68 | nbk: a ref to the notebook 69 | linkTw: the treeview holding more info in the notebook to be displayed after an interaction 70 | 71 | `insertIp(self, ip)` 72 | : Insert a new IP in the summary. Also insert its port 73 | Args: 74 | ip: an IP object to be inserted 75 | 76 | `insertPort(self, port_o)` 77 | : Insert a new port in the summary 78 | Args: 79 | port_o: a port object to be inserted 80 | 81 | `loadSummary(self)` 82 | : Reload information about IP and Port and reload the view. 83 | 84 | `open(self)` 85 | : 86 | 87 | `refreshUI(self)` 88 | : Refresh information then reloads the view with them. 89 | 90 | `updatePort(self, port_data)` 91 | : Update a port line according to a new port_data (just change colors now) 92 | Args: 93 | port_data: a port data dictionnary -------------------------------------------------------------------------------- /core/Application/Dialogs/ChildDialogException.py: -------------------------------------------------------------------------------- 1 | """Defines a dialog window to display an error""" 2 | 3 | import tkinter as tk 4 | import tkinter.ttk as ttk 5 | import webbrowser 6 | from core.Forms.FormPanel import FormPanel 7 | 8 | 9 | def postIssue(_err): 10 | """Open a tab in a browser to github issues page. 11 | Args: 12 | _err: Not used""" 13 | webbrowser.open_new_tab( 14 | "https://github.com/AlgoSecure/Pollenisator/issues") 15 | 16 | 17 | class ChildDialogException: 18 | """ 19 | Open a child dialog of a tkinter application to present the user to an unhandled exception. 20 | Can be used to report issue to github. 21 | """ 22 | 23 | def __init__(self, parent, title, err): 24 | """ 25 | Open a child dialog of a tkinter application to present the user to an unhandled exception. 26 | Can be used to report issue to github. 27 | Args: 28 | parent: the tkinter parent view to use for this window construction. 29 | title: A title for the new windows 30 | err: the error that occured causing this window to appear 31 | """ 32 | self.rvalue = None 33 | self.parent = parent 34 | self.app = tk.Toplevel(parent) 35 | self.app.title(title) 36 | appFrame = ttk.Frame(self.app) 37 | self.form = FormPanel() 38 | self.err = err 39 | self.form.addFormLabel( 40 | "An error occured. Please make an issue with the below stack trace and when it occured.", side=tk.TOP) 41 | self.form.addFormText("Error", ".+", self.err, 42 | None, side=tk.TOP) 43 | self.form.addFormButton("Report bug", self.onOk, side=tk.RIGHT) 44 | self.form.addFormButton("Close", self.onError, side=tk.RIGHT) 45 | self.rvalue = None 46 | self.form.constructView(appFrame) 47 | appFrame.pack(ipadx=10, ipady=10) 48 | self.app.transient(parent) 49 | try: 50 | self.app.wait_visibility() 51 | self.app.grab_set() 52 | except tk.TclError: 53 | pass 54 | 55 | def onOk(self, _event=None): 56 | """ 57 | Called when the user clicked the validation button. Set the rvalue attributes to the value selected and close the window. 58 | 59 | Args: 60 | _event: not used but mandatory 61 | """ 62 | # send the data to the parent 63 | postIssue(self.err) 64 | 65 | def onError(self, _event=None): 66 | """ 67 | Close the dialog and set rvalue to None 68 | Args: 69 | _event: not used but mandatory 70 | """ 71 | self.rvalue = False 72 | self.app.destroy() 73 | -------------------------------------------------------------------------------- /documentation/pdoc/Pollenisator/core/Controllers/PortController.md: -------------------------------------------------------------------------------- 1 | Module Pollenisator.core.Controllers.PortController 2 | =================================================== 3 | Controller for Port object. Mostly handles conversion between mongo data and python objects 4 | 5 | Classes 6 | ------- 7 | 8 | `PortController(model)` 9 | : Inherits ControllerElement 10 | Controller for Port object. Mostly handles conversion between mongo data and python objects 11 | 12 | Constructor 13 | Args: 14 | model: Any instance of classe that inherits core.Models.Element 15 | 16 | ### Ancestors (in MRO) 17 | 18 | * core.Controllers.ControllerElement.ControllerElement 19 | 20 | ### Methods 21 | 22 | `addAllTool(self, toolname, wavename, scope, check)` 23 | : Add tool name to the model 24 | Args: 25 | toolname: the tool name to be added to the port 26 | wavename: the tool wave name 27 | scope: the tool is launched through a scope, this is the scope string 28 | check: boolean to indicate if the tool must be checked against port infos (matching services or port number) 29 | 30 | `doInsert(self, values)` 31 | : Insert the Port represented by this model in the database with the given values. 32 | 33 | Args: 34 | values: A dictionary crafted by PortView containg all form fields values needed. 35 | 36 | Returns: 37 | { 38 | '_id': The mongo ObjectId _id of the inserted command document. 39 | 'nbErrors': The number of objects that has not been inserted in database due to errors. 40 | } 41 | 42 | `doUpdate(self, values)` 43 | : Update the Port represented by this model in database with the given values. 44 | 45 | Args: 46 | values: A dictionary crafted by PortView containg all form fields values needed. 47 | 48 | Returns: 49 | The mongo ObjectId _id of the updated Port document. 50 | 51 | `getData(self)` 52 | : Return port attributes as a dictionnary matching Mongo stored ports 53 | Returns: 54 | dict with keys ip, port, proto, service, product, notes, _id, tags and infos 55 | 56 | `getDefects(self)` 57 | : Return port assigned defects as a list of mongo fetched defects dict 58 | Returns: 59 | list of defect raw mongo data dictionnaries 60 | 61 | `getTools(self)` 62 | : Return port assigned tools as a list of mongo fetched tools dict 63 | Returns: 64 | list of defect raw mongo data dictionnaries 65 | 66 | `getType(self)` 67 | : Returns a string describing the type of object 68 | Returns: 69 | "port" -------------------------------------------------------------------------------- /documentation/pdoc/Pollenisator/core/Controllers/ControllerElement.md: -------------------------------------------------------------------------------- 1 | Module Pollenisator.core.Controllers.ControllerElement 2 | ====================================================== 3 | Controller for model object. Mostly handles conversion between mongo data and python objects 4 | 5 | Classes 6 | ------- 7 | 8 | `ControllerElement(model)` 9 | : Controller for model object. Mostly handles conversion between mongo data and python objects 10 | 11 | Constructor 12 | Args: 13 | model: Any instance of classe that inherits core.Models.Element 14 | 15 | ### Methods 16 | 17 | `actualize(self)` 18 | : Ask the model to reload its data from database 19 | 20 | `addTag(self, newTag, override=True)` 21 | : Add the given tag name in model if it has it 22 | Args: 23 | newTag: a string describing a tag. 24 | override: if True (default), will force add of the new tag and remove tag of the same tag group. 25 | if False, will not add this tag. 26 | 27 | `delTag(self, tag)` 28 | : Delete the given tag name in model if it has it 29 | Args: 30 | tag: astring describing a tag. 31 | 32 | `doDelete(self)` 33 | : Ask the model to delete itself from database 34 | 35 | `getDbId(self)` 36 | : Returns the mongo database id of the model object 37 | Returns: 38 | bson.objectid ObjectId or None if self.model is None 39 | 40 | `getDetailedString(self)` 41 | : Return a string describing the model with more info than getModelRepr. E.G a port goes from "tcp/80" to "IP.IP.IP.IP tcp/80" 42 | Returns: 43 | a detailed string conversion of the model 44 | 45 | `getModelRepr(self)` 46 | : Returns a string representation of the model 47 | Returns: 48 | a string conversion of the model 49 | 50 | `getParent(self)` 51 | : Return the parent object database id of the model. E.G a port would returns its parent IP mongo id 52 | Returns: 53 | None if model is None 54 | bson.objectid ObjectId of the parent object 55 | 56 | `getTags(self)` 57 | : Returns a list of string secribing tags 58 | Returns: 59 | list of string 60 | 61 | `getType(self)` 62 | : Return a string describing the type of object 63 | Returns: 64 | "element" 65 | 66 | `setTags(self, tags)` 67 | : Set the model tags to given tags 68 | Args: 69 | tags: a list of string describing tags. 70 | 71 | `update(self)` 72 | : Update object in database with model data 73 | 74 | `updateInfos(self, infos)` 75 | : Update object in database with given dictionnary 76 | Args: 77 | infos: a dictionnary with updated values for this object. -------------------------------------------------------------------------------- /documentation/pdoc/Pollenisator/core/Controllers/DefectController.md: -------------------------------------------------------------------------------- 1 | Module Pollenisator.core.Controllers.DefectController 2 | ===================================================== 3 | Controller for defect object. Mostly handles conversion between mongo data and python objects 4 | 5 | Classes 6 | ------- 7 | 8 | `DefectController(model)` 9 | : Inherits ControllerElement 10 | Controller for defect object. Mostly handles conversion between mongo data and python objects 11 | 12 | Constructor 13 | Args: 14 | model: Any instance of classe that inherits core.Models.Element 15 | 16 | ### Ancestors (in MRO) 17 | 18 | * core.Controllers.ControllerElement.ControllerElement 19 | 20 | ### Methods 21 | 22 | `addAProof(self, formValues, index)` 23 | : Add a proof file to model defect. 24 | Args: 25 | formValues: the view form values as a dict. Key "Proof "+str(index) must exist 26 | index: the proof index in the form to insert 27 | 28 | `deleteProof(self, ind)` 29 | : Delete a proof file given a proof index 30 | Args: 31 | ind: the proof index in the form to delete 32 | 33 | `doInsert(self, values)` 34 | : Insert the Defect represented by this model in the database with the given values. 35 | 36 | Args: 37 | values: A dictionary crafted by DefectView containing all form fields values needed. 38 | 39 | Returns: 40 | { 41 | '_id': The mongo ObjectId _id of the inserted command document. 42 | 'nbErrors': The number of objects that has not been inserted in database due to errors. 43 | } 44 | 45 | `doUpdate(self, values)` 46 | : Update the Defect represented by this model in database with the given values. 47 | 48 | Args: 49 | values: A dictionary crafted by DefectView containg all form fields values needed. 50 | 51 | Returns: 52 | The mongo ObjectId _id of the updated Defect document. 53 | 54 | `getData(self)` 55 | : Return defect attributes as a dictionnary matching Mongo stored defects 56 | Returns: 57 | dict with keys title, ease, ipact, risk, redactor, type, notes, ip, port, proto, proofs, _id, tags, infos 58 | 59 | `getProof(self, ind)` 60 | : Returns proof file to model defect. 61 | Args: 62 | ind: the proof index in the form to get 63 | Returns: 64 | the local path of the downloaded proof (string) 65 | 66 | `getType(self)` 67 | : Returns a string describing the type of object 68 | Returns: 69 | "defect" 70 | 71 | `isAssigned(self)` 72 | : Checks if the defect model is assigned to an IP or is global 73 | Returns: 74 | bool -------------------------------------------------------------------------------- /core/Application/Dialogs/ChildDialogEditCommandSettings.py: -------------------------------------------------------------------------------- 1 | """Defines a dialog window for filling a tool settings""" 2 | 3 | import tkinter as tk 4 | import tkinter.ttk as ttk 5 | from core.Forms.FormPanel import FormPanel 6 | from core.Components.Utils import listPlugin 7 | from core.Views.ViewElement import ViewElement 8 | 9 | class ChildDialogEditCommandSettings: 10 | """ 11 | Open a child dialog of a tkinter application to fill settings for a command 12 | """ 13 | 14 | def __init__(self, parent, displayMsg="Choose a database to open:", default=None): 15 | """ 16 | Open a child dialog of a tkinter application to ask a combobox option. 17 | 18 | Args: 19 | parent: the tkinter parent view to use for this window construction. 20 | options: A list of string correspondig to options of the combobox 21 | displayMsg: The message that will explain to the user what he is choosing. 22 | default: Choose a default selected option (one of the string in options). default is None 23 | """ 24 | self.app = tk.Toplevel(parent) 25 | self.app.title("Upload result file") 26 | self.rvalue = None 27 | self.parent = parent 28 | appFrame = ttk.Frame(self.app) 29 | self.form = FormPanel() 30 | self.form.addFormLabel(displayMsg, side=tk.TOP) 31 | optionsFrame = self.form.addFormPanel(grid=True) 32 | optionsFrame.addFormLabel("Remote bin path", row=0, column=0) 33 | optionsFrame.addFormStr("bin", r".+", row=0, column=1) 34 | optionsFrame.addFormLabel("Plugin", row=1, column=0) 35 | optionsFrame.addFormCombo("plugin", tuple(listPlugin()), row=1, column=1) 36 | self.form.addFormButton("Cancel", self.onError) 37 | self.form.addFormButton("OK", self.onOk) 38 | self.form.constructView(appFrame) 39 | appFrame.pack(ipadx=10, ipady=10) 40 | self.app.transient(parent) 41 | try: 42 | self.app.grab_set() 43 | except tk.TclError: 44 | pass 45 | 46 | def onOk(self, _event): 47 | """ 48 | Called when the user clicked the validation button. Set the rvalue attributes to the value selected and close the window. 49 | """ 50 | # send the data to the parent 51 | res, msg = self.form.checkForm() 52 | if not res: 53 | tk.messagebox.showwarning( 54 | "Form not validated", msg, parent=self.app) 55 | return 56 | form_values = self.form.getValue() 57 | form_values_as_dicts = ViewElement.list_tuple_to_dict(form_values) 58 | self.rvalue = (form_values_as_dicts["bin"], form_values_as_dicts["plugin"]) 59 | self.app.destroy() 60 | 61 | def onError(self, _event=None): 62 | """ 63 | Close the dialog and set rvalue to None 64 | """ 65 | self.rvalue = None 66 | self.app.destroy() 67 | -------------------------------------------------------------------------------- /documentation/pdoc/Pollenisator/core/plugins/dnsrecon.md: -------------------------------------------------------------------------------- 1 | Module Pollenisator.core.plugins.dnsrecon 2 | ========================================= 3 | A plugin to parse dnsrecon scan 4 | 5 | Classes 6 | ------- 7 | 8 | `dnsrecon()` 9 | : Parent base plugin to be inherited 10 | Attributes: 11 | autoDetect: indicating to auto-detect that this plugin is able to auto detect. 12 | 13 | ### Ancestors (in MRO) 14 | 15 | * core.plugins.plugin.Plugin 16 | 17 | ### Methods 18 | 19 | `Parse(self, file_opened, **_kwargs)` 20 | : Parse a opened file to extract information 21 | Example: 22 | [ 23 | { 24 | "arguments": "./dnsrecon.py -r 10.0.0.0/24 -j /home/barre/test.json", 25 | "date": "2020-01-06 11:43:37.701513", 26 | "type": "ScanInfo" 27 | }, 28 | { 29 | "address": "10.0.0.1", 30 | "name": "_gateway", 31 | "type": "PTR" 32 | }, 33 | { 34 | "address": "10.0.0.77", 35 | "name": "barre-ThinkPad-E480", 36 | "type": "PTR" 37 | }, 38 | { 39 | "address": "10.0.0.77", 40 | "name": "barre-ThinkPad-E480.local", 41 | "type": "PTR" 42 | } 43 | ] 44 | Args: 45 | file_opened: the open file 46 | _kwargs: not used 47 | Returns: 48 | a tuple with 4 values (All set to None if Parsing wrong file): 49 | 0. notes: notes to be inserted in tool giving direct info to pentester 50 | 1. tags: a list of tags to be added to tool 51 | 2. lvl: the level of the command executed to assign to given targets 52 | 3. targets: a list of composed keys allowing retrieve/insert from/into database targerted objects. 53 | 54 | `checkReturnCode(self, returncode)` 55 | : Check if the command was executed successfully using the final exit code. 56 | Args: 57 | returncode: the exit code of the command executed. 58 | Returns: 59 | bool: True if successful returncode, False otherwise. 60 | 61 | `getFileOutputArg(self)` 62 | : Returns the command line paramater giving the output file 63 | Returns: 64 | string 65 | 66 | `getFileOutputExt(self)` 67 | : Returns the expected file extension for this command result file 68 | Returns: 69 | string 70 | 71 | `getFileOutputPath(self, commandExecuted)` 72 | : Returns the output file path given in the executed command using getFileOutputArg 73 | Args: 74 | commandExecuted: the command that was executed with an output file inside. 75 | Returns: 76 | string: the path to file created -------------------------------------------------------------------------------- /core/Application/Dialogs/ChildDialogCustomCommand.py: -------------------------------------------------------------------------------- 1 | """Deprecated. 2 | Ask the user to enter a command and select a worker and plugin to launch it.""" 3 | import tkinter as tk 4 | import tkinter.ttk as ttk 5 | from core.Components.Utils import listPlugin 6 | 7 | 8 | class ChildDialogCustomCommand: 9 | """ 10 | Open a child dialog of a tkinter application to ask details about 11 | a custom command to launch on target. 12 | """ 13 | 14 | def __init__(self, parent, workers, default_worker="localhost"): 15 | """ 16 | Open a child dialog of a tkinter application to ask details about 17 | a custom command to launch on target. 18 | 19 | Args: 20 | parent: the tkinter parent view to use for this window construction. 21 | workers: A list of workers registered. 22 | default_worker: a worker to be selected by default. 23 | """ 24 | self.app = tk.Toplevel(parent) 25 | appFrame = ttk.Frame(self.app) 26 | self.app.resizable(False, False) 27 | self.rvalue = None 28 | self.parent = parent 29 | lbl = ttk.Label(appFrame, text="Enter the custom command Name") 30 | lbl.pack() 31 | self.ent_customCommandName = ttk.Entry(appFrame, width="50") 32 | self.ent_customCommandName.pack() 33 | lbl = ttk.Label( 34 | appFrame, text="Enter the custom command to launch") 35 | lbl.pack() 36 | self.ent_customCommand = ttk.Entry(appFrame, width="50") 37 | self.ent_customCommand.pack() 38 | lbl2 = ttk.Label(appFrame, text="Select the parser:") 39 | lbl2.pack() 40 | parsers = listPlugin() 41 | self.box_template = ttk.Combobox( 42 | appFrame, values=tuple(parsers), state="readonly") 43 | self.box_template.set("Default.py") 44 | self.box_template.pack() 45 | lbl3 = ttk.Label(appFrame, text="Select the worker:") 46 | lbl3.pack() 47 | self.box_workers = ttk.Combobox( 48 | appFrame, values=tuple(workers), state="readonly") 49 | self.box_workers.set(default_worker) 50 | self.box_workers.pack() 51 | self.ok_button = ttk.Button(appFrame, text="OK", command=self.onOk) 52 | self.ok_button.pack(side=tk.BOTTOM, pady=5) 53 | appFrame.pack(ipady=10, ipadx=10) 54 | try: 55 | self.app.wait_visibility() 56 | self.app.transient(parent) 57 | self.app.grab_set() 58 | except tk.TclError: 59 | pass 60 | 61 | def onOk(self): 62 | """ 63 | Called when the user clicked the validation button. Set the rvalue attributes to the value selected and close the window. 64 | """ 65 | # send the data to the parent 66 | self.rvalue = (self.ent_customCommandName.get(), self.ent_customCommand.get( 67 | ), self.box_template.get(), self.box_workers.get()) 68 | self.app.destroy() 69 | -------------------------------------------------------------------------------- /documentation/pdoc/Pollenisator/core/Views/IpView.md: -------------------------------------------------------------------------------- 1 | Module Pollenisator.core.Views.IpView 2 | ===================================== 3 | View for ip object. Handle node in treeview and present forms to user when interacted with. 4 | 5 | Classes 6 | ------- 7 | 8 | `IpView(appTw, appViewFrame, mainApp, controller)` 9 | : View for ip object. Handle node in treeview and present forms to user when interacted with. 10 | Attributes: 11 | icon: icon name to show in treeview. Icon filename must be in icon directory. 12 | 13 | Constructor 14 | Args: 15 | appTw: a PollenisatorTreeview instance to put this view in 16 | appViewFrame: an view frame to build the forms in. 17 | mainApp: the Application instance 18 | controller: a CommandController for this view. 19 | 20 | ### Ancestors (in MRO) 21 | 22 | * core.Views.ViewElement.ViewElement 23 | 24 | ### Class variables 25 | 26 | `icon` 27 | : 28 | 29 | ### Methods 30 | 31 | `addDefectCallback(self, _event)` 32 | : Create an empty defect model and its attached view. Open this view insert window. 33 | 34 | Args: 35 | _event: Automatically generated with a button Callback, not used. 36 | 37 | `addInTreeview(self, parentNode=None, addChildren=True)` 38 | : Add this view in treeview. Also stores infos in application treeview. 39 | Args: 40 | parentNode: if None, will calculate the parent. If setted, forces the node to be inserted inside given parentNode. 41 | _addChildren: not used here 42 | 43 | `addPortCallback(self, _event)` 44 | : Create an empty port model and its attached view. Open this view insert window. 45 | 46 | Args: 47 | _event: Automatically generated with a button Callback, not used. 48 | 49 | `getParent(self)` 50 | : Return the id of the parent node in treeview. 51 | 52 | Returns: 53 | return the parent ips_node of application treeview 54 | 55 | `insertReceived(self)` 56 | : Called when a IP insertion is received by notification. 57 | Insert the node in summary. 58 | Can also insert in treeview with OOS tags. 59 | 60 | `key(self)` 61 | : Returns a key for sorting this node 62 | Returns: 63 | Tuple of 4 integers values representing the 4 parts of an ipv4 string, key to sort ips properly 64 | 65 | `openModifyWindow(self)` 66 | : Creates a tkinter form using Forms classes. This form aims to update or delete an existing Ip 67 | 68 | `split_ip(self)` 69 | : Split a IP address given as string into a 4-tuple of integers. 70 | Returns: 71 | Tuple of 4 integers values representing the 4 parts of an ipv4 string 72 | 73 | `updateReceived(self)` 74 | : Called when a IP update is received by notification. 75 | Update the ip node OOS status tags and add/remove it from summary. -------------------------------------------------------------------------------- /documentation/pdoc/Pollenisator/core/plugins/Nikto.md: -------------------------------------------------------------------------------- 1 | Module Pollenisator.core.plugins.Nikto 2 | ====================================== 3 | A plugin to parse nikto scan 4 | 5 | Functions 6 | --------- 7 | 8 | 9 | `parse_nikto_plain_text(output)` 10 | : Parse nikto raw result file 11 | Args: 12 | output: raw result file content 13 | 14 | Returns: 15 | a tuple with 4 values: 16 | 0. host 17 | 1. port 18 | 2. service (http or https) 19 | 3. found infos 20 | 21 | Classes 22 | ------- 23 | 24 | `Nikto()` 25 | : Parent base plugin to be inherited 26 | Attributes: 27 | autoDetect: indicating to auto-detect that this plugin is able to auto detect. 28 | 29 | ### Ancestors (in MRO) 30 | 31 | * core.plugins.plugin.Plugin 32 | 33 | ### Methods 34 | 35 | `Parse(self, file_opened, **_kwargs)` 36 | : Parse a opened file to extract information 37 | Args: 38 | file_opened: the open file 39 | _kwargs: not used 40 | Returns: 41 | a tuple with 4 values (All set to None if Parsing wrong file): 42 | 0. notes: notes to be inserted in tool giving direct info to pentester 43 | 1. tags: a list of tags to be added to tool 44 | 2. lvl: the level of the command executed to assign to given targets 45 | 3. targets: a list of composed keys allowing retrieve/insert from/into database targerted objects. 46 | 47 | `checkReturnCode(self, returncode)` 48 | : Check if the command was executed successfully using the final exit code. 49 | Args: 50 | returncode: the exit code of the command executed. 51 | Returns: 52 | bool: True if successful returncode, False otherwise. 53 | 54 | `getActions(self, toolmodel)` 55 | : Summary: Add buttons to the tool view. 56 | Args: 57 | * toolmodel : the tool model opened in the pollenisator client. 58 | Return: 59 | A dictionary with buttons text as key and function callback as value. 60 | 61 | `getFileOutputArg(self)` 62 | : Returns the command line paramater giving the output file 63 | Returns: 64 | string 65 | 66 | `getFileOutputExt(self)` 67 | : Returns the expected file extension for this command result file 68 | Returns: 69 | string 70 | 71 | `getFileOutputPath(self, commandExecuted)` 72 | : Returns the output file path given in the executed command using getFileOutputArg 73 | Args: 74 | commandExecuted: the command that was executed with an output file inside. 75 | Returns: 76 | string: the path to file created 77 | 78 | `openInBrowser(self)` 79 | : Callback of action Open 200 in browser 80 | Open scanned host port in browser as tabs. 81 | Args: 82 | _event: not used but mandatory -------------------------------------------------------------------------------- /documentation/pdoc/Pollenisator/core/plugins/Dirsearch.md: -------------------------------------------------------------------------------- 1 | Module Pollenisator.core.plugins.Dirsearch 2 | ========================================== 3 | A plugin to parse a dirsearch scan 4 | 5 | Functions 6 | --------- 7 | 8 | 9 | `parse_dirsearch_file(notes)` 10 | : Parse a dirsearch resulting raw text file 11 | Args: 12 | notes: the dirsearch raw text 13 | Returns: 14 | a dict with scanned hosts has keys and another dict as value: 15 | this dict has scanned ports as keys and another dict as value: 16 | this dict has 3 keys: 17 | * service: "http" or "https" 18 | * paths: a list of path found on port 19 | * statuscode: a list of status code matching the list of paths 20 | 21 | Classes 22 | ------- 23 | 24 | `Dirsearch()` 25 | : Parent base plugin to be inherited 26 | Attributes: 27 | autoDetect: indicating to auto-detect that this plugin is able to auto detect. 28 | 29 | Constructor 30 | 31 | ### Ancestors (in MRO) 32 | 33 | * core.plugins.plugin.Plugin 34 | 35 | ### Methods 36 | 37 | `Parse(self, file_opened, **_kwargs)` 38 | : Parse a opened file to extract information 39 | Args: 40 | file_opened: the open file 41 | _kwargs: not used 42 | Returns: 43 | a tuple with 4 values (All set to None if Parsing wrong file): 44 | 0. notes: notes to be inserted in tool giving direct info to pentester 45 | 1. tags: a list of tags to be added to tool 46 | 2. lvl: the level of the command executed to assign to given targets 47 | 3. targets: a list of composed keys allowing retrieve/insert from/into database targerted objects. 48 | 49 | `getActions(self, toolmodel)` 50 | : Summary: Add buttons to the tool view. 51 | Args: 52 | toolmodel : the tool model opened in the pollenisator client. 53 | Return: 54 | A dictionary with buttons text as key and function callback as value. 55 | 56 | `getFileOutputArg(self)` 57 | : Returns the command line paramater giving the output file 58 | Returns: 59 | string 60 | 61 | `getFileOutputExt(self)` 62 | : Returns the expected file extension for this command result file 63 | Returns: 64 | string 65 | 66 | `getFileOutputPath(self, commandExecuted)` 67 | : Returns the output file path given in the executed command using getFileOutputArg 68 | Args: 69 | commandExecuted: the command that was executed with an output file inside. 70 | Returns: 71 | string: the path to file created 72 | 73 | `openInBrowser(self)` 74 | : Callback of action Open 200 in browser 75 | Open all 200 status code in browser as tabs. If more that 10 status code 200 are to be opened, shows a warning. 76 | Args: 77 | _event: not used but mandatory -------------------------------------------------------------------------------- /documentation/pdoc/Pollenisator/core/Forms/FormTreevw.md: -------------------------------------------------------------------------------- 1 | Module Pollenisator.core.Forms.FormTreevw 2 | ========================================= 3 | Widget "Table" using a ttk Treeview 4 | 5 | Classes 6 | ------- 7 | 8 | `FormTreevw(name, headings, default_values=None, **kwargs)` 9 | : Form field representing a multi-lined input. 10 | 11 | Constructor for a form text 12 | 13 | Args: 14 | name: the treeview name (id). 15 | headings: table headers 16 | default_values: default values for the Table as a dict, default is None 17 | kwargs: same keyword args as you would give to ttk.Treeview 18 | 19 | ### Ancestors (in MRO) 20 | 21 | * core.Forms.Form.Form 22 | 23 | ### Methods 24 | 25 | `OnDoubleClick(self, event)` 26 | : Callback for double click event 27 | Edit value of double clicked item 28 | Args: 29 | event: automatically filled when event is triggered. 30 | 31 | `close(self)` 32 | : Option of the contextual menu : Close the contextual menu by doing nothing 33 | 34 | `constructView(self, parent)` 35 | : Create the text view inside the parent view given 36 | 37 | Args: 38 | parent: parent FormPanel. 39 | 40 | `copy(self)` 41 | : Option of the contextual menu : Copy entry text to clipboard 42 | 43 | `deleteItem(self)` 44 | : Callback for event 45 | Remove the selected item in the treeview 46 | Args: 47 | _event: not used but mandatory 48 | 49 | `getValue(self)` 50 | : Return the form value. Required for a form. 51 | 52 | Returns: 53 | Return the entry value as string. 54 | 55 | `popup(self, event)` 56 | : Fill the self.widgetMenuOpen and reraise the event in the editing window contextual menu 57 | 58 | Args: 59 | event: a ttk Treeview event autofilled. 60 | Contains information on what treeview node was clicked. 61 | 62 | `popupFocusOut(self)` 63 | : Callback for focus out event. Destroy contextual menu 64 | Args: 65 | _event: not used but mandatory 66 | 67 | `recurse_insert(self, values, parent='', columnsLen=None, odd=False)` 68 | : Recursive insert of a value in a table: 69 | Args: 70 | values: values to insert in the treeview 71 | * If it is a dict : Recurse 72 | * If it is a list : Add key without value and list values as subchildren 73 | * If it is a str : Insert into parent 74 | parent: the parent node treeview id to insert values into 75 | columnsLen: a table with the width of each column as list of 2 int 76 | odd: insert value as an odd value (the line will be tagged odd and change color). Default is False 77 | Returns: 78 | Final size of columns as list of two int 79 | 80 | `reset(self)` 81 | : Reset the treeview values (delete all lines) -------------------------------------------------------------------------------- /documentation/pdoc/Pollenisator/core/Forms/FormStr.md: -------------------------------------------------------------------------------- 1 | Module Pollenisator.core.Forms.FormStr 2 | ====================================== 3 | Describe tkinter Entry with default common args 4 | 5 | Classes 6 | ------- 7 | 8 | `FormStr(name, regexValidation='', default='', contextualMenu=None, **kwargs)` 9 | : Form field representing a string input. 10 | Default setted values: 11 | width=20 12 | if pack : padx = pady = 5, side = left 13 | if grid: row = column = 0 sticky = "East" 14 | 15 | Constructor for a form entry 16 | 17 | Args: 18 | name: the entry name (id). 19 | regexValidation: a regex used to check the input in the checkForm function., default is "" 20 | default: a default value for the Entry, defauult is "" 21 | contextualMenu: (Opt.) a contextualMenu to open when right clicked. default is None 22 | kwargs: same keyword args as you would give to ttk.Entry 23 | 24 | ### Ancestors (in MRO) 25 | 26 | * core.Forms.Form.Form 27 | 28 | ### Methods 29 | 30 | `checkForm(self)` 31 | : Check if this form is correctly filled. Check with the regex validation given in constructor. 32 | 33 | Returns: 34 | { 35 | "correct": True if the form is correctly filled, False otherwise. 36 | "msg": A message indicating what is not correctly filled. 37 | } 38 | 39 | `close(self)` 40 | : Option of the contextual menu : Close the contextual menu by doing nothing 41 | 42 | `constructView(self, parent)` 43 | : Create the string view inside the parent view given 44 | 45 | Args: 46 | parent: parent FormPanel. 47 | 48 | `copy(self)` 49 | : Option of the contextual menu : Copy entry text to clipboard 50 | 51 | `cut(self)` 52 | : Option of the contextual menu : Cut entry text to clipboard 53 | 54 | `getValue(self)` 55 | : Return the form value. Required for a form. 56 | 57 | Returns: 58 | Return the entry value as string. 59 | 60 | `paste(self)` 61 | : Option of the contextual menu : Paste clipboard content to entry 62 | 63 | `popup(self, event)` 64 | : Fill the self.widgetMenuOpen and reraise the event in the editing window contextual menu 65 | 66 | Args: 67 | event: a ttk Treeview event autofilled. Contains information on what treeview node was clicked. 68 | 69 | `popupFocusOut(self)` 70 | : Callback for focus out event. Destroy contextual menu 71 | Args: 72 | _event: not used but mandatory 73 | 74 | `selectAll(self, _event)` 75 | : Callback to select all the text in the date Entry. 76 | Args: 77 | _event: mandatory but not used 78 | Returns: 79 | Returns the string "break" to prevent the event to be treated by the Entry, thus inserting unwanted value. 80 | 81 | `setFocus(self)` 82 | : Set the focus to the ttk entry widget. -------------------------------------------------------------------------------- /documentation/pdoc/Pollenisator/core/Controllers/WaveController.md: -------------------------------------------------------------------------------- 1 | Module Pollenisator.core.Controllers.WaveController 2 | =================================================== 3 | Controller for Wave object. Mostly handles conversion between mongo data and python objects 4 | 5 | Classes 6 | ------- 7 | 8 | `WaveController(model)` 9 | : Inherits ControllerElement 10 | Controller for Wave object. Mostly handles conversion between mongo data and python objects 11 | 12 | Constructor 13 | Args: 14 | model: Any instance of classe that inherits core.Models.Element 15 | 16 | ### Ancestors (in MRO) 17 | 18 | * core.Controllers.ControllerElement.ControllerElement 19 | 20 | ### Methods 21 | 22 | `doInsert(self, values)` 23 | : Insert the Wave represented by this model in the database with the given values. 24 | 25 | Args: 26 | values: A dictionary crafted by WaveView containing all form fields values needed. 27 | 28 | Returns: 29 | { 30 | '_id': The mongo ObjectId _id of the inserted command document. 31 | 'nbErrors': The number of objects that has not been inserted in database due to errors. 32 | } 33 | 34 | `doUpdate(self, values)` 35 | : Update the Wave represented by this model in database with the given values. 36 | 37 | Args: 38 | values: A dictionary crafted by WaveView containg all form fields values needed. 39 | 40 | Returns: 41 | The mongo ObjectId _id of the updated Wave document. 42 | 43 | `getAllTools(self)` 44 | : Return all tools being part of this wave as a list of mongo fetched tools dict. 45 | Differs from getTools as it fetches all tools of the name and not only tools of level wave. 46 | Returns: 47 | list of defect raw mongo data dictionnaries 48 | 49 | `getData(self)` 50 | : Return wave attributes as a dictionnary matching Mongo stored waves 51 | Returns: 52 | dict with keys wave, wave_commands, tags and infos 53 | 54 | `getIntervals(self)` 55 | : Return scope assigned intervals as a list of mongo fetched intervals dict 56 | Returns: 57 | list of defect raw mongo data dictionnaries 58 | 59 | `getScopes(self)` 60 | : Return wave assigned scopes as a list of mongo fetched scopes dict 61 | Returns: 62 | list of defect raw mongo data dictionnaries 63 | 64 | `getTools(self)` 65 | : Return scope assigned tools as a list of mongo fetched tools dict 66 | Returns: 67 | list of defect raw mongo data dictionnaries 68 | 69 | `getType(self)` 70 | : Returns a string describing the type of object 71 | Returns: 72 | "wave" 73 | 74 | `isLaunchableNow(self)` 75 | : Returns True if the tool matches criteria to be launched 76 | (current time matches one of interval object assigned to this wave) 77 | Returns: 78 | bool -------------------------------------------------------------------------------- /documentation/pdoc/Pollenisator/core/plugins/HttpMethods.md: -------------------------------------------------------------------------------- 1 | Module Pollenisator.core.plugins.HttpMethods 2 | ============================================ 3 | A plugin to parse nmap httpmethods scan 4 | 5 | Functions 6 | --------- 7 | 8 | 9 | `parse(text)` 10 | : Args: 11 | text: raw httpmerhof results 12 | Returns 13 | A tuple with 5 values: (every value will be empty if not matching a httpmethods scan) 14 | 0. host scanned 15 | 1. port scanned 16 | 2. proto of the port scanned 17 | 3. service scanned (http or https) 18 | 4. a list of risky methods found 19 | 5. a list of supported methods found 20 | Example of output : 21 | Starting Nmap 7.01 ( https://nmap.org ) at 2019-08-06 16:59 CEST 22 | Nmap scan report for httprs.primx.fr (172.22.0.6) 23 | Host is up (0.00040s latency). 24 | rDNS record for 172.22.0.6: autodiscover.primx.fr 25 | PORT STATE SERVICE 26 | 443/tcp open https 27 | | http-methods: 28 | | Supported Methods: OPTIONS TRACE GET HEAD POST 29 | |_ Potentially risky methods: TRACE 30 | MAC Address: 00:E0:81:C1:FD:7E (Tyan Computer) 31 | Nmap done: 1 IP address (1 host up) scanned in 0.95 seconds 32 | 33 | Classes 34 | ------- 35 | 36 | `HttpMethods()` 37 | : Parent base plugin to be inherited 38 | Attributes: 39 | autoDetect: indicating to auto-detect that this plugin is able to auto detect. 40 | 41 | ### Ancestors (in MRO) 42 | 43 | * core.plugins.plugin.Plugin 44 | 45 | ### Methods 46 | 47 | `Parse(self, file_opened, **_kwargs)` 48 | : Parse a opened file to extract information 49 | Args: 50 | file_opened: the open file 51 | _kwargs: not used 52 | Returns: 53 | a tuple with 4 values (All set to None if Parsing wrong file): 54 | 0. notes: notes to be inserted in tool giving direct info to pentester 55 | 1. tags: a list of tags to be added to tool 56 | 2. lvl: the level of the command executed to assign to given targets 57 | 3. targets: a list of composed keys allowing retrieve/insert from/into database targerted objects. 58 | 59 | `checkReturnCode(self, _returncode)` 60 | : Default check for return code 61 | Returns: 62 | Always True. To be overidden 63 | 64 | `getFileOutputArg(self)` 65 | : Returns the command line paramater giving the output file 66 | Returns: 67 | string 68 | 69 | `getFileOutputExt(self)` 70 | : Returns the expected file extension for this command result file 71 | Returns: 72 | string 73 | 74 | `getFileOutputPath(self, commandExecuted)` 75 | : Returns the output file path given in the executed command using getFileOutputArg 76 | Args: 77 | commandExecuted: the command that was executed with an output file inside. 78 | Returns: 79 | string: the path to file created -------------------------------------------------------------------------------- /core/Application/Dialogs/ChildDialogDefectView.py: -------------------------------------------------------------------------------- 1 | """This class pop a defect view form in a subdialog""" 2 | 3 | import tkinter as tk 4 | import tkinter.ttk as ttk 5 | from core.Views.DefectView import DefectView 6 | from core.Controllers.DefectController import DefectController 7 | from core.Models.Defect import Defect 8 | 9 | class DummyMainApp: 10 | def __init__(self, settings): 11 | self.settings = settings 12 | 13 | class ChildDialogDefectView: 14 | """ 15 | Open a child dialog of a tkinter application to answer a question. 16 | """ 17 | def __init__(self, parent, settings, defectModel=None): 18 | """ 19 | Open a child dialog of a tkinter application to choose autoscan settings. 20 | 21 | Args: 22 | parent: the tkinter parent view to use for this window construction. 23 | defectModel : A Defect Model object to load default values. None to have empty fields, default is None. 24 | """ 25 | self.app = tk.Toplevel(parent) 26 | self.app.title("Add a security defect") 27 | self.app.resizable(False, False) 28 | self.rvalue = None 29 | appFrame = ttk.Frame(self.app) 30 | self.isInsert = defectModel is None 31 | if self.isInsert: 32 | defectModel = Defect() 33 | 34 | self.defect_vw = DefectView(None, appFrame, DummyMainApp(settings), 35 | DefectController(defectModel)) 36 | if self.isInsert: 37 | self.defect_vw.openInsertWindow(addButtons=False) 38 | else: 39 | self.defect_vw.openModifyWindow(addButtons=False) 40 | 41 | ok_button = ttk.Button(appFrame, text="OK") 42 | ok_button.pack(side="right", padx=5, pady=10) 43 | ok_button.bind('', self.okCallback) 44 | cancel_button = ttk.Button(appFrame, text="Cancel") 45 | cancel_button.pack(side="right", padx=5, pady=10) 46 | cancel_button.bind('', self.cancel) 47 | appFrame.pack(fill=tk.BOTH, ipady=10, ipadx=10) 48 | self.app.transient(parent) 49 | try: 50 | self.app.wait_visibility() 51 | self.app.grab_set() 52 | except tk.TclError: 53 | pass 54 | 55 | def cancel(self, _event=None): 56 | """called when canceling the window. 57 | Close the window and set rvalue to False 58 | Args: 59 | _event: Not used but mandatory""" 60 | self.rvalue = False 61 | self.app.destroy() 62 | 63 | def okCallback(self, _event=None): 64 | """called when pressing the validating button 65 | Close the window if the form is valid. 66 | Set rvalue to True and perform the defect update/insert if validated. 67 | Args: 68 | _event: Not used but mandatory""" 69 | 70 | if self.isInsert: 71 | res, _ = self.defect_vw.insert() 72 | else: 73 | res, _ = self.defect_vw.update() 74 | if res: 75 | self.rvalue = True 76 | self.app.destroy() 77 | -------------------------------------------------------------------------------- /documentation/pdoc/Pollenisator/core/Forms/FormFile.md: -------------------------------------------------------------------------------- 1 | Module Pollenisator.core.Forms.FormFile 2 | ======================================= 3 | Widget with an entry to type a file path and a '...' button to pick from file explorer. 4 | 5 | Classes 6 | ------- 7 | 8 | `FormFile(name, regexValidation='', default='', **kwargs)` 9 | : Form field representing a path input. 10 | Default setted values: 11 | state="readonly" 12 | if pack : padx = pady = 5, side = "right" 13 | if grid: row = column = 0 sticky = "west" 14 | entry "width"= 20 15 | Additional values to kwargs: 16 | modes: either "file" or "directory" to choose which type of path picker to open 17 | 18 | Constructor for a form file 19 | 20 | Args: 21 | name: the entry name (id). 22 | regexValidation: a regex used to check the input in the checkForm function., default is "" 23 | default: a default value for the Entry, default is "" 24 | kwargs: same keyword args as you would give to ttk.Frame + "modes" which is either "file" or "directory" 25 | to choose which type of path picker to open 26 | 27 | ### Ancestors (in MRO) 28 | 29 | * core.Forms.Form.Form 30 | 31 | ### Methods 32 | 33 | `checkForm(self)` 34 | : Check if this form is correctly filled. Check with the regex validation given in constructor. 35 | 36 | Returns: 37 | { 38 | "correct": True if the form is correctly filled, False otherwise. 39 | "msg": A message indicating what is not correctly filled. 40 | } 41 | 42 | `constructView(self, parent)` 43 | : Create the string view inside the parent view given 44 | 45 | Args: 46 | parent: parent FormPanel. 47 | 48 | `getValue(self)` 49 | : Return the form value. Required for a form. 50 | 51 | Returns: 52 | Return the entry value as string. 53 | 54 | `on_click(self)` 55 | : Callback when '...' is clicked and modes Open a file selector (tkinter.filedialog.askopenfilename) 56 | Args: 57 | _event: not used but mandatory 58 | Returns: 59 | None if no file name is picked, 60 | the selected file full path otherwise. 61 | 62 | `on_click_dir(self)` 63 | : Callback when '...' is clicked and modes="directory" was set. 64 | Open a directory selector (tkinter.filedialog.askdirectory) 65 | Args: 66 | _event: not used but mandatory 67 | Returns: 68 | None if no directory is picked, 69 | the selected directory full path otherwise. 70 | 71 | `selectAll(self, _event)` 72 | : Callback to select all the text in the date Entry. 73 | Args: 74 | _event: mandatory but not used 75 | Returns: 76 | Returns the string "break" to prevent the event to be treated by the Entry, thus inserting unwanted value. 77 | 78 | `setFocus(self)` 79 | : Set the focus to the ttk entry part of the widget. -------------------------------------------------------------------------------- /documentation/pdoc/Pollenisator/core/plugins/TestSSL.md: -------------------------------------------------------------------------------- 1 | Module Pollenisator.core.plugins.TestSSL 2 | ======================================== 3 | A plugin to parse testssl.sh 4 | 5 | Functions 6 | --------- 7 | 8 | 9 | `parseWarnings(file_opened)` 10 | : Parse the result of a testssl json output file 11 | Args: 12 | file_opened: the opened file reference 13 | 14 | Returns: 15 | Returns a tuple with (None values if not matching a testssl output): 16 | - a list of string for each testssl NOT ok, WARN, or MEDIUM warnings 17 | - a dict of targeted objects with database id as key and a unique key as a mongo search pipeline ({}) 18 | 19 | Classes 20 | ------- 21 | 22 | `TestSSL()` 23 | : Parent base plugin to be inherited 24 | Attributes: 25 | autoDetect: indicating to auto-detect that this plugin is able to auto detect. 26 | 27 | ### Ancestors (in MRO) 28 | 29 | * core.plugins.plugin.Plugin 30 | 31 | ### Methods 32 | 33 | `Parse(self, file_opened, **_kwargs)` 34 | : Parse a opened file to extract information 35 | Args: 36 | file_opened: the open file 37 | _kwargs: not used 38 | Returns: 39 | a tuple with 4 values (All set to None if Parsing wrong file): 40 | 0. notes: notes to be inserted in tool giving direct info to pentester 41 | 1. tags: a list of tags to be added to tool 42 | 2. lvl: the level of the command executed to assign to given targets 43 | 3. targets: a list of composed keys allowing retrieve/insert from/into database targerted objects. 44 | 45 | `changeCommand(self, command, outputDir, toolname)` 46 | : Summary: Complete the given command with the tool output file option and filename absolute path. 47 | Args: 48 | * command : the command line to complete 49 | * outputDir : the directory where the output file must be generated 50 | * toolname : the tool name (to be included in the output file name) 51 | Return: 52 | The command complete with the tool output file option and filename absolute path. 53 | 54 | `checkReturnCode(self, _returncode)` 55 | : Default check for return code 56 | Returns: 57 | Always True. To be overidden 58 | 59 | `getFileOutputArg(self)` 60 | : Return the expected argument for the tool that will create an output file. 61 | Returns: 62 | Returns a string containing the argument to look for, with a space at the beginning and at the end. 63 | 64 | `getFileOutputExt(self)` 65 | : Returns the expected file extension for this command result file 66 | Returns: 67 | string 68 | 69 | `getFileOutputPath(self, commandExecuted)` 70 | : Returns the output file path given in the executed command using getFileOutputArg 71 | Args: 72 | commandExecuted: the command that was executed with an output file inside. 73 | Returns: 74 | string: the path to file created --------------------------------------------------------------------------------