{"id":15323305,"url":"https://github.com/krishpranav/ruby-nmap","last_synced_at":"2025-04-15T02:45:23.280Z","repository":{"id":109907996,"uuid":"366348394","full_name":"krishpranav/ruby-nmap","owner":"krishpranav","description":"A nmap made in ruby ","archived":false,"fork":false,"pushed_at":"2024-12-13T07:01:35.000Z","size":58,"stargazers_count":4,"open_issues_count":0,"forks_count":5,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-15T02:45:19.800Z","etag":null,"topics":["hacking","information-extraction","information-gathering","information-gathering-tools","nmap","osint","port-scanner","port-scanner-in-ruby","ruby","ruby-scanner"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/krishpranav.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2021-05-11T10:51:34.000Z","updated_at":"2024-12-13T07:01:39.000Z","dependencies_parsed_at":"2023-06-25T23:24:09.366Z","dependency_job_id":null,"html_url":"https://github.com/krishpranav/ruby-nmap","commit_stats":{"total_commits":71,"total_committers":2,"mean_commits":35.5,"dds":"0.014084507042253502","last_synced_commit":"23fe8188cf5a8f0ef6c4b000fb40ddf73e7c85df"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krishpranav%2Fruby-nmap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krishpranav%2Fruby-nmap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krishpranav%2Fruby-nmap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krishpranav%2Fruby-nmap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/krishpranav","download_url":"https://codeload.github.com/krishpranav/ruby-nmap/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248997087,"owners_count":21195797,"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":["hacking","information-extraction","information-gathering","information-gathering-tools","nmap","osint","port-scanner","port-scanner-in-ruby","ruby","ruby-scanner"],"created_at":"2024-10-01T09:19:31.082Z","updated_at":"2025-04-15T02:45:23.262Z","avatar_url":"https://github.com/krishpranav.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ruby-nmap\nA simple nmap made in ruby \n\n[![forthebadge](https://forthebadge.com/images/badges/made-with-ruby.svg)](https://forthebadge.com)\n[![forthebadge](https://forthebadge.com/images/badges/made-with-crayons.svg)](https://forthebadge.com)\n\n# Installation\n```\ngit clone https://github.com/krishpranav/ruby-nmap\ncd ruby-nmap\ngem install\ngem install ruby-nmap\nruby-nmap\n```\n\n## Examples\n\nRun Nmap from Ruby:\n\n```ruby\nrequire 'nmap/program'\n\nNmap::Program.scan do |nmap|\n  nmap.syn_scan = true\n  nmap.service_scan = true\n  nmap.os_fingerprint = true\n  nmap.xml = 'scan.xml'\n  nmap.verbose = true\n\n  nmap.ports = [20,21,22,23,25,80,110,443,512,522,8080,1080]\n  nmap.targets = '192.168.1.*'\nend\n```\n\nRun `sudo nmap` from Ruby:\n\n```ruby\nrequire 'nmap/program'\n\nNmap::Program.sudo_scan do |nmap|\n  nmap.syn_scan = true\n  # ...\nend\n```\n\nParse Nmap XML scan files:\n\n```ruby\nrequire 'nmap/xml'\n\nNmap::XML.new('scan.xml') do |xml|\n  xml.each_host do |host|\n    puts \"[#{host.ip}]\"\n\n    host.each_port do |port|\n      puts \"  #{port.number}/#{port.protocol}\\t#{port.state}\\t#{port.service}\"\n    end\n  end\nend\n```\n\nPrint NSE script output from an XML scan file:\n\n```ruby\nrequire 'nmap/xml'\n\nNmap::XML.new('nse.xml') do |xml|\n  xml.each_host do |host|\n    puts \"[#{host.ip}]\"\n\n    host.scripts.each do |name,output|\n      output.each_line { |line| puts \"  #{line}\" }\n    end\n\n    host.each_port do |port|\n      puts \"  [#{port.number}/#{port.protocol}]\"\n\n      port.scripts.each do |name,output|\n        puts \" [#{name}]\"\n\n        output.each_line { |line| puts \"#{line}\" }\n      end\n    end\n  end\nend\n```\n\n## Requirements\n\n* [ruby] \u003e= 2.0.0\n* [nmap] \u003e= 5.00\n* [nokogiri] ~\u003e 1.3\n* [rprogram] ~\u003e 0.3\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrishpranav%2Fruby-nmap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkrishpranav%2Fruby-nmap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrishpranav%2Fruby-nmap/lists"}