networking - URL filtering , issues with URL -


I am working on a URL filtering project. I have been given a database in which the URL needs to be blocked (eg: a.b.com/d/e)

I get http requests from Yuri and Domains. I compare what I get with my database and redirect the user without problems. So far, so good.

The problem begins with the URL, which contains query strings and other magics with the URL. As an example, if the user enters abcom / d / e? Junk, what I am getting will not match my database, and users will bypass my filter, and they are still on abcom / d / e Will be able to go.

I tried some worthless work after special characters like "?, #" But there are problems like url: youtube.com/watch?v=12vh55_1ul8, which youtube.com/watch like becames and All YouTube blocks This solution creates more problems for me.

Now I am very confused about how to solve this problem. Is there a guide or a library that I can use in C ++?

Try this code:

  string str (get_requsted_uri ()) ; String Straw ("http://getaroundfilters.com/article/889/proxy"); If (str.find (str2)! = String :: npos) {block (); } And (get_and_return_webpage (str);}    

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -