handle unknown header on server
This commit is contained in:
parent
d5511e1938
commit
270ef5cf84
1 changed files with 16 additions and 12 deletions
|
@ -102,6 +102,7 @@ async fn handle_request(
|
|||
stack = match (stack, n) {
|
||||
(0, b'\r') => 1,
|
||||
(1, b'\n') => {
|
||||
if !status {
|
||||
if key == b"Host" {
|
||||
remote = String::from_utf8(value.clone())?;
|
||||
} else if key == b"Authentication" {
|
||||
|
@ -111,11 +112,14 @@ async fn handle_request(
|
|||
}
|
||||
} else if key == b"UDP" {
|
||||
udp = value == b"1";
|
||||
} else {
|
||||
return Err("unknown header provided!! malware connection".into());
|
||||
}
|
||||
|
||||
is_key = true;
|
||||
key.clear();
|
||||
value.clear();
|
||||
}
|
||||
2
|
||||
},
|
||||
(2, b'\r') => 3,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue