Skip to content

Commit

Permalink
Merge pull request #123 from bee-san/tags
Browse files Browse the repository at this point in the history
Added and removed some of the tags
  • Loading branch information
piatrashkakanstantinass authored Jul 28, 2021
2 parents d5d0fee + 7c4ff2e commit 2a560dd
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 45 deletions.
67 changes: 25 additions & 42 deletions pywhat/Data/regex.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
"Rarity": 1,
"URL": null,
"Tags": [
"PGP",
"Pretty Good Privacy",
"Public Key"
"PGP"
]
},
{
Expand All @@ -20,9 +18,7 @@
"Rarity": 1,
"URL": null,
"Tags": [
"PGP",
"Pretty Good Privacy",
"Private Key"
"PGP"
]
},
{
Expand All @@ -34,9 +30,7 @@
"URL": null,
"Tags": [
"Credentials",
"Cyber Security",
"Public Key",
"RSA Public Key"
"SSH Public Key"
]
},
{
Expand All @@ -48,8 +42,6 @@
"URL": null,
"Tags": [
"Credentials",
"Cyber Security",
"Public Key",
"SSH Public Key"
]
},
Expand All @@ -62,8 +54,6 @@
"URL": null,
"Tags": [
"Credentials",
"Cyber Security",
"Public Key",
"SSH Public Key"
]
},
Expand All @@ -87,7 +77,7 @@
"Rarity": 1,
"URL": null,
"Tags": [
"Cyber Security"
"CTF Flag"
]
},
{
Expand All @@ -98,7 +88,7 @@
"Rarity": 1,
"URL": null,
"Tags": [
"Cyber Security"
"CTF Flag"
]
},
{
Expand All @@ -109,7 +99,7 @@
"Rarity": 1,
"URL": null,
"Tags": [
"Cyber Security"
"CTF Flag"
]
},
{
Expand Down Expand Up @@ -146,7 +136,6 @@
"Rarity": 1,
"URL": null,
"Tags": [
"Internet",
"Networking",
"AWS"
]
Expand All @@ -159,7 +148,6 @@
"Rarity": 1,
"URL": null,
"Tags": [
"Internet",
"Networking",
"AWS"
]
Expand All @@ -174,7 +162,7 @@
"Tags": [
"API Keys",
"Credentials",
"Square"
"Square API"
]
},
{
Expand All @@ -187,7 +175,7 @@
"Tags": [
"API Keys",
"Credentials",
"Square"
"Square API"
]
},
{
Expand Down Expand Up @@ -224,8 +212,7 @@
"Tags": [
"Identifiers",
"Networking",
"AWS",
"AWS ARN"
"AWS"
]
},
{
Expand All @@ -238,7 +225,7 @@
"Tags": [
"Identifiers",
"Networking",
"IPv6"
"IP"
]
},
{
Expand All @@ -263,7 +250,7 @@
"Tags": [
"Identifiers",
"Networking",
"IPv4"
"IP"
]
},
{
Expand All @@ -274,7 +261,6 @@
"Rarity": 0.7,
"URL": "https://www.blockchain.com/btc/address/",
"Tags": [
"Cryptocurrency",
"Finance",
"Cryptocurrency Wallet",
"Bitcoin Wallet"
Expand Down Expand Up @@ -362,8 +348,6 @@
"URL": null,
"Tags": [
"Credentials",
"Password",
"Username",
"SSN"
]
},
Expand All @@ -375,7 +359,8 @@
"Rarity": 0.5,
"URL": "https://www.youtube.com/channel/",
"Tags": [
"Media"
"Media",
"YouTube"
]
},
{
Expand All @@ -386,7 +371,7 @@
"Rarity": 0.5,
"URL": null,
"Tags": [
"Security",
"Credentials",
"Token",
"API Keys"
]
Expand Down Expand Up @@ -574,7 +559,8 @@
"Rarity": 0.3,
"URL": null,
"Tags": [
"Credit Card"
"Credit Card",
"Finance"
]
},
{
Expand Down Expand Up @@ -760,8 +746,6 @@
"Rarity": 0.2,
"URL": null,
"Tags": [
"Security",
"Hacking",
"Token",
"Website",
"JWT Token"
Expand All @@ -776,7 +760,7 @@
"URL": null,
"Tags": [
"Credentials",
"Cyber Security",
"API Keys",
"AWS"
]
},
Expand All @@ -789,7 +773,7 @@
"URL": null,
"Tags": [
"Credentials",
"Cyber Security",
"API Keys",
"AWS"
]
},
Expand All @@ -813,7 +797,8 @@
"Rarity": 0.2,
"URL": "https://www.youtube.com/watch?v=",
"Tags": [
"Media"
"Media",
"YouTube Video"
]
},
{
Expand All @@ -824,7 +809,7 @@
"Rarity": 0.2,
"URL": null,
"Tags": [
"Time"
"UNIX Timestamp"
]
},
{
Expand All @@ -835,7 +820,7 @@
"Rarity": 0.2,
"URL": null,
"Tags": [
"Time"
"UNIX Timestamp"
]
},
{
Expand All @@ -846,7 +831,7 @@
"Rarity": 0.2,
"URL": null,
"Tags": [
"Time"
"UNIX Timestamp"
]
},
{
Expand All @@ -857,7 +842,7 @@
"Rarity": 0.2,
"URL": null,
"Tags": [
"Time"
"UNIX Timestamp"
]
},
{
Expand All @@ -868,9 +853,7 @@
"Rarity": 0,
"URL": null,
"Tags": [
"Credentials",
"Password",
"Username"
"Credentials"
]
}
]
2 changes: 1 addition & 1 deletion tests/test_click.py
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ def test_only_text():
def test_boundaryless():
runner = CliRunner()
result = runner.invoke(
main, ["-be", "identifiers, security", "abc118.103.238.230abc"]
main, ["-be", "identifiers, token", "abc118.103.238.230abc"]
)
assert result.exit_code == 0
assert "Nothing found" in result.output
Expand Down
4 changes: 2 additions & 2 deletions tests/test_identifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ def test_identifier_works3():


def test_identifier_filtration():
filter = {"Tags": ["Password"]}
filter = {"Tags": ["Credentials"]}
r = identifier.Identifier(dist=Distribution(filter))
regexes = r.identify("fixtures/file", only_text=False)["Regexes"]["file"]
for regex in regexes:
assert "Password" in regex["Regex Pattern"]["Tags"]
assert "Credentials" in regex["Regex Pattern"]["Tags"]


def test_identifier_filtration2():
Expand Down

0 comments on commit 2a560dd

Please sign in to comment.