{"id":13585807,"url":"https://github.com/Zarcolio/grepaddr","last_synced_at":"2025-04-07T10:31:47.088Z","repository":{"id":110698374,"uuid":"255177914","full_name":"Zarcolio/grepaddr","owner":"Zarcolio","description":"Use grepaddr to extract (grep) all kinds of addresses from stdin like URLs (incl. IPv4/IPv6), IP addresses \u0026 ranges (IPv4/IPv6), e-mail addresses, MAC addresses.","archived":false,"fork":false,"pushed_at":"2023-08-07T11:13:52.000Z","size":116,"stargazers_count":60,"open_issues_count":0,"forks_count":16,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-02-14T21:16:28.346Z","etag":null,"topics":["bugbounty","command-line","ctf","ctf-tools","e-mail","extract","grep-like","hacking","ip-addresses","ipv4","ipv6","mac-address","pentesting","python","python3","recon","reconnaissance","urls"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Zarcolio.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":"2020-04-12T22:00:13.000Z","updated_at":"2024-08-01T16:31:44.142Z","dependencies_parsed_at":null,"dependency_job_id":"5ad88d67-a1f7-455e-a4c7-c6571b11e0db","html_url":"https://github.com/Zarcolio/grepaddr","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zarcolio%2Fgrepaddr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zarcolio%2Fgrepaddr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zarcolio%2Fgrepaddr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zarcolio%2Fgrepaddr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Zarcolio","download_url":"https://codeload.github.com/Zarcolio/grepaddr/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247636629,"owners_count":20970966,"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":["bugbounty","command-line","ctf","ctf-tools","e-mail","extract","grep-like","hacking","ip-addresses","ipv4","ipv6","mac-address","pentesting","python","python3","recon","reconnaissance","urls"],"created_at":"2024-08-01T15:05:09.416Z","updated_at":"2025-04-07T10:31:46.854Z","avatar_url":"https://github.com/Zarcolio.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"![](https://img.shields.io/github/license/Zarcolio/grepaddr) ![](https://badges.pufler.dev/visits/Zarcolio/grepaddr) ![](https://img.shields.io/github/stars/Zarcolio/grepaddr) ![](https://img.shields.io/github/forks/Zarcolio/grepaddr) ![](https://img.shields.io/github/issues/Zarcolio/grepaddr) ![](https://img.shields.io/github/issues-closed-raw/Zarcolio/grepaddr) ![](https://img.shields.io/github/issues-pr/Zarcolio/grepaddr) ![](https://img.shields.io/github/issues-pr-closed-raw/Zarcolio/grepaddr)\n\n# About [GrepAddr](https://github.com/Zarcolio/grepaddr) \nGrepAddr takes input from stdin and extracts different kinds of addresses from stdin like URLs, IP addresses, e-mail addresses, MAC addresses and more. Essentially it's grep, but for interesting addresses. \n\nBecause the script uses regexp, it's very common to get false positives for FQDNs.\nThe options --resolve (FQDNs only) --iana and --private can be used to reduce the number of false positives.\n\n# Why use GrepAddr?\nSeveral tools and scripts exist on the internet which similar functionality but usually only for a single address type, for example xurlsx, xpath-url-extraction and relative-url-extractor. Little/none of them can grep as many addresses type like GrepAddr can. You can use GrepAddr when doing a pen test or CTF, or when persuing a bug bounty.\n\n# Install\nGrepAddr should be able to grep addreases with a default Kali Linux installation without installing additional Python packages. \nJust run:\n```\ngit clone https://github.com/Zarcolio/grepaddr\ncd grepaddr\nsudo bash install.sh\n```\nWhen using the installer in an automated environment, use the following command for an automated installation:\n```\nsudo bash install.sh -auto\n```\n\nIf you're running into trouble running GrepAddr, please drop me an issue and I'll try to fix it :)\n\n# Usage\n```\nusage: grepaddr [-h] [-fqdn] [-srv] [-email] [--port] [--iana] [--private] [--resolve] [-ipv4] [-cidr4]\n[-ipv6] [-cidr6] [-mac] [-url] [-relurl] [--baseurl \u003curl\u003e] [--basetag] [-csv \u003cfile\u003e] [-decode \u003crounds\u003e] \n[-unescape \u003crounds\u003e]\n\nUse GrepAddr to extract different kinds of addresses from stdin. If no arguments are given, addresses\nof all types are shown.\n\noptional arguments:\n  -h, --help         show this help message and exit\n  -fqdn              Extract fully qualified domain names.\n  -srv               Extract DNS SRV records.\n  -email             Extract e-mail addresses.\n  --port             Include :port for extraction.\n  --iana             Extract FQDNs with IANA registered TLDs , use with -fqdn, -srv or -email . No\n                     impact on other options.\n  --private          Extract FQDNs with TLDs for private use, use with -fqdn. No impact on other options.\n  --resolve          Display only those FQDNs that can be resolved. Cannot be used together with\n                     --iana or --private. No impact on other options.\n  -ipv4              Extract IP version 4 addresses.\n  -cidr4             Extract IP version 4 addresses in CIDR notation.\n  -ipv6              Extract IP version 6 addresses.\n  -cidr6             Extract IP version 6 addresses in CIDR notation.\n  -mac               Extract MAC addresses.\n  -url               Extract URLs (FQDN, IPv4, IPv6, mailto and generic detection of schemes).\n  -relurl            Extract relative URLs.\n  --basetag          Search for base URL in \u003cBASE\u003e and prepend it to URLS. Use with -url and/or -relurl.\n  --baseurl \u003curl\u003e    Provide a base URL which is prepended to relative URLS starting at root. Use\n                     with -url and/or -relurl.\n  -csv \u003cfile\u003e        Save addresses found to this CSV file.\n  -decode \u003crounds\u003e   URL decode input this many times before extracting FQDNs.\n  -unslash \u003crounds\u003e  Unescape slashes within input this many times before extracting FQDNs.\n```\n# Examples\nIt's really easy to grep all supported addresses from stdin, just run:\n```\nwget -qO - https://twitter.com|grepaddr -csv twitter.csv\n```\nWant to extract addresses of certain type? Choose one of the options, for example -mac and run:\n```\nwget -qO - https://nl.wikipedia.org/wiki/MAC-adres|grepaddr -mac\n```\nWant to grep FQDNs with a private TLD, just run:\n```\nwget -qO - https://serverfault.com/questions/17255/top-level-domain-domain-suffix-for-private-network|grepaddr -fqdn --private\n```\nWant to extract FQDNs and show only resolved FQDNs URLs needed to be decoded first, just run:\n```\nwget -qO - https://twitter.com|grepaddr -fqdn --resolve --decode 1\n```\nWant to grep all addresses with the least chance of false positives without having to wait for resolving FQDNs:\n```\nwget -qO - https://twitter.com|grepaddr --iana\n```\nWant to extract all addresses and convert relative URLs starting at the root to an absolute URL:\n```\nwget -qO - https://twitter.com|grepaddr --base https://twitter.com\n```\nWant to extract addresses from a binary, use it together with strings:\n```\nstring binary.ext|grepaddr\n```\nWhen looking for URLs from the current user hive within Windows' registry, run these commands:\n\nWithin Windows:\n```\nreg export HKCU hkcu.reg\n```\nWithin your favorite Unix-like OS:\n```\ndos2unix -f hkcu.reg\nstrings hkcu.reg|grepaddr -url\n```\n\n# Contribute?\nDo you have some usefull additions to GrepAddr:\n\n* [![PR's Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat)](https://github.com/Zarcolio/grepaddr/pulls) \n* [![Twitter](https://img.shields.io/twitter/url/https/twitter.com/zarcolio.svg?style=social\u0026label=Contact%20me)](https://twitter.com/zarcolio)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FZarcolio%2Fgrepaddr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FZarcolio%2Fgrepaddr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FZarcolio%2Fgrepaddr/lists"}