ronin-rb / ronin-masscan

A Ruby library and CLI for working with masscan.
https://ronin-rb.dev
GNU Lesser General Public License v3.0
3 stars 1 forks source link

Add specs for `Masscan.scan` #21

Closed AI-Mozi closed 8 months ago

AI-Mozi commented 8 months ago

1

postmodern commented 8 months ago

We will need to figure out a way to test that masscan is being executed, without actually executing the command, because 1) it requires root and 2) GitHub probably wouldn't like us port scanning from within GitHub Actions. :laughing:

postmodern commented 8 months ago

Ah ha! Simply do expect(Kernel).to receive(:system).with(['masscan', ...]).and_return(true), or .and_return(false) for a simulated failure.