Skip to content

Commit ce08746

Browse files
Fix name issue
1 parent 96db5ce commit ce08746

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/detector/detector.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ def detect(self) -> None: # pragma: no cover
311311
for message in self.messages:
312312
# TODO predict all messages
313313
y_pred = self.model.predict_proba(
314-
self.scaler.transform(self._get_features(message["host_domain_name"]))
314+
self.scaler.transform(self._get_features(message["domain_name"]))
315315
)
316316
logger.info(f"Prediction: {y_pred}")
317317
if np.argmax(y_pred, axis=1) == 1 and y_pred[0][1] > THRESHOLD:

tests/detector/test_detector.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"response_ip": "252.79.173.222",
1717
"timestamp": "",
1818
"status": "NXDOMAIN",
19-
"host_domain_name": "IF356gEnJHPdRxnkDId4RDUSgtqxx9I+pZ5n1V53MdghOGQncZWAQgAPRx3kswi.750jnH6iSqmiAAeyDUMX0W6SHGpVsVsKSX8ZkKYDs0GFh/9qU5N9cwl00XSD8ID.NNhBdHZIb7nc0hDQXFPlABDLbRwkJS38LZ8RMX4yUmR2Mb6YqTTJBn+nUcB9P+v.jBQdwdS53XV9W2p1BHjh.16.f.1.6037.tunnel.example.org",
19+
"domain_name": "IF356gEnJHPdRxnkDId4RDUSgtqxx9I+pZ5n1V53MdghOGQncZWAQgAPRx3kswi.750jnH6iSqmiAAeyDUMX0W6SHGpVsVsKSX8ZkKYDs0GFh/9qU5N9cwl00XSD8ID.NNhBdHZIb7nc0hDQXFPlABDLbRwkJS38LZ8RMX4yUmR2Mb6YqTTJBn+nUcB9P+v.jBQdwdS53XV9W2p1BHjh.16.f.1.6037.tunnel.example.org",
2020
"record_type": "A",
2121
"size": "100b",
2222
}

0 commit comments

Comments
 (0)