Sign up to take part
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
Is it possible to use variable in the IP range plugin?
I am getting an error when I am trying to do so (Refer attached)
I need to compare individual ip address against a long list of IP range so I was thinking of capturing the list in a variable and pass through the variable in the step but the step does not seem to work with variable
Operating system used: Windows 10
On a formula processor you would add a variable using variables["my_var"]. However this is a plugin so this would only work if the plugin supports it which in this case it doesn't. So you would either need to modify the plugin or move to a Python recipe and use the built-in ipaddress IPv4/IPv6 manipulation library:
I see, so not all plugin support variables. Thanks for the info.
Currently, I would need to check against a range in the format of "IPa-IPx" such as '10.0.0.1-10.0.0.2' but the ipaddress module can only be used for CIDR. I am looking into using socket and struct library to convert the ip into integers and compare them
You can convert any IP Range to CIDR, just use any of the free websites around:
https://www.ipaddressguide.com/cidr
CIDR is the standard way to specify IP ranges.