bee-san / pyWhat

🐸 Identify anything. pyWhat easily lets you identify emails, IP addresses, and more. Feed it a .pcap file or some text and it'll tell you what it is! 🧙‍♀️
MIT License
6.58k stars 349 forks source link

duplicate entries in `regex.json` #213

Closed jyooru closed 3 years ago

jyooru commented 3 years ago

Describe the bug There are some duplicate entries in regex.json:

To Reproduce Steps to reproduce the behavior:

from pywhat.helper import read_json

database = read_json("regex.json")
regexes = [regex["Name"] for regex in database]
duplicates = set([regex for regex in regexes if regexes.count(regex) > 1])
print(duplicates)

Expected behavior A clear and concise description of what you expected to happen. N/A

Screenshots If applicable, add screenshots to help explain your problem. N/A

Desktop (please complete the following information): N/A

Smartphone (please complete the following information): N/A

Additional context none

bee-san commented 3 years ago

We should turn this into a test! 🥳

hexiro commented 3 years ago

I could make this into a test! The majority of the work is already done in the To Reproduce section. But which of the duplicate tests should get removed?

bee-san commented 3 years ago

I could make this into a test! The majority of the work is already done in the To Reproduce section. But which of the duplicate tests should get removed?

If they are duplicates, remove a random one :) It doesn't matter which one if they are the same! :D