Commit graph

84 commits

Author SHA1 Message Date
Pierre Lalet
b642c34e42 Remove unneeded .clone() call
`pattern` is a reference, and according to `cargo test` output: "the
type `[u8]` does not implement `Clone`, so calling `clone` on `&[u8]`
copies the reference, which does not do anything and can be removed".
2023-10-18 02:19:51 +02:00
Raphael Tomé Santana
a0b8572089
fix: remove netdevice crate usage 2023-10-09 10:50:58 -03:00
Pierre Lalet
b498d70602 Remove unneeded mut 2023-08-26 22:32:10 +02:00
_Frky
c132c39ebf
Fix syn (#102)
* Add unit test for TCP SYN replies
* Add functional test for TCP SYN+flag packets
* Fix bug: prevent anwsers to SYN+flag first packets
* Fix TCP behaviour to match Linux network stack
* Update the documentation according to the new behaviour for TCP SYN packets
2023-07-05 22:20:06 +02:00
Pierre Lalet
cc17dec2d5 Update SmackFlags to support Copy
Needed to update bitflags from 1.x to 2.x
2023-07-03 18:26:17 +02:00
Pierre Lalet
7c6d8258ef Fix build warning 2023-02-14 00:24:04 +01:00
Pierre Lalet
3159ecf743 pcap-file: switch to 2.0 API 2023-02-14 00:16:46 +01:00
_Frky
61a8cebf8f
Merge pull request #93 from Unactived/master
Option to avoid responding to chosen IP addresses
2022-12-09 12:10:05 +01:00
_Frky
bad2c5e02c Rename options for IP (self and remote) for more clarity 2022-12-08 21:28:03 +01:00
_Frky
1181d6eb93 SSH: reply with the client's banner 2022-11-24 19:24:09 +01:00
_Frky
e541d1f5ee Add unit test for IPv6 blacklist 2022-11-24 17:12:37 +01:00
_Frky
b136728f8f Add unit test for IPv4 blacklist 2022-11-24 17:12:32 +01:00
Unactive
0f8ef335a0 Added option to forbid responding to chosen IP addresses 2022-11-24 15:00:35 +01:00
_Frky
ae175e7b77 Fix other bug in clap 2022-10-20 20:03:15 +02:00
_Frky
04c9621c7e Fix clap default options since last update 2022-10-20 17:49:36 +02:00
Unactive
e5bbd08d49 et -> eth_type and cargo fmt 2022-10-06 10:07:00 +02:00
Unactive
1f02849656 Format option and Logfmt support 2022-10-05 22:16:39 +02:00
Pierre Lalet
ce4ac2858d Fixes for clap v4
See https://github.com/clap-rs/clap/blob/master/CHANGELOG.md
2022-09-30 13:35:35 +02:00
_Frky
8b24ab4f24 Fix bug in console logger for TCP/UDP 2022-09-21 14:32:23 +02:00
_Frky
cc2457db67 Add quiet mode 2022-09-20 14:44:23 +02:00
_Frky
331aca3d21 Format code 2022-09-15 17:48:36 +02:00
_Frky
726b5d2e87 Add option for list of IP to bind in command-line argument 2022-09-15 17:46:56 +02:00
Pierre Lalet
321b8813aa Display data using safe byte2str()
Regression from 87c95ff240 (#13)
2022-08-25 01:24:22 +02:00
Pierre
5d43397cf1
Merge pull request #13 from ivre/proto-ssh
Improve proto SSH
2022-08-04 23:41:14 +02:00
_Frky
ed464181bc Run cargo fmt 2022-08-04 17:57:20 +02:00
_Frky
7cf67e01b3 Answer to SSH-1.99 banners too 2022-08-04 17:27:06 +02:00
_Frky
1b3c0cbd2f Format code 2022-08-04 17:21:46 +02:00
_Frky
87c95ff240 Implement FSM for parsing SSH banner 2022-08-04 17:21:44 +02:00
_Frky
2e296d7546 Add DNS to supported protocols + functionnal tests 2022-08-04 15:14:31 +02:00
_Frky
c6be16382f Move dissector into a separate file 2022-08-04 15:13:45 +02:00
_Frky
0dd0e1d645 Add DNS implementation - Query and RR for IN/A 2022-08-04 15:13:09 +02:00
gpotter2
ea65f23a6c Reply to SMB1 SessionSetup 2022-05-31 14:13:37 +02:00
gpotter2
6eecc91ce4 Reply to SMB2 SessionSetup 2022-05-31 14:13:37 +02:00
_Frky
9fdecf5be7 Cargo format 2022-05-30 14:48:55 +02:00
_Frky
e34f3a6bcd Fix bug with empty or misformed payload 2022-05-30 14:47:30 +02:00
_Frky
d2d916239d Add Rust unit tests for empty payload 2022-05-30 14:47:02 +02:00
Pierre Lalet
28a8f9b033 TCP: fix int overflow in ack 2022-05-19 15:26:35 +02:00
Pierre Lalet
d6b6de7d3f Add test for issue GH#50 2022-05-19 15:25:33 +02:00
_Frky
e38498a3cd
Merge pull request #48 from p-l-/update-clap
Update clap, switch to Command (App deprecated)
2022-05-01 09:46:56 +02:00
Pierre Lalet
44d00831fa Update clap, switch to Command (App deprecated) 2022-04-27 19:00:21 +02:00
Pierre Lalet
48003a383e SSH: fix output 2022-04-27 18:48:13 +02:00
Pierre Lalet
dfe49d26de Add SSH wrong banner test 2022-04-27 17:56:50 +02:00
gpotter2
b24d0df124 TCB: move to layer 4 2022-02-17 15:39:36 +01:00
_Frky
c6118e1448 Fix bug in HTTP segmented test + clean 2022-02-16 12:07:48 +01:00
_Frky
b74d891385 Add MetaLogger in TCB unit tests 2022-02-16 11:55:02 +01:00
_Frky
950d40fbbd Add TCB in SMB repl functions 2022-02-16 11:55:00 +01:00
_Frky
0008cae1ef Fix protocol ID and state in TCB 2022-02-16 11:53:52 +01:00
_Frky
5922dcd370 Add unit tests for protocol ID and protocol state over TCP packets 2022-02-16 11:53:52 +01:00
_Frky
997b6ae2b6 Add protocol id in TCB 2022-02-16 11:53:52 +01:00
_Frky
4152f19fe2 Cargo Format 2022-02-16 11:53:12 +01:00