{"id":23647639,"url":"https://github.com/ronin-rb/ronin-masscan","last_synced_at":"2025-08-31T22:32:46.922Z","repository":{"id":152903553,"uuid":"611535701","full_name":"ronin-rb/ronin-masscan","owner":"ronin-rb","description":"A Ruby library and CLI for working with masscan.","archived":false,"fork":false,"pushed_at":"2024-08-04T21:12:25.000Z","size":138,"stargazers_count":3,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-10-29T14:22:27.823Z","etag":null,"topics":["hacktoberfest","infosec","masscan","masscan-parse","network-scanning","ruby"],"latest_commit_sha":null,"homepage":"https://ronin-rb.dev","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ronin-rb.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog.md","contributing":null,"funding":null,"license":"COPYING.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"open_collective":"ronin-rb","patreon":"roninrb"}},"created_at":"2023-03-09T02:39:06.000Z","updated_at":"2024-08-04T21:12:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"e9b2090e-e746-47ce-afe5-666d3786f164","html_url":"https://github.com/ronin-rb/ronin-masscan","commit_stats":{"total_commits":97,"total_committers":2,"mean_commits":48.5,"dds":"0.11340206185567014","last_synced_commit":"1674f4fc4e4013e25506f59507f974b3857c97db"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ronin-rb%2Fronin-masscan","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ronin-rb%2Fronin-masscan/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ronin-rb%2Fronin-masscan/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ronin-rb%2Fronin-masscan/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ronin-rb","download_url":"https://codeload.github.com/ronin-rb/ronin-masscan/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":231583894,"owners_count":18395959,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hacktoberfest","infosec","masscan","masscan-parse","network-scanning","ruby"],"created_at":"2024-12-28T14:28:55.335Z","updated_at":"2025-08-31T22:32:46.915Z","avatar_url":"https://github.com/ronin-rb.png","language":"Ruby","funding_links":["https://opencollective.com/ronin-rb","https://patreon.com/roninrb"],"categories":[],"sub_categories":[],"readme":"# ronin-masscan\n\n[![CI](https://github.com/ronin-rb/ronin-masscan/actions/workflows/ruby.yml/badge.svg)](https://github.com/ronin-rb/ronin-masscan/actions/workflows/ruby.yml)\n[![Code Climate](https://codeclimate.com/github/ronin-rb/ronin-masscan.svg)](https://codeclimate.com/github/ronin-rb/ronin-masscan)\n\n* [Website](https://ronin-rb.dev/)\n* [Source](https://github.com/ronin-rb/ronin-masscan)\n* [Issues](https://github.com/ronin-rb/ronin-masscan/issues)\n* [Documentation](https://ronin-rb.dev/docs/ronin-masscan)\n* [Discord](https://discord.gg/6WAb3PsVX9) |\n  [Mastodon](https://infosec.exchange/@ronin_rb)\n\n## Description\n\nronin-masscan is a Ruby library and CLI for working with masscan.\n\n## Features\n\n* Supports automating `masscan` using [ruby-masscan].\n* Supports parsing and filtering masscan scan files.\n* Supports converting masscan scan files into JSON or CSV.\n* Supports importing masscan scan files into the [ronin-db] database.\n\n## Synopsis\n\n```\nUsage: ronin-masscan [options]\n\nOptions:\n    -V, --version                    Prints the version and exits\n    -h, --help                       Print help information\n\nArguments:\n    [COMMAND]                        The command name to run\n    [ARGS ...]                       Additional arguments for the command\n\nCommands:\n    completion\n    convert\n    dump\n    grep\n    help\n    import\n    new\n    print\n    scan\n```\n\nImport a binary `masscan` scan file:\n\n```shell\n$ ronin-masscan import masscan.bin\n```\n\nPerform a masscan scan and import it's results into the [ronin-db]\\:\n\n```shell\n$ ronin-masscan scan --import -- 192.168.1.1 -p22,25,80,443\n```\n\nParse and filter an nmap XML scan file:\n\nImport a JSON `masscan` scan file:\n\n```shell\n$ ronin-masscan import masscan.json\n```\n\nDumps a masscan scan file to a list of `IP:PORT` pairs:\n\n```shell\n$ ronin-masscan dump --print-ip-ports masscan.bin\n```\n\nDump a masscan scan file to a list of `HOST:PORT` pairs:\n\n```shell\n$ ronin-masscan dump --print-host-ports masscan.bin\n```\n\nDump a masscan scan file to a list of `http`://` or `https://` URIs:\n\n```shell\n$ ronin-masscan dump --print-uris masscan.bin\n```\n\nConvert a binary `masscan` scan file to CSV:\n\n```shell\n$ ronin-masscan convert masscan.bin masscan.csv\n```\n\nConvert a binary `masscan` scan file to JSON:\n\n```shell\n$ ronin-masscan convert masscan.bin masscan.json\n```\n\nGenerate a new masscan scanner Ruby script:\n\n```shell\n$ ronin-masscan new scanner.rb --ips '192.168.1.*' --ports 22,80,443,8000-9000\n```\n\nGenerate a new masscan output file parser script:\n\n```shell\n$ ronin-masscan new parser.rb --parser --xml-file path/to/masscan.bin --printing\n```\n\n## Examples\n\n```ruby\nrequire 'ronin/masscan'\n\noutput_file = Ronin::Masscan.scan('192.168.1.1', ports: [80,443])\n# =\u003e #\u003cMasscan::OutputFile:...\u003e\n\noutput_file = Ronin::Masscan.scan do |masscan|\n  masscan.ports = [80,443]\n  masscan.ips   = '192.168.1.1'\nend\n# =\u003e #\u003cMasscan::OutputFile:...\u003e\n```\n\nAccessing the masscan scan data:\n\n```ruby\noutput_file.each do |record|\n  p record\nend\n```\n\n```\n#\u003cstruct Masscan::Status status=:open, protocol=:tcp, port=80, reason=[:syn, :ack], ttl=54, ip=#\u003cIPAddr: IPv4:93.184.216.34/255.255.255.255\u003e, timestamp=2021-08-26 16:07:33 -0700, mac=nil\u003e\n#\u003cstruct Masscan::Status status=:open, protocol=:tcp, port=443, reason=[:syn, :ack], ttl=54, ip=#\u003cIPAddr: IPv4:93.184.216.34/255.255.255.255\u003e, timestamp=2021-08-26 16:07:33 -0700, mac=nil\u003e\n#\u003cstruct Masscan::Status status=:open, protocol=:icmp, port=0, reason=[], ttl=54, ip=#\u003cIPAddr: IPv4:93.184.216.34/255.255.255.255\u003e, timestamp=2021-08-26 16:07:33 -0700, mac=nil\u003e\n#\u003cstruct Masscan::Banner protocol=:tcp, port=443, ip=#\u003cIPAddr: IPv4:93.184.216.34/255.255.255.255\u003e, timestamp=2021-08-26 16:07:35 -0700, app_protocol=:ssl3, payload=\"TLS/1.1 cipher:0xc013, www.example.org, www.example.org, example.com, example.edu, example.net, example.org, www.example.com, www.example.edu, www.example.net\"\u003e\n#\u003cstruct Masscan::Banner protocol=:tcp, port=443, ip=#\u003cIPAddr: IPv4:93.184.216.34/255.255.255.255\u003e, timestamp=2021-08-26 16:07:35 -0700, app_protocol=:x509_cert, payload=\"MIIG1TCCBb2gAwIBAgIQD74IsIVNBXOKsMzhya/uyTANBgkqhkiG9w0BAQsFADBPMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMSkwJwYDVQQDEyBEaWdpQ2VydCBUTFMgUlNBIFNIQTI1NiAyMDIwIENBMTAeFw0yMDExMjQwMDAwMDBaFw0yMTEyMjUyMzU5NTlaMIGQMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEUMBIGA1UEBxMLTG9zIEFuZ2VsZXMxPDA6BgNVBAoTM0ludGVybmV0IENvcnBvcmF0aW9uIGZvciBBc3NpZ25lZCBOYW1lcyBhbmQgTnVtYmVyczEYMBYGA1UEAxMPd3d3LmV4YW1wbGUub3JnMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuvzuzMoKCP8Okx2zvgucA5YinrFPEK5RQP1TX7PEYUAoBO6i5hIAsIKFmFxtW2sghERilU5rdnxQcF3fEx3sY4OtY6VSBPLPhLrbKozHLrQ8ZN/rYTb+hgNUeT7NA1mP78IEkxAj4qG5tli4Jq41aCbUlCt7equGXokImhC+UY5IpQEZS0tKD4vu2ksZ04Qetp0k8jWdAvMA27W3EwgHHNeVGWbJPC0Dn7RqPw13r7hFyS5TpleywjdY1nB7ad6kcZXZbEcaFZ7ZuerA6RkPGE+PsnZRb1oFJkYoXimsuvkVFhWeHQXCGC1cuDWSrM3cpQvOzKH2vS7d15+zGls4IwIDAQABo4IDaTCCA2UwHwYDVR0jBBgwFoAUt2ui6qiqhIx56rTaD5iyxZV2ufQwHQYDVR0OBBYEFCYa+OSxsHKEztqBBtInmPvtOj0XMIGBBgNVHREEejB4gg93d3cuZXhhbXBsZS5vcmeCC2V4YW1wbGUuY29tggtleGFtcGxlLmVkdYILZXhhbXBsZS5uZXSCC2V4YW1wbGUub3Jngg93d3cuZXhhbXBsZS5jb22CD3d3dy5leGFtcGxlLmVkdYIPd3d3LmV4YW1wbGUubmV0MA4GA1UdDwEB/wQEAwIFoDAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwgYsGA1UdHwSBgzCBgDA+oDygOoY4aHR0cDovL2NybDMuZGlnaWNlcnQuY29tL0RpZ2lDZXJ0VExTUlNBU0hBMjU2MjAyMENBMS5jcmwwPqA8oDqGOGh0dHA6Ly9jcmw0LmRpZ2ljZXJ0LmNv\"\u003e\n#\u003cstruct Masscan::Banner protocol=:tcp, port=80, ip=#\u003cIPAddr: IPv4:93.184.216.34/255.255.255.255\u003e, timestamp=2021-08-26 16:07:35 -0700, app_protocol=:http_server, payload=\"ECS (sec/97A6)\"\u003e\n#\u003cstruct Masscan::Banner protocol=:tcp, port=80, ip=#\u003cIPAddr: IPv4:93.184.216.34/255.255.255.255\u003e, timestamp=2021-08-26 16:07:35 -0700, app_protocol=:html_title, payload=\"404 - Not Found\"\u003e\n#\u003cstruct Masscan::Banner protocol=:tcp, port=80, ip=#\u003cIPAddr: IPv4:93.184.216.34/255.255.255.255\u003e, timestamp=2021-08-26 16:07:35 -0700, app_protocol=:http, payload=\"HTTP/1.0 404 Not Found\\r\\nContent-Type: text/html\\r\\nDate: Thu, 26 Aug 2021 23:07:35 GMT\\r\\nServer: ECS (sec/97A6)\\r\\nContent-Length: 345\\r\\nConnection: close\\r\\n\\r\"\u003e\n```\n\n## Requirements\n\n* [Ruby] \u003e= 3.0.0\n* [masscan] \u003e= 1.0.0\n* [ruby-masscan] ~\u003e 0.1\n* [ronin-core] ~\u003e 0.2\n* [ronin-db] ~\u003e 0.2\n\n## Install\n\n```shell\n$ gem install ronin-masscan\n```\n\n### Gemfile\n\n```ruby\ngem 'ronin-masscan', '~\u003e 0.1'\n```\n\n### gemspec\n\n```ruby\ngem.add_dependency 'ronin-masscan', '~\u003e 0.1'\n```\n\n## Development\n\n1. [Fork It!](https://github.com/ronin-rb/ronin-masscan/fork)\n2. Clone It!\n3. `cd ronin-masscan/`\n4. `./scripts/setup`\n5. `git checkout -b my_feature`\n6. Code It!\n7. `bundle exec rake spec`\n8. `git push origin my_feature`\n\n## License\n\nCopyright (c) 2023-2025 Hal Brodigan (postmodern.mod3@gmail.com)\n\nronin-masscan is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published\nby the Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nronin-masscan is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with ronin-masscan.  If not, see \u003chttps://www.gnu.org/licenses/\u003e.\n\n[Ruby]: https://www.ruby-lang.org\n[masscan]: https://github.com/robertdavidgraham/masscan#readme\n[ruby-masscan]: https://github.com/postmodern/ruby-masscan#readme\n[ronin-support]: https://github.com/ronin-rb/ronin-support#readme\n[ronin-core]: https://github.com/ronin-rb/ronin-core#readme\n[ronin-db]: https://github.com/ronin-rb/ronin-db#readme\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fronin-rb%2Fronin-masscan","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fronin-rb%2Fronin-masscan","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fronin-rb%2Fronin-masscan/lists"}