Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Amazon EC2 ID getting matched a lot #229

Merged
merged 3 commits into from Nov 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/PULL_REQUEST_TEMPLATE.md
@@ -1,15 +1,15 @@
**⚠ Pull Requests not made with this template will be automatically closed 🔥**

# Prerequisites
## Prerequisites
- [ ] Have you read the documentation on contributing? https://github.com/bee-san/pyWhat/wiki/Adding-your-own-Regex

# Why do we need this pull request?
## Why do we need this pull request?
* Explain the _why_ behind your PR. We can see what it does from the code. But _why_ does it do that?

# What [GitHub issues](https://github.com/bee-san/pyWhat/issues) does this fix?
## What [GitHub issues](https://github.com/bee-san/pyWhat/issues) does this fix?
* Fixes #10000

# Copy / paste of output
## Copy / paste of output

Please copy and paste the output of PyWhat with your new addition using an example that tests this addition below:

Expand Down
7 changes: 4 additions & 3 deletions pywhat/Data/regex.json
Expand Up @@ -2406,8 +2406,8 @@
}
},
{
"Name": "Amazon Web Services EC2 Instance Identifier",
"Regex": "(?i)^(\\b[a-z]+-[a-z0-9]+)$",
"Name": "Amazon Web Services EC2 Instance ID",
"Regex": "(?i)^(i-([a-z0-9]{8}|[a-z0-9]{17}))$",
"plural_name": false,
"Description": null,
"Rarity": 0.2,
Expand All @@ -2419,7 +2419,8 @@
],
"Examples": {
"Valid": [
"i-1234567890abcdef0"
"i-1234567890abcdef0",
"i-1a2b3c4d"
],
"Invalid": []
}
Expand Down
8 changes: 4 additions & 4 deletions pywhat/what.py
Expand Up @@ -120,7 +120,7 @@ def get_text(ctx, opts, value):
required=False,
help="Format output according to specified rules.",
)
@click.option("-pt", "--print-tags", is_flag=True, help="Add flags to ouput")
@click.option("-pt", "--print-tags", is_flag=True, help="Add flags to output")
def main(**kwargs):
"""
pyWhat - Identify what something is.
Expand Down Expand Up @@ -193,7 +193,7 @@ def main(**kwargs):

pretty - Output data in the table

json - Ouput data in json format
json - Output data in json format

CUSTOM_STRING - Print data in the way you want. For every match CUSTOM_STRING will be printed and '%x' (See below for possible x values) will be substituted with a match value.

Expand All @@ -214,11 +214,11 @@ def main(**kwargs):

%d - description (will not output if absent)

%e - exploit (will not ouput if absent)
%e - exploit (will not output if absent)

%r - rarity

%l - link (will not ouput if absent)
%l - link (will not output if absent)

%t - tags (in 'tag1, tag2 ...' format)

Expand Down