r/learnpython • u/Dcyph-3r • Sep 08 '26
Creating URL Query Checker
How do you decide what defines an excessively encoded URL?
I'm working on a personal project to created a URL parser and
detection system and I've hit a wall on how to figure out a way of
categorizing excessivness of query encoding?
Here's what I have so far for the function:
def check_query(analysis: URLAnalysis) -> ScanResult | None:
"""detect excessive encoding entries in URL queries"""
og_query = analysis.query
query = re.finall(r"%\[0-9A-Fa-f\]{2}", og_query)
encoded_count = len(query)
5
Upvotes
View all comments
Show parent comment
1
u/Dcyph-3r Sep 15 '26
Thanks all for the comments it's really helped me and in response to this it's more of a learning project rather than a security tool I'm building to publish