swanandx / lemmeknow

The fastest way to identify anything!
https://docs.rs/lemmeknow/
MIT License
936 stars 38 forks source link

Identifies JWT as LTC/Ripple/BCH-Wallet-Adress #29

Open tolik518 opened 1 year ago

tolik518 commented 1 year ago

Input: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c

Output: Found Possible Identifications :) Matched text Identified as Description
eyJhbGciOiJIUzI1..._adQssw5c Litecoin (LTC) Wallet Address URL: https://live.blockcypher.com/ltc/address/eyJhbGciOiJIUzI1..._adQssw5c

Expected "Identified as" would be JWT. Shortened the JWT for better visibility.


Another example:

Input: eyJhbGciOiJIUzI1NiJ9.eyJmb28iOiJiYXIifQ.JTvQIxZOL_-00JdKfTAEmhV-a6KUlB6OUWM8NuN7MN8 Output: No Possible Identifications :(

Expected "Identified as" would be JWT.

swanandx commented 1 year ago

It is due to regex crate not supporting look-around, as it is mentioned in release note . We would need to rewrite the JWT regex without lookarounds.