Skip to content

Commit

Permalink
Merge pull request #229 from bee-san/fix-ec2
Browse files Browse the repository at this point in the history
fix: Amazon EC2 ID getting matched a lot
  • Loading branch information
bee-san committed Nov 7, 2021
2 parents 5b29165 + 9ae9fcb commit 071a962
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
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

0 comments on commit 071a962

Please sign in to comment.