Questions related to IP addresses, IPv4 and IPv6.
8
votes
2answers
11k views
Validate IP address in Java
Following is the code that I'm currently using to validate the user given IP address (IPV4 and IPV6). It makes use of apache commons-validator's ...
8
votes
2answers
153 views
Representing IPv6 addresses with PHP per RFC 5952
I wrote the following function in PHP to represent IPv6 addresses as short as possible:
...
6
votes
3answers
309 views
Locating a PID based on an IP address and port
I wrote a simple Python app that is given an IP address and port and the app then finds the PID listening on that IP:PORT.
I would like to hear constructive criticism regarding the bellow code.
...
5
votes
2answers
255 views
Get external IP via email
I wrote a script for my Raspberry Pi that keeps checking my external IP. If it changes, the Raspberry Pi will send me the new IP via email.
Any suggestions for improvements?
...
4
votes
1answer
79 views
IP Whitelist function
I've just created a function to check if your IP is within an array of IPs. The IP array can contain ranges like 192.168/170.50.0/255. I have a working example, but it seems a bit clunky to me.
Is ...
4
votes
3answers
857 views
4
votes
2answers
606 views
Erlang code to list all IP addresses
This is some Erlang code I wrote to output a string of all the IP addresses of the machine. The string is simply printed to the user for him to read.
...
4
votes
1answer
234 views
Dynamic IP-address logging
Inspired by Don Stewart's article on Scripting with Haskell I tried a rewrite of a shell-script I did the other day. I was really astonished how easily it worked but as a whole it is about double the ...
4
votes
1answer
57 views
Getting the HTTP client's IP
Can you please tell me whether this is a good way to get the user's IP (IPv4 or IPv6)? Does someone have a better way to do this? Please take a look at the entire code, the ...
2
votes
2answers
229 views
Changing IP of msloop
This changes the IP of msloop using WMI(Win32_NetworkAdapterConfiguration), which takes about 1~2sec.
But, if I work on another computer, it works much much ...
2
votes
2answers
58 views
Locating existing records
In order to reduce redundancy in my app, I have added the method self.find_or_keep(object) to many of my models in order to find existing records with the same ...
2
votes
1answer
30 views
Skinny model, fat controller in Rails managing user IP addresses
As part of learning Rails framework, I have small app in progress. Basically idea is, user can create IP address, define is it in use, to which server is assigned, which user is it using and role of ...
2
votes
1answer
31 views
Using view for repeated subquery on a large table
I have a large table with which I need to do some analysis. The table is a log of IPs:
...
2
votes
1answer
34 views
Searching for log entries in SQLite that involve a particular IP subnet
This reads a huge database (SQLite) and extract any IP address similar to ip_base:
...