{"id":13581200,"url":"https://github.com/l4yton/RegHex","last_synced_at":"2025-04-06T06:32:48.993Z","repository":{"id":38951785,"uuid":"204483340","full_name":"l4yton/RegHex","owner":"l4yton","description":"A collection of regexes for every possbile use","archived":false,"fork":false,"pushed_at":"2023-12-01T18:35:42.000Z","size":33,"stargazers_count":397,"open_issues_count":0,"forks_count":68,"subscribers_count":15,"default_branch":"master","last_synced_at":"2024-11-05T20:47:01.194Z","etag":null,"topics":["bugbounty","regex","security"],"latest_commit_sha":null,"homepage":null,"language":"Shell","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/l4yton.png","metadata":{"files":{"readme":"README.md","changelog":"change_flags.sh","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}},"created_at":"2019-08-26T13:37:29.000Z","updated_at":"2024-11-03T12:02:29.000Z","dependencies_parsed_at":"2023-12-01T19:44:52.087Z","dependency_job_id":null,"html_url":"https://github.com/l4yton/RegHex","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/l4yton%2FRegHex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/l4yton%2FRegHex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/l4yton%2FRegHex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/l4yton%2FRegHex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/l4yton","download_url":"https://codeload.github.com/l4yton/RegHex/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247445661,"owners_count":20939953,"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","regex","security"],"created_at":"2024-08-01T15:01:59.119Z","updated_at":"2025-04-06T06:32:48.750Z","avatar_url":"https://github.com/l4yton.png","language":"Shell","readme":"# RegHex\n\nRegHex is a collection of regexes for every use. \u003cbr/\u003e\nI have also made every regex ready to use with [gf](https://github.com/tomnomnom/gf), so that you can copy them into your `~/.gf` directory.\n\u003cbr/\u003e \u003cbr/\u003e\nIf you don't like the grep flags I use, you can simply replace the flags with `change_flags.sh`.\nTherefore, go in your `.gf` directory with the `.json` files. Now simply run: `bash /path/to/change_flags.sh -MyFlags`.\n\n## Table of Contents\n\n- [Artifactory API Token](#artifactory-api-token)\n- [Artifactory Password](#artifactory-password)\n- [Authorization Basic](#authorization-basic)\n- [Authorization Bearer](#authorization-bearer)\n- [AWS Client ID](#aws-client-id)\n- [AWS MWS Key](#aws-mws-key)\n- [AWS Secret Key](#aws-secret-key)\n- [Base32](#base32)\n- [Base64](#base64)\n- [Basic Auth Credentials](#basic-auth-credentials)\n- [Cloudinary Basic Auth](#cloudinary-basic-auth)\n- [Facebook Access Token](#facebook-access-token)\n- [Facebook Client ID](#facebook-client-id)\n- [Facebook Oauth](#facebook-oauth)\n- [Facebook Secret Key](#facebook-secret-key)\n- [Github](#github)\n- [Google API Key](#google-api-key)\n- [Google Cloud Platform API Key](#google-cloud-platfrom-api-key)\n- [Google Drive API Key](#google-drive-api-key)\n- [Google Drive Oauth](#google-drive-oauth)\n- [Google Gmail API Key](#google-gmail-api-key)\n- [Google Gmail Oauth](#google-gmail-oauth)\n- [Google OAuth Access Token](#google-oauth-access-token)\n- [Google Youtube API Key](#google-youtube-api-key)\n- [Google Youtube Oauth](#google-youtube-oauth)\n- [Heroku API Key](#heroku-api-key)\n- [IPv4](#ipv4)\n- [IPv6](#ipv6)\n- [Javascript Variables](#javascript-variables)\n- [LinkedIn Client ID](#linkedin-client-id)\n- [LinkedIn Secret Key](#linkedin-secret-key)\n- [Mailchamp API Key](#mailchamp-api-key)\n- [Mailgun API Key](#mailgun-api-key)\n- [MailTo:](#mailto)\n- [MD5 Hash](#md5-hash)\n- [Picatic API Key](#picatic-api-key)\n- [Slack Token](#slack-token)\n- [Slack Webhook](#slack-webhook)\n- [Square Access Token](#square-access-token)\n- [Square Oauth Secret](#square-ouath-secret)\n- [Stripe API Key](#stripe-api-key)\n- [Twilio API Key](#twilio-api-key)\n- [Twitter Client ID](#twitter-client-id)\n- [Twitter Oauth](#twitter-oauth)\n- [Twitter Secret Key](#twitter-secret-key)\n- [URL Parameter](#url-parameter)\n- [URLs](#urls)\n- [Vault Token](#Vault-Token)\n- [Credits](#credits)\n\n### Artifactory API Token\n```\n(?:\\s|=|:|\"|^)AKC[a-zA-Z0-9]{10,}\n```\n\n### Artifactory Password\n```\n(?:\\s|=|:|\"|^)AP[\\dABCDEF][a-zA-Z0-9]{8,}\n```\n\n### Authorization Basic\n```\nbasic [a-zA-Z0-9_\\\\-:\\\\.=]+\n```\n\n### Authorization Bearer\n```\nbearer [a-zA-Z0-9_\\\\-\\\\.=]+\n```\n\n### AWS Client ID\n```\n(A3T[A-Z0-9]|AKIA|AGPA|AIDA|AROA|AIPA|ANPA|ANVA|ASIA)[A-Z0-9]{16}\n```\n\n### AWS MWS Key\n```\namzn\\.mws\\.[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\n```\n\n### AWS Secret Key\n```\n(?i)aws(.{0,20})?(?-i)['\\\"][0-9a-zA-Z\\/+]{40}['\\\"]\n```\n\n### Base32\n```\n(?:[A-Z2-7]{8})*(?:[A-Z2-7]{2}={6}|[A-Z2-7]{4}={4}|[A-Z2-7]{5}={3}|[A-Z2-7]{7}=)?\n```\n\n### Base64\n```\n(eyJ|YTo|Tzo|PD[89]|aHR0cHM6L|aHR0cDo|rO0)[a-zA-Z0-9+/]+={0,2}\n```\n\n### Basic Auth Credentials\n```\n(?\u003c=:\\/\\/)[a-zA-Z0-9]+:[a-zA-Z0-9]+@[a-zA-Z0-9]+\\.[a-zA-Z]+\n```\n\n### Cloudinary Basic Auth\n```\ncloudinary:\\/\\/[0-9]{15}:[0-9A-Za-z]+@[a-z]+\n```\n\n### Facebook Access Token\n```\nEAACEdEose0cBA[0-9A-Za-z]+\n```\n\n### Facebook Client ID\n```\n(?i)(facebook|fb)(.{0,20})?['\\\"][0-9]{13,17}\n```\n\n### Facebook Oauth\n```\n[f|F][a|A][c|C][e|E][b|B][o|O][o|O][k|K].*['|\\\"][0-9a-f]{32}['|\\\"]\n```\n\n### Facebook Secret Key\n```\n(?i)(facebook|fb)(.{0,20})?(?-i)['\\\"][0-9a-f]{32}\n```\n\n### Github\n```\n(?i)github(.{0,20})?(?-i)['\\\"][0-9a-zA-Z]{35,40}\n```\n\n### Google API Key\n```\nAIza[0-9A-Za-z\\\\-_]{35}\n```\n\n### Google Cloud Platform API Key\n```\n(?i)(google|gcp|youtube|drive|yt)(.{0,20})?['\\\"][AIza[0-9a-z\\\\-_]{35}]['\\\"]\n```\n\n### Google Drive API Key\n```\nAIza[0-9A-Za-z\\\\-_]{35}\n```\n### Google Drive Oauth\n```\n[0-9]+-[0-9A-Za-z_]{32}\\.apps\\.googleusercontent\\.com\n```\n\n### Google Gmail API Key\n```\nAIza[0-9A-Za-z\\\\-_]{35}\n```\n\n### Google Gmail Oauth\n```\n[0-9]+-[0-9A-Za-z_]{32}\\.apps\\.googleusercontent\\.com\n```\n\n### Google Oauth Access Token\n```\nya29\\\\.[0-9A-Za-z\\\\-_]+\n```\n\n### Google Youtube API Key\n```\nAIza[0-9A-Za-z\\\\-_]{35}\n```\n\n### Google Youtube Oauth\n```\n[0-9]+-[0-9A-Za-z_]{32}\\.apps\\.googleusercontent\\\\.com\n```\n\n### Heroku API Key\n```\n[h|H][e|E][r|R][o|O][k|K][u|U].{0,30}[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}\n```\n\n### IPv4\n```\n\\b(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}\\b\n```\n\n### IPv6\n```\n(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\n```\n\n### Javascript Variables\n```\n(?:const|let|var)\\s+\\K(\\w+?)(?=[;.=\\s])\n```\n\n### LinkedIn Client ID\n```\n(?i)linkedin(.{0,20})?(?-i)['\\\"][0-9a-z]{12}['\\\"]\n```\n\n### LinkedIn Secret Key\n```\n(?i)linkedin(.{0,20})?['\\\"][0-9a-z]{16}['\\\"]\n```\n\n### Mailchamp API Key\n```\n[0-9a-f]{32}-us[0-9]{1,2}\n```\n\n### Mailgun API Key\n```\nkey-[0-9a-zA-Z]{32}\n```\n\n### Mailto:\n```\n(?\u003c=mailto:)[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9.-]+\n```\n\n### MD5 Hash\n```\n[a-f0-9]{32}\n```\n\n### Picatic API Key\n```\nsk_live_[0-9a-z]{32}\n```\n\n### Slack Token\n```\nxox[baprs]-([0-9a-zA-Z]{10,48})?\n```\n\n### Slack Webhook\n```\nhttps://hooks.slack.com/services/T[a-zA-Z0-9_]{10}/B[a-zA-Z0-9_]{10}/[a-zA-Z0-9_]{24}\n```\n\n### Stripe API Key\n```\n(pk|sk|rk)_(test|live)_[A-Za-z0-9]+\n```\n\n### Square Access Token\n```\nsqOatp-[0-9A-Za-z\\\\-_]{22}\n```\n\n### Square Oauth Secret\n```\nsq0csp-[ 0-9A-Za-z\\\\-_]{43}\n```\n\n### Twilio API Key\n```\nSK[0-9a-fA-F]{32}\n```\n\n### Twitter Client ID\n```\n(?i)twitter(.{0,20})?['\\\"][0-9a-z]{18,25}\n```\n\n### Twitter Oauth\n```\n[t|T][w|W][i|I][t|T][t|T][e|E][r|R].{0,30}['\\\"\\\\s][0-9a-zA-Z]{35,44}['\\\"\\\\s]\n```\n\n### Twitter Secret Key\n```\n(?i)twitter(.{0,20})?['\\\"][0-9a-z]{35,44}\n```\n\n### Vault Token\n```\n[sb]\\.[a-zA-Z0-9]{24}\n```\n\n### URL Parameter\n```\n(?\u003c=\\?|\\\u0026)[a-zA-Z0-9_]+(?=\\=)\n```\n\n### URLs\nWith HTTP Protocol:\n```\nhttps?:\\/\\/(www\\.)?[-a-zA-Z0-9@:%._\\+~#=]{1,256}\\.[a-zA-Z0-9()]{1,6}\\b([-a-zA-Z0-9()@:%_\\+.~#?\u0026//=]*)\n```\nWithout Protocol:\n```\n[-a-zA-Z0-9@:%._\\+~#=]{1,256}\\.[a-zA-Z0-9()]{1,6}\\b([-a-zA-Z0-9()@:%_\\+.~#?\u0026//=]*)\n```\n\n# Credits\n- [TomNomNom](https://github.com/tomnomnom) and his repo [gf](https://github.com/tomnomnom/gf)\n- [gitleaks](https://github.com/zricethezav/gitleaks)\n- [truffleHog](https://github.com/dxa4481/truffleHog)\n- https://stackoverflow.com/questions/53497/regular-expression-that-matches-valid-ipv6-addresses\n- https://stackoverflow.com/questions/3809401/what-is-a-good-regular-expression-to-match-a-url\n- https://stackoverflow.com/questions/44654809/regex-to-match-ip-addresses\n","funding_links":[],"categories":["Tools","Shell","Shell (473)"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fl4yton%2FRegHex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fl4yton%2FRegHex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fl4yton%2FRegHex/lists"}