-
-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add IPRangeEnum
specs
#77
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added some early review comments.
describe Ronin::Recon::Net::IPRangeEnum do | ||
describe "#process" do | ||
context "when there are ip in range" do | ||
let(:ip_range) { Ronin::Recon::Values::IPRange.new('192.168.0.1/2') } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use /30
which will only enumerate the last two bits of the IP address.
end | ||
end | ||
|
||
context "when there is no ip in range" do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this edge-case should exist? A Values::IPRange
will always cause IPs to be yielded. Even if the IP range is A.B.C.D/32
it will only yield Values::IP.new('A.B.C.D')
.
end | ||
end | ||
end | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe also add an edge-case with an IPv6 range?
235cb37
to
44dbd65
Compare
Moved into #107 |
Waiting for #58