Skip to content

Commit

Permalink
Merge pull request #32 from bee-san/bee-cleanup-regex
Browse files Browse the repository at this point in the history
Changed regex from plural to singular and added better linking
  • Loading branch information
SkeletalDemise authored May 23, 2021
2 parents df466eb + 5aeb0ae commit 0c3172a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
13 changes: 7 additions & 6 deletions pywhat/Data/regex.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
{
"Name": "Access-Control-Allow-Header",
"Regex": "Access-Control-Allow: [a-zA-Z0-9\\-*]",
"Description": "Used for Cross-Origin Resource Sharing (CORS)",
"Description": "Used for [#CAE4F1][link=https://en.wikipedia.org/wiki/Cross-origin_resource_sharing]Cross-Origin Resource Sharing (CORS)[/link][/#CAE4F1]",
"Rarity": 1,
"Tags": [
"Networking",
Expand All @@ -34,7 +34,7 @@
{
"Name": "TryHackMe Flag Format",
"Regex": "(?i)thm{.*}|tryhackme{.*}",
"Description": "Capture The Flag at https://tryhackme.com",
"Description": "Used for Capture The Flags at https://tryhackme.com",
"Rarity": 1,
"Tags": [
"Cyber Security"
Expand All @@ -43,7 +43,7 @@
{
"Name": "HackTheBox Flag Format",
"Regex": "(?i)hackthebox{.*}|htb{.*}",
"Description": "Capture The Flag at https://hackthebox.eu",
"Description": "Used for Capture The Flags at https://hackthebox.eu",
"Rarity": 1,
"Tags": [
"Cyber Security"
Expand All @@ -70,7 +70,7 @@
{
"Name": "Uniform Resource Locator (URL)",
"Regex": "(https?:\\/\\/(?:www\\.|(?!www))[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\\.[^\\s]{2,}|www\\.[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\\.[^\\s]{2,}|https?:\\/\\/(?:www\\.|(?!www))[a-zA-Z0-9]+\\.[^\\s]{2,}|www\\.[a-zA-Z0-9]+\\.[^\\s]{2,})",
"Description": "A Uniform Resource Location (URL) pointing to a web address.",
"Description": null,
"Rarity": 1,
"Tags": [
"Identifiers"
Expand All @@ -79,6 +79,7 @@
{
"Name":"Latitude & Longitude Coordinates",
"Regex":"^[-+]?([1-8]?\\d(\\.\\d+)?|90(\\.0+)?),\\s*[-+]?(180(\\.0+)?|((1[0-7]\\d)|([1-9]?\\d))(\\.\\d+)?)$",
"plural_name": true,
"Description": null,
"URL": "https://www.google.com/maps/place/",
"Rarity": 0.5,
Expand Down Expand Up @@ -269,7 +270,7 @@
{
"Name": "Internet Protocol (IP) Address",
"Regex": "(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",
"Description": "Universal address pointing to an entity on the web.",
"Description": null,
"Rarity": 0.4,
"Tags": [
"Identifiers",
Expand All @@ -279,7 +280,7 @@
{
"Name": "American Social Security Number",
"Regex": "^[0-9]{3}-[0-9]{2}-[0-9]{4}$",
"Description": "An American Identification Number https://en.wikipedia.org/wiki/Social_Security_number",
"Description": "An [#CAE4F1][link=https://en.wikipedia.org/wiki/Social_Security_number]American Identification Number[/link][/#CAE4F1]",
"rarity": 0.2,
"Tags": [
"Credentials",
Expand Down
2 changes: 0 additions & 2 deletions tests/test_click.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ def test_file_fixture():
runner = CliRunner()
result = runner.invoke(main, ["fixtures/file"])
assert result.exit_code == 0
assert re.findall("web", str(result.output))
assert re.findall("thm", str(result.output))
assert re.findall("Ethereum", str(result.output))
assert "Dogecoin" in result.output
Expand All @@ -25,7 +24,6 @@ def test_file_fixture2():
runner = CliRunner()
result = runner.invoke(main, ["fixtures/file"])
assert result.exit_code == 0
assert re.findall("web", str(result.output))
assert "Dogecoin" in result.output


Expand Down

0 comments on commit 0c3172a

Please sign in to comment.