{"id":13841981,"url":"https://github.com/pry0cc/tew","last_synced_at":"2025-04-12T02:13:04.115Z","repository":{"id":41116518,"uuid":"469994397","full_name":"pry0cc/tew","owner":"pry0cc","description":"A quick ‘n dirty nmap parser written in Golang to convert nmap xml to IP:Port notation.","archived":false,"fork":false,"pushed_at":"2024-07-03T20:51:48.000Z","size":1942,"stargazers_count":127,"open_issues_count":4,"forks_count":23,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-12T02:12:57.183Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pry0cc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2022-03-15T03:41:08.000Z","updated_at":"2025-03-06T22:54:20.000Z","dependencies_parsed_at":"2024-11-15T02:30:58.001Z","dependency_job_id":"d38b6767-9946-4954-b73b-b2d0f1ec8ddf","html_url":"https://github.com/pry0cc/tew","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pry0cc%2Ftew","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pry0cc%2Ftew/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pry0cc%2Ftew/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pry0cc%2Ftew/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pry0cc","download_url":"https://codeload.github.com/pry0cc/tew/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248505925,"owners_count":21115354,"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":[],"created_at":"2024-08-04T17:01:25.319Z","updated_at":"2025-04-12T02:13:04.084Z","avatar_url":"https://github.com/pry0cc.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# tew\n`tew` is a simple, quick 'n' dirty nmap parser for converting nmap xml output files to IP:Port notation.\n\nFor example:\n\n```\ntew -x data/ex1/nmap.xml\n\n1.1.1.1:80\n1.1.1.1.1:443\n```\n\nThis is useful for internal penetration tests and can be piped to httpx easily. As it is go, it compiles into a neat and tidy binary! \n\n![Example](screenshots/example.jpeg?raw=true \"Example of Tew\")\n\n# Installation\n\n## Go install\n```\ngo install github.com/pry0cc/tew@latest\n```\n\n## Binaries\nBinaries are available for most platforms and archectectures in the [releases page](https://github.com/pry0cc/tew/releases/latest).\n\n# Usage\n```\n# Run Nmap and save to XML output\n\nnmap -T4 1.1.1.1 8.8.8.8 -oX file.xml\n\ntew -x file.xml\ntew -x file.xml -o output.txt\ntew -x file.xml | httpx -json -o http.json\n```\n\n## Stdin support\n```\ncat data/ex1/nmap.xml | go run main.go -x -\n```\n\n93.184.216.34:80\n93.184.216.34:443\n1.1.1.1:80\n8.8.8.8:53\n8.8.8.8:443\n8.8.4.4:53\n8.8.4.4:443\n1.0.0.1:53\n1.1.1.1:53\n1.1.1.1:443\n1.0.0.1:80\n1.0.0.1:443\n\n## DNSx Parsing\nIf you want to correlate DNSx JSON output, simply generate a JSON file and import it using the following syntax.\n```\nsubfinder -d domain.com -o subs.txt\ndnsx -l subs.txt -json -o dns.json\ncat dns.json | jq -r '.a[]' | tee ips.txt\nnmap -T4 -iL ips.txt -oX nmap.xml\n\ntew -x nmap.xml -dnsx dns.json --vhost | httpx -json -o http.json\n```\n\n## URL Generation\nIf you want to passively generate URLs, you can do so with the `--urls` option.\n\nNote: This does not replace using httpx, prefer for occasions where stealth matters over accuracy. This does not check to see if the port is running a HTTP service nor does it send any requests.\n\n```\ntew -x nmap.xml -dnsx dns.json --vhost --urls \n\nhttp://example.com\nhttps://example.com\n```\n\n# Todo\n- [x] Create auto build using github ci \u0026 autobuild\n- [x] Add Arm64 for Darwin to Build\n- [x] Use proper flags library\n- [x] Add ability to import and use dnsx JSON \u0026 text output files - working on it!\n- [x] Clean up DNSX Parsing module and sort unique\n- [x] Add output text file as option\n- [x] Test on Windows, Linux \u0026 Mac for cross-compatibility\n\n# Credit\n- @hakluke - Thank you man for helping me fix that dumb bug :) \n- @vay3t - Go Help\n- @BruceEdiger - Go Help\n- @mortensonsam - Go help!!\n- @xstp - stdin support\n- https://www.golangprograms.com - A lot of the code here is copy-pasted from the internet, at the time of writing, my go skills are copy-paste :P And that's ok if it works, right?\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpry0cc%2Ftew","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpry0cc%2Ftew","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpry0cc%2Ftew/lists"}