diff --git a/detect.c b/detect.c index b4e9c6ca..edd5b776 100644 --- a/detect.c +++ b/detect.c @@ -76,15 +76,6 @@ void the_program(uint8_t core_id, unsigned int log_interval, char *workers_socket_addr) { - printf("Using private keys: \n"); - for (uint8_t i = 0; i < numkeys; i++) - { - printf("Key %d: ", i + 1); - td_print_key(station_keys[i]); - printf("\n"); - } - printf("\n"); - fflush(stdout); struct RustGlobalsStruct rust_globals = rust_detect_init(core_id, station_keys, numkeys, workers_socket_addr); // g_rust_failed_map = rust_globals.fail_map; diff --git a/src/elligator.rs b/src/elligator.rs index 05cb0058..6e9e86fe 100644 --- a/src/elligator.rs +++ b/src/elligator.rs @@ -41,13 +41,6 @@ pub fn extract_payloads_multiple_keys( ) -> Result> { for key in secret_keys { if let Ok(payload_elements) = extract_payloads(key, tls_record) { - let hex_key = hex::encode(key); - println!("found payload from key: {}", hex_key); - println!("all parsed keys: "); - for key_i in secret_keys { - let hex_key = hex::encode(key_i); - println!("{}", hex_key); - } return Ok(payload_elements); } } @@ -213,13 +206,9 @@ mod tests { fn test_extract_payload() { const PRIVKEY: &str = "203963feed62ddda89b98857940f09866ae840f42e8c90160e411a0029b87e60"; const REGTLSPAYLOAD: &str = "17030302320000000000000001f4914e06157d1d7999c8f0eab5c115f803bfd481857dc1751d3729cfd13f31c47370ba7703841c7fadf14e1fa722268519dba56ab53651a77a98804210f993341005e709ce352411731f7075331b8b10ea34fcefc4407210585ef439545cd79e03154ee0735c5b3f7cab57bc52e6ec99a8dbfca8f3a497f83c0d836447428652e8696dc5ca9b045e32dd6cb02687d9d1cfb8d852f3f72d2bee01b4a94474d497c4a56fc7435a67c56bca153664c13ea38a54a0cc612e023ddf8791415a4857fc91efd768ced5bd0d06cf91f0677df2f61daf14d5892e1a6a36b594d86ecad764d4868417dd7a12d17f9aae2491628a6ad3713dd544a6e5dd61bf673d79a102cd8ca2001197bbbc2f525c7ce5059d411687dde048f154d46fd60c7e144b5aa6ab00926c6a3a34b1300af7bc45da0abee0f836d93ae3ed3029f7aa3b062d5c278234869b60644e36221e60ce0674c88c1f642daba3fe3518ad1436d217e04934f9abef888cc710fde60cab81aaa35e6378539f18280981009e7866fa89b268a1d63f3fd4785eeecda89cee2db40d5d002c1aa21fac0577951d67358588562868ea5e34bf8fc04bd432e06ffc9dc0add6895113e3401f0e39a035e70ff191615f5c3269f765752f7c9b8da7396d02fc5d555eceb2901340ea435d3e420020145aa53b2b988b5b85affed117ff990386c8ff7ec8f1d6e0583c066fa7e6e7311a37fe67438c4d479f7d74632d65f2ea5676d36ad0ea311a434efd982dd1355b5f27b7ea1002ff8b1889895455"; - const SHAREDSECRET: &str = - "c41ce05bf8480df3ef038dc9747fa608375a7ab64d8938e30a27e9e222ae680d"; const PRIVKEY2: &str = "f00a2d4fe4bb21e4deacef21c2d0ad135cb96747b14fc5ae208bc09bf4799479"; const REGTLSPAYLOAD2: &str = "17030302450000000000000001b858a61acbd0360ac424062e0a0724d6774910ad27bec3c429e227ee44ff45d4aef082d991b57af6ad45c52206961a8ce4345f79916ce02dda177a823d3f9007420898b4a5d124509945a741ff06af6e84db99f6380c7099825c0cf9a89484577369b5e3e954aa9a4606894f34d1924995a0fa646e2e1bb93271da10531f415f5f2e30e34f86e6674bdb0cdf85c6dfa91ba76167d325750746e0fc12aaaa6b4e768e49446f53d14da3ba3eaa26bf9359ae0cc9736a4ba5ca797c6b5b0532bfb6f06bd3dc0e428e978e9178769dc9567c2900793a2112aacc8ed48d19380118482629f7b6962fdb07fba6f62bedab4d937db7cc866a257c0834ceeac21e6f248f3bb7a752205081fb4eb98af3fd4b02c6d8dcf511786e05b8615e18350d4399de86a38f102e91ed332dfe235abd644b43193fa51be9f25a80845b86f76ccf8a4f4609fca90ba62a83bb56a06e9613c4168462dc792b4f84be1c0bbf83483df9c67c283827fd0ec78df5a71ef14a28691b1376aa139aee27d496913a0f4c293828b2a854be7c6bebaba6bd39c59619be443edded7fe7a8bb3efaac11a7d57467bde9f4636a282c4e1ad003697ce2eab68b4e2edff05993ef4a43be26639e5ec08211b27c1f50ac44772a525ede4323dae23e4adb5c6b7ee39b7307512416cab1ee4dc14e23988be74de7ef2ec25e74dde68792dfcb824623a4289667abb3c67e600cad8457f780cf19552ee9fa432abd727da5dd7d16ef39c936c8a69ff81a679454c7da387c84f28ca6236d5ea889f9d3c9e4ae124d28ef6e7d62916ffc"; - const SHAREDSECRET2: &str = - "3071dd364c61849266e921a5e99c8402b45cc81345a33473daf5b02d8d2f117c"; let privkey = hex::decode(PRIVKEY).expect("err decoding privkey"); let tls_record = hex::decode(REGTLSPAYLOAD).expect("err decoding tls record"); diff --git a/src/process_packet.rs b/src/process_packet.rs index 9d9f5883..e1cabf73 100644 --- a/src/process_packet.rs +++ b/src/process_packet.rs @@ -279,12 +279,6 @@ impl PerCoreGlobal { } fn check_dark_decoy_tag(&mut self, flow: &Flow, tcp_pkt: &TcpPacket) -> bool { - // println!("rust parsed keys: "); - // for key in &self.priv_keys { - // let hex_key = hex::encode(key); - // println!("{}", hex_key); - // } - self.stats.elligator_this_period += 1; match elligator::extract_payloads_multiple_keys(&self.priv_keys, tcp_pkt.payload()) { Ok(res) => {