-
Notifications
You must be signed in to change notification settings - Fork 374
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Have Query and Answer string length #90
Comments
Though this is trivial to calculate from the current log format, either by prepossessing logs before you push them to your final log storage solution (by kafka etc), or I would guess you can calculate such with say splunk when searching logs etc., I do see that it could be nice if you dont have such fancy setups to have this. If I get time, I will look at it. E |
Check out commit 215e351 |
I would vote against this change. It adds extra computation, and alters the logformat and size. All for something that i think should be calculated further down the pipeline (as previously mentioned by gamelinux). Also, it seams to be outside the scope of what i feel this application is, a slim and to-the-point passive dns collector. |
I do agree that it is outside what I would like in the core functionality (as the data is kind of there all ready, you just need to calculate it), but adding this would just add a very very little overhead to computation if you don't specify -f with "L" and "l". Its just checking if a flag is set in a very efficient way a few places. And this will not alter the output format, if you don't manually add "L" and/or "l". The biggest plus here is that this allows for command line tools like jq to parse the json output etc, and filter on length of domains if you want to hunt for say dns tunneling etc. Im open for feedback though :) |
hello, best regards. |
hello,
is it possible to had Query and Answer string length at the end of the log line.
These data will help my security manager to check possible data evasion through DNS request.
For a test situation i've had the line to dns.c
`
/* line: 660*/
int qname_len = 0;
int answer_len = 0;
/* line: 1103*/
/* Print query length*/
if (config.fieldsf & FIELD_QUERY) {
if (offset != 0)
qname_len = strlen(l->qname);
offset += snprintf(output+offset, sizeof(buffer) - offset, "%s", d);
offset += snprintf(output+offset, sizeof(buffer) - offset, "%d", qname_len);
}
`
but i'm not an experimented programmer in language C.
Sorry, i don't understand lot of your code and i'm be able to do the full job.
bye.
The text was updated successfully, but these errors were encountered: