Skip to content

Commit

Permalink
more lining up. more blaming Seth!
Browse files Browse the repository at this point in the history
  • Loading branch information
srunnels committed May 4, 2012
1 parent 8830a8c commit 42fcc89
Showing 1 changed file with 14 additions and 15 deletions.
29 changes: 14 additions & 15 deletions http-basic-auth.bro
Expand Up @@ -7,20 +7,19 @@ export {
};
}

event http_header(c: connection, is_orig: bool, name: string, value: string)
{
if (/AUTHORIZATION/ in name && /Basic/ in value)
{
local parts = split1(decode_base64(sub_bytes(value, 7, |value|)), /:/);
if (|parts| == 2)
NOTICE([$note=HTTP::Basic_Auth_Server,
$msg="Server identified in which Basic Access Authentication is in use.",
$sub=fmt("username: %s password: %s",
parts[1],
HTTP::default_capture_password == F ? "Blocked" : parts[2]),
event http_header(c: connection, is_orig: bool, name: string, value: string)
{
if (/AUTHORIZATION/ in name && /Basic/ in value)
{
local parts = split1(decode_base64(sub_bytes(value, 7, |value|)), /:/);
if (|parts| == 2)
NOTICE([$note=HTTP::Basic_Auth_Server,
$msg="Server identified on which Basic Access Authentication is in use."
$sub=fmt("username: %s password: %s",
parts[1],
HTTP::default_capture_password == F ? "Blocked" : parts[2]),
$conn=c,
$identifier=cat(c$id$resp_h,c$id$resp_p),
$suppress_for=1day
]);
}
}
$suppress_for=1day]);
}
}

0 comments on commit 42fcc89

Please sign in to comment.