Code Monkey home page Code Monkey logo

faraday_plugins's Introduction

Install

pip install faraday-plugins

Commands

List Plugins

List all plugins and if its compatible with command or/and report

Optional params:

  • -cpf / --custom-plugins-folder PATH: If given will also look for custom plugins on that path
faraday-plugins list-plugins

Test autodetect plugin from command

faraday-plugins detect-command "ping -c 4 www.google.com"

Faraday Plugin: ping

Test process command with plugin

Optional params:

  • --plugin_id PLUGIN_ID: Dont detect the plugin, use this one
  • -cpf / --custom-plugins-folder PATH: If given will also look for custom plugins on that path
  • -dr / --dont-run: Dont run, just show the generated command
  • -o / --output-file PATH: send json outout to file instead of stdout
  • -sh / --show-output: show the output of the command
faraday-plugins process-command "ping -c4 www.google.com"
{
    "hosts": [
        {
            "ip": "216.58.202.36",
            "os": "unknown",
            "hostnames": [
                "www.google.com"
            ],
            "description": "",
            "mac": null,
            "credentials": [],
            "services": [],
            "vulnerabilities": [],
            "tags": []
        }
    ],
    "command": {
        "tool": "ping",
        "command": "ping",
        "params": "-c4 www.google.com",
        "user": "user",
        "hostname": "",
        "start_date": "2020-06-19T17:02:37.982293",
        "duration": 39309,
        "import_source": "shell"
    }
}

Test autodetect plugin from report

faraday-plugins detect-report /path/to/report.xml

Faraday Plugin: Nmap

Test report with plugin

Optional params:

  • --plugin_id PLUGIN_ID: Dont detect the plugin, use this one
  • -cpf / --custom-plugins-folder PATH: If given will also look for custom plugins on that path
faraday-plugins process-report /path/to/nmap_report.xml

{
    "hosts": [
        {
            "ip": "192.168.66.1",
            "os": "unknown",
            "hostnames": [],
            "description": "",
            "mac": "00:00:00:00:00:00",
            "credentials": [],
            "services": [
                {
                    "name": "domain",
                    "protocol": "tcp",
                    "port": 53,
                    "status": "open",
                    "version": "",
                    "description": "domain",
                    "credentials": [],
                    "vulnerabilities": [],
                    "tags": []
                },
                {
                    "name": "netbios-ssn",
                    "protocol": "tcp",
                    "port": 139,
                    "status": "open",
                    "version": "",
                    "description": "netbios-ssn",
                    "credentials": [],
                    "vulnerabilities": [],
                    "tags": []
                }
            ],
            "vulnerabilities": [],
            "tags": []
        }
    ],
    "command": {
        "tool": "Nmap",
        "command": "Nmap",
        "params": "/path/to/nmap_report.xml",
        "user": "user",
        "hostname": "",
        "start_date": "2020-06-19T17:22:11.608134",
        "duration": 1233,
        "import_source": "report"
    }
}

Plugin Logger

To use it you must call self.logger.debug("some message")

export PLUGIN_DEBUG=1
faraday-plugins proces-report /path/to/report.xml
2019-11-15 20:37:03,355 - faraday.faraday_plugins.plugins.manager - INFO [manager.py:113 - _load_plugins()]  Loading Native Plugins...
2019-11-15 20:37:03,465 - faraday.faraday_plugins.plugins.manager - DEBUG [manager.py:123 - _load_plugins()]  Load Plugin [acunetix]
2019-11-15 20:37:03,495 - faraday.faraday_plugins.plugins.manager - DEBUG [manager.py:123 - _load_plugins()]  Load Plugin [amap]
2019-11-15 20:37:03,549 - faraday.faraday_plugins.plugins.manager - DEBUG [manager.py:123 - _load_plugins()]  Load Plugin [appscan]
2019-11-15 20:37:03,580 - faraday.faraday_plugins.plugins.manager - DEBUG [manager.py:123 - _load_plugins()]  Load Plugin [arachni]
2019-11-15 20:37:03,613 - faraday.faraday_plugins.plugins.manager - DEBUG [manager.py:123 - _load_plugins()]  Load Plugin [arp_scan]
2019-11-15 20:37:03,684 - faraday.faraday_plugins.plugins.manager - DEBUG [manager.py:123 - _load_plugins()]  Load Plugin [beef]
2019-11-15 20:37:03,714 - faraday.faraday_plugins.plugins.manager - DEBUG [manager.py:123 - _load_plugins()]  Load Plugin [brutexss]
2019-11-15 20:37:03,917 - faraday.faraday_plugins.plugins.manager - DEBUG [manager.py:123 - _load_plugins()]  Load Plugin [burp]
2019-11-15 20:37:03,940 - faraday.faraday_plugins.plugins.manager - DEBUG [manager.py:123 - _load_plugins()]  Load Plugin [dig]
...

More documentation here https://github.com/infobyte/faraday/wiki/Basic-plugin-development

faraday_plugins's People

Contributors

aenima-x avatar llazzaro avatar ezequieltbh avatar erichorvat avatar cript0nauta avatar manuelen12 avatar f-amato avatar winnaz avatar dnadares avatar rgerman avatar dioh avatar jliznaga avatar ehorvat-infobytesec avatar fedek avatar marce314 avatar mlyzhong avatar ignis-sec avatar lucatruf avatar lmcthbe avatar pablodanielp avatar chrizzn avatar antonini avatar flopezluksenberg avatar mattnotmitt avatar vico-c-barza avatar pastaoficial avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.