Comments (2)
Hi!
After reading Issue 44 I think there is a misunderstanding on the usage of the regexp parameter. Apparently you don't have to specify a regexp to match the IP address, but a regexp to describe where it is.
So based on your example, you might want to use .*client ([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})\:[0-9]*\].*
as regexp parameter. Note that I placed your regexp in regular brackets, and just but a bit context before and after.
$ echo ' [Mon Jul 18 17:54:15.281165 2022] [ssl:info] [pid 32202] [client 11.22.33.44:11388] Some Text bla...' | \
> anonip -4 8 --regex '.*client ([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})\:[0-9]*\].*'
[Mon Jul 18 17:54:15.281165 2022] [ssl:info] [pid 32202] [client 11.22.33.0:11388] Some Text bla...
Best regards,
Tolimar
from anonip.
That's the Info I need.
Thanks for help!
from anonip.
Related Issues (20)
- Clearify readme: Only for apache? HOT 1
- Package for GNU/Linux distributions HOT 7
- Examples for nginx and systemd HOT 2
- Add LICENSE file to repo and sdist
- Add test.py to sdist
- Python 2.7 did not detect IPv6 addresses HOT 1
- Python 2.7.17 yields an error while Python 3 runs fine. HOT 3
- nginx error logs not masked HOT 1
- IP Adresses with Ports doesn't get masket HOT 2
- [RFC] Regex based IP detection HOT 5
- Import anonip has side effects
- Too broad regex replacement
- Doesn't handle binary logfile content HOT 4
- Apache Error: (OS 193)%1 ist keine zulässige Win32-Anwendung. HOT 3
- Error with IPv6 short form notation + port HOT 4
- piped anonymization in apache not working HOT 2
- wishlist: please implement an 'inplace' option
- Exclude some addresses from anonymization
- Old "homepage" shall point here HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from anonip.