404
+ +Page not found
+ + +diff --git a/docs/404.html b/docs/404.html new file mode 100644 index 0000000..3065297 --- /dev/null +++ b/docs/404.html @@ -0,0 +1,106 @@ + + +
+ + + + +Page not found
+ + +PhishFlood is a python tool that uses playwright to automate the process of filling phishing websites with fake credentials.
+++NOTE This tool is meant for educational and research purposes only. Unauthorized use of this tool is strictly prohibited. The developers are not responsible for any misuse or damage caused by this tool.
+
Example page interaction: +
+Example output:
+{
+ "url": "https://online.ib-internet-bakingssg.com/",
+ "html": "...",
+ "forms": [
+ {
+ "meta_id": 0,
+ "id": null,
+ "action": null,
+ "method": "none",
+ "type": null,
+ "inputs": [
+ {
+ "meta_id": 0,
+ "id": null,
+ "name": "UID",
+ "placeholder": null,
+ "type": "text"
+ },
+ {
+ "meta_id": 1,
+ "id": null,
+ "name": "pin",
+ "placeholder": null,
+ "type": "number"
+ }
+ ]
+ }
+ ],
+ "actions": [
+ {
+ "action": "fill",
+ "form": 0,
+ "input": 0,
+ "value": "cyber_dragon83",
+ "status": "success"
+ },
+ {
+ "action": "fill",
+ "form": 0,
+ "input": 1,
+ "value": "383510",
+ "status": "success"
+ }
+ ]
+}
+
+git clone https://github.com/solanav/phishflood.git
+cd phishflood
+
+poetry install
+
+poetry run python -m phishflood example.org
+
+PhishFlood will launch a Playwright browser instance in the background and start filling in fake credentials on known phishing websites. The results will be stored on the samples/
directory.
To start the API and all required componets (RabbitMQ, PostgreSQL and the workers) you can run:
+docker compose -f docker/docker-compose.yml --compatibility up --build
+
+The API will be running in localhost:8000
and you can start exploring the different endpoints through the web UI:
And here is a sample of one of the endpoints
+ +We use pytest for testing. To run the tests, use the following command:
+poetry run pytest
+
+Make sure to have a controlled testing environment, as the tests involve interactions with websites.
+If you would like to contribute to this project, please open an issue or submit a pull request. We welcome any suggestions, improvements, or bug fixes.
+Here is a general overview of the code in this repository so you have an easier time contributing:
+- api/
: django project that provides the API to submit new cases and retrieve results.
+- credfind/
: module that finds forms and inputs in a given HTML source file.
+- credgen/
: module that generates random (realistic) credentials for inputs found in credfind
.
+- data/
: folder with emails and passwords for the credgen
module.
+- docker/
: contains the docker-compose and Dockerfiles necesary to get up and running the service.
+- pages/
: HTML sites to test the modules.
+- phishflood/
: main module that glues credfind and credgen, using playwright.
+- samples/
: output for the information obtained when using the phishflood
manually as opposed to using it through the API.
+- tests/
: folder containing the unittests that check everything is behaving as expected.
+- entrypoint.sh
: script that prepares the django api
and launches it. Used in docker/Dockerfile.api
.
This project is licensed under the AGPL License.
+ +' + escapeHtml(summary) +'
' + noResultsText + '
'); + } +} + +function doSearch () { + var query = document.getElementById('mkdocs-search-query').value; + if (query.length > min_search_length) { + if (!window.Worker) { + displayResults(search(query)); + } else { + searchWorker.postMessage({query: query}); + } + } else { + // Clear results for short queries + displayResults([]); + } +} + +function initSearch () { + var search_input = document.getElementById('mkdocs-search-query'); + if (search_input) { + search_input.addEventListener("keyup", doSearch); + } + var term = getSearchTermFromLocation(); + if (term) { + search_input.value = term; + doSearch(); + } +} + +function onWorkerMessage (e) { + if (e.data.allowSearch) { + initSearch(); + } else if (e.data.results) { + var results = e.data.results; + displayResults(results); + } else if (e.data.config) { + min_search_length = e.data.config.min_search_length-1; + } +} + +if (!window.Worker) { + console.log('Web Worker API not supported'); + // load index in main thread + $.getScript(joinUrl(base_url, "search/worker.js")).done(function () { + console.log('Loaded worker'); + init(); + window.postMessage = function (msg) { + onWorkerMessage({data: msg}); + }; + }).fail(function (jqxhr, settings, exception) { + console.error('Could not load worker.js'); + }); +} else { + // Wrap search in a web worker + var searchWorker = new Worker(joinUrl(base_url, "search/worker.js")); + searchWorker.postMessage({init: true}); + searchWorker.onmessage = onWorkerMessage; +} diff --git a/docs/search/search_index.json b/docs/search/search_index.json new file mode 100644 index 0000000..a8f86b2 --- /dev/null +++ b/docs/search/search_index.json @@ -0,0 +1 @@ +{"config":{"indexing":"full","lang":["en"],"min_search_length":3,"prebuild_index":false,"separator":"[\\s\\-]+"},"docs":[{"location":"","text":"PhishFlood PhishFlood is a python tool that uses playwright to automate the process of filling phishing websites with fake credentials. NOTE This tool is meant for educational and research purposes only. Unauthorized use of this tool is strictly prohibited. The developers are not responsible for any misuse or damage caused by this tool. Table of content PhishFlood Table of content Demo Installation Prerequisites Clone the Repository Install Dependencies with Poetry Usage Running CLI Running the API Testing Contributing Architecture License Demo Example page interaction: Example output: { \"url\": \"https://online.ib-internet-bakingssg.com/\", \"html\": \"...\", \"forms\": [ { \"meta_id\": 0, \"id\": null, \"action\": null, \"method\": \"none\", \"type\": null, \"inputs\": [ { \"meta_id\": 0, \"id\": null, \"name\": \"UID\", \"placeholder\": null, \"type\": \"text\" }, { \"meta_id\": 1, \"id\": null, \"name\": \"pin\", \"placeholder\": null, \"type\": \"number\" } ] } ], \"actions\": [ { \"action\": \"fill\", \"form\": 0, \"input\": 0, \"value\": \"cyber_dragon83\", \"status\": \"success\" }, { \"action\": \"fill\", \"form\": 0, \"input\": 1, \"value\": \"383510\", \"status\": \"success\" } ] } Installation Prerequisites Python 3.11 or higher Git Poetry Clone the Repository git clone https://github.com/solanav/phishflood.git cd phishflood Install Dependencies with Poetry poetry install Usage Running CLI poetry run python -m phishflood example.org PhishFlood will launch a Playwright browser instance in the background and start filling in fake credentials on known phishing websites. The results will be stored on the samples/ directory. Running the API To start the API and all required componets (RabbitMQ, PostgreSQL and the workers) you can run: docker compose -f docker/docker-compose.yml --compatibility up --build The API will be running in localhost:8000 and you can start exploring the different endpoints through the web UI: And here is a sample of one of the endpoints Testing We use pytest for testing. To run the tests, use the following command: poetry run pytest Make sure to have a controlled testing environment, as the tests involve interactions with websites. Contributing If you would like to contribute to this project, please open an issue or submit a pull request. We welcome any suggestions, improvements, or bug fixes. Architecture Here is a general overview of the code in this repository so you have an easier time contributing: - api/ : django project that provides the API to submit new cases and retrieve results. - credfind/ : module that finds forms and inputs in a given HTML source file. - credgen/ : module that generates random (realistic) credentials for inputs found in credfind . - data/ : folder with emails and passwords for the credgen module. - docker/ : contains the docker-compose and Dockerfiles necesary to get up and running the service. - pages/ : HTML sites to test the modules. - phishflood/ : main module that glues credfind and credgen, using playwright . - samples/ : output for the information obtained when using the phishflood manually as opposed to using it through the API. - tests/ : folder containing the unittests that check everything is behaving as expected. - entrypoint.sh : script that prepares the django api and launches it. Used in docker/Dockerfile.api . License This project is licensed under the AGPL License .","title":"PhishFlood"},{"location":"#phishflood","text":"PhishFlood is a python tool that uses playwright to automate the process of filling phishing websites with fake credentials. NOTE This tool is meant for educational and research purposes only. Unauthorized use of this tool is strictly prohibited. The developers are not responsible for any misuse or damage caused by this tool.","title":"PhishFlood"},{"location":"#table-of-content","text":"PhishFlood Table of content Demo Installation Prerequisites Clone the Repository Install Dependencies with Poetry Usage Running CLI Running the API Testing Contributing Architecture License","title":"Table of content"},{"location":"#demo","text":"Example page interaction: Example output: { \"url\": \"https://online.ib-internet-bakingssg.com/\", \"html\": \"...\", \"forms\": [ { \"meta_id\": 0, \"id\": null, \"action\": null, \"method\": \"none\", \"type\": null, \"inputs\": [ { \"meta_id\": 0, \"id\": null, \"name\": \"UID\", \"placeholder\": null, \"type\": \"text\" }, { \"meta_id\": 1, \"id\": null, \"name\": \"pin\", \"placeholder\": null, \"type\": \"number\" } ] } ], \"actions\": [ { \"action\": \"fill\", \"form\": 0, \"input\": 0, \"value\": \"cyber_dragon83\", \"status\": \"success\" }, { \"action\": \"fill\", \"form\": 0, \"input\": 1, \"value\": \"383510\", \"status\": \"success\" } ] }","title":"Demo"},{"location":"#installation","text":"","title":"Installation"},{"location":"#prerequisites","text":"Python 3.11 or higher Git Poetry","title":"Prerequisites"},{"location":"#clone-the-repository","text":"git clone https://github.com/solanav/phishflood.git cd phishflood","title":"Clone the Repository"},{"location":"#install-dependencies-with-poetry","text":"poetry install","title":"Install Dependencies with Poetry"},{"location":"#usage","text":"","title":"Usage"},{"location":"#running-cli","text":"poetry run python -m phishflood example.org PhishFlood will launch a Playwright browser instance in the background and start filling in fake credentials on known phishing websites. The results will be stored on the samples/ directory.","title":"Running CLI"},{"location":"#running-the-api","text":"To start the API and all required componets (RabbitMQ, PostgreSQL and the workers) you can run: docker compose -f docker/docker-compose.yml --compatibility up --build The API will be running in localhost:8000 and you can start exploring the different endpoints through the web UI: And here is a sample of one of the endpoints","title":"Running the API"},{"location":"#testing","text":"We use pytest for testing. To run the tests, use the following command: poetry run pytest Make sure to have a controlled testing environment, as the tests involve interactions with websites.","title":"Testing"},{"location":"#contributing","text":"If you would like to contribute to this project, please open an issue or submit a pull request. We welcome any suggestions, improvements, or bug fixes.","title":"Contributing"},{"location":"#architecture","text":"Here is a general overview of the code in this repository so you have an easier time contributing: - api/ : django project that provides the API to submit new cases and retrieve results. - credfind/ : module that finds forms and inputs in a given HTML source file. - credgen/ : module that generates random (realistic) credentials for inputs found in credfind . - data/ : folder with emails and passwords for the credgen module. - docker/ : contains the docker-compose and Dockerfiles necesary to get up and running the service. - pages/ : HTML sites to test the modules. - phishflood/ : main module that glues credfind and credgen, using playwright . - samples/ : output for the information obtained when using the phishflood manually as opposed to using it through the API. - tests/ : folder containing the unittests that check everything is behaving as expected. - entrypoint.sh : script that prepares the django api and launches it. Used in docker/Dockerfile.api .","title":"Architecture"},{"location":"#license","text":"This project is licensed under the AGPL License .","title":"License"}]} \ No newline at end of file diff --git a/docs/search/worker.js b/docs/search/worker.js new file mode 100644 index 0000000..8628dbc --- /dev/null +++ b/docs/search/worker.js @@ -0,0 +1,133 @@ +var base_path = 'function' === typeof importScripts ? '.' : '/search/'; +var allowSearch = false; +var index; +var documents = {}; +var lang = ['en']; +var data; + +function getScript(script, callback) { + console.log('Loading script: ' + script); + $.getScript(base_path + script).done(function () { + callback(); + }).fail(function (jqxhr, settings, exception) { + console.log('Error: ' + exception); + }); +} + +function getScriptsInOrder(scripts, callback) { + if (scripts.length === 0) { + callback(); + return; + } + getScript(scripts[0], function() { + getScriptsInOrder(scripts.slice(1), callback); + }); +} + +function loadScripts(urls, callback) { + if( 'function' === typeof importScripts ) { + importScripts.apply(null, urls); + callback(); + } else { + getScriptsInOrder(urls, callback); + } +} + +function onJSONLoaded () { + data = JSON.parse(this.responseText); + var scriptsToLoad = ['lunr.js']; + if (data.config && data.config.lang && data.config.lang.length) { + lang = data.config.lang; + } + if (lang.length > 1 || lang[0] !== "en") { + scriptsToLoad.push('lunr.stemmer.support.js'); + if (lang.length > 1) { + scriptsToLoad.push('lunr.multi.js'); + } + if (lang.includes("ja") || lang.includes("jp")) { + scriptsToLoad.push('tinyseg.js'); + } + for (var i=0; i < lang.length; i++) { + if (lang[i] != 'en') { + scriptsToLoad.push(['lunr', lang[i], 'js'].join('.')); + } + } + } + loadScripts(scriptsToLoad, onScriptsLoaded); +} + +function onScriptsLoaded () { + console.log('All search scripts loaded, building Lunr index...'); + if (data.config && data.config.separator && data.config.separator.length) { + lunr.tokenizer.separator = new RegExp(data.config.separator); + } + + if (data.index) { + index = lunr.Index.load(data.index); + data.docs.forEach(function (doc) { + documents[doc.location] = doc; + }); + console.log('Lunr pre-built index loaded, search ready'); + } else { + index = lunr(function () { + if (lang.length === 1 && lang[0] !== "en" && lunr[lang[0]]) { + this.use(lunr[lang[0]]); + } else if (lang.length > 1) { + this.use(lunr.multiLanguage.apply(null, lang)); // spread operator not supported in all browsers: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_operator#Browser_compatibility + } + this.field('title'); + this.field('text'); + this.ref('location'); + + for (var i=0; i < data.docs.length; i++) { + var doc = data.docs[i]; + this.add(doc); + documents[doc.location] = doc; + } + }); + console.log('Lunr index built, search ready'); + } + allowSearch = true; + postMessage({config: data.config}); + postMessage({allowSearch: allowSearch}); +} + +function init () { + var oReq = new XMLHttpRequest(); + oReq.addEventListener("load", onJSONLoaded); + var index_path = base_path + '/search_index.json'; + if( 'function' === typeof importScripts ){ + index_path = 'search_index.json'; + } + oReq.open("GET", index_path); + oReq.send(); +} + +function search (query) { + if (!allowSearch) { + console.error('Assets for search still loading'); + return; + } + + var resultDocuments = []; + var results = index.search(query); + for (var i=0; i < results.length; i++){ + var result = results[i]; + doc = documents[result.ref]; + doc.summary = doc.text.substring(0, 200); + resultDocuments.push(doc); + } + return resultDocuments; +} + +if( 'function' === typeof importScripts ) { + onmessage = function (e) { + if (e.data.init) { + init(); + } else if (e.data.query) { + postMessage({ results: search(e.data.query) }); + } else { + console.error("Worker - Unrecognized message: " + e); + } + }; +} diff --git a/docs/sitemap.xml b/docs/sitemap.xml new file mode 100644 index 0000000..0f8724e --- /dev/null +++ b/docs/sitemap.xml @@ -0,0 +1,3 @@ + +