Wonder if it is possible to extract all HTTP requests whose User-Agent length is less than 10. asked 07 Dec '15, 06:41 pktUser1001 |
One Answer:
The clean way to do that is by matching the parameter value to a regular expression:
Translation: between the start of the string, answered 07 Dec '15, 06:58 sindy edited 07 Dec '15, 21:38 |
Thanks @sindy for the quick reply. Did you mean to say
http.user_agent and !http.user_agent[10]>0
?Yes, I've just missed you've given the particular value of 10 in the question, so I!ve just fixed my answer yet another time.
It looks like this is a good workaround, but I feel
user_agent[10]
may index into unspecified memory, so this behavior may not be well defined. What do you think?That's why I wrote it was dirty. There is a safe method but I had problems to realize what should be selected and what not. I'll edit the answer accordingly in a second.
Thanks, a "dirty" solution is better than no solution -)