Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
why did you wrote {9} instead of {3} as it was in the original post?
a hexadecimal value can be: [0-9a-fA-F], so an ip can be:
Code:
[0-9a-fA-F][0-9a-fA-F](\.[0-9a-fA-F][0-9a-fA-F]){3}
^ one digit ^ second( ^ dot ^ digit ^ digit ) repeat three times
_____________________________________
If someone helps you, or you approve of what's posted, click the "Add to Reputation" button, on the left of the post.
Happy with solution ... mark as SOLVED
(located in the "thread tools")
why did you wrote {9} instead of {3} as it was in the original post?
a hexadecimal value can be: [0-9a-fA-F], so an ip can be:
Code:
[0-9a-fA-F][0-9a-fA-F](\.[0-9a-fA-F][0-9a-fA-F]){3}
^ one digit ^ second( ^ dot ^ digit ^ digit ) repeat three times
_____________________________________
If someone helps you, or you approve of what's posted, click the "Add to Reputation" button, on the left of the post.
Happy with solution ... mark as SOLVED
(located in the "thread tools")
He does not want to match the IP---only the hex string AFTER the IP
_____________________________________
If someone helps you, or you approve of what's posted, click the "Add to Reputation" button, on the left of the post.
Happy with solution ... mark as SOLVED
(located in the "thread tools")
first, go back to a question I asked earlier: Does this program accept extended regex syntax?
second, the regex your just tried will match at least one instance of a space followed by ONE hex character. You have a sequence of space followed by TWO hex characters. See the code that I suggested.
But first, we have to know what kind of regex your program will accept......
papampi;
first, go back to a question I asked earlier: Does this program accept extended regex syntax?
But first, we have to know what kind of regex your program will accept......
OK---forget "extended" regexes---use the Python rules. (I tried to see if they look like extended regex rules, but my brain has exceeded its daily quota..... )
what I found: you can use this page to test python regexps. You have [ and ] in the original text, you need to escape them in a regexp, so you need to use: \[ and \]. The regexp generated from <HOST> does not match ip addresses like 1.2.3.4 (but hostnames, like a.b.c.d).
this looks now ok, but I'm not really sure:
_____________________________________
If someone helps you, or you approve of what's posted, click the "Add to Reputation" button, on the left of the post.
Happy with solution ... mark as SOLVED
(located in the "thread tools")
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.