skerkour / kerkour.com

(Ab)using technology for fun & profit. Programming, Hacking & Entrepreneurship @ https://kerkour.com
https://kerkour.com
Apache License 2.0
463 stars 63 forks source link

Scans beyond TCP connect #13

Closed David-OConnor closed 2 years ago

David-OConnor commented 2 years ago

Hi! Would this code base be modifiable to support other scan types, for example a Syn scan? My suspicions are you would need a very different approach, since std::net and tokio::net don't give you control over this. (Maybe the socket2 lib?), but I'm curious.

sylvain101010 commented 2 years ago

Hi @David-OConnor,

I'm not sure about the low-level library to use specifically for a Syn scan, but the in terms of architecture, it would be really simple to adapt.

Either by using trait objects and wrapping each scanning method in a different type,

or simply by wrapping (if needed) the blocking call for Syn Scan in with tokio's spawn_blocking and then switching between the different scanning functions.

✌️