Skip to content
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

netblocks lookup fails "has host bits set" #90

Open
rameyst opened this issue Apr 12, 2020 · 1 comment
Open

netblocks lookup fails "has host bits set" #90

rameyst opened this issue Apr 12, 2020 · 1 comment

Comments

@rameyst
Copy link

rameyst commented Apr 12, 2020

when attempting to lookup a netblock with cidr notation, an error is generated if the host bit is set.
ex. xx.xx.xx.67/24 -> will raise ValueError('%s has host bits set' % self)

to fix it, in the recon-ng/recon/core/module.py add "False" when passing the netblock string to the ipaddress.ip_network(string) function.

def cidr_to_list(self, string): import ipaddress return [str(ip) for ip in ipaddress.ip_network(string, False)]

@lanmaster53
Copy link
Owner

This is a valid issue. Thank you. Do you mind submitting a pull request to the staging branch?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants