I don't know how to make a code lines for checking "if an IP Address is in the IP range"
I know it might need VBS (file) language or something, please help me.
This is the example of IP range (IP/mask):
162.158.0.0/15
I don't know how to make a code lines for checking "if an IP Address is in the IP range"
I know it might need VBS (file) language or something, please help me.
This is the example of IP range (IP/mask):
162.158.0.0/15
Last edited by cheaterastic; 15-11-18 at 02:06 PM.
You could use an enum to declare reserved IP's such as 127.0.0.1 and 000.000.000 etc.
Then you could read the IP you need to check as a string, split it around "." and stick the segments into an array, then check that each part is between 0 and 255 as those are the valid values of an IPv4 address.
Obviously this is a very generic way to solve the problem and many languages like Java and C# will have built in tools for this that may prove to be easier.
Yeah thanks, that's what I did.