[SOLVED] Retrieve specific data from html (alternative who is)
ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Interesting. OVH is a Canadian company, of course, so the CA refrence on the 139.99.0.0/16 block makes sense.
The 139.99.0.0/17 block and the 139.99.118.64/26 blocks are OVH Singapore. Presumably other 139.99. IPs are elsewhere, but it would take multiple queries to figure that out.
For your purposes, I'd think that SG is all you'd need to know, and you'd block the /26 block to start.
Note that the abuse reporting addresses are all the same...which is all I usually care about.
This particular anomaly is probably caused by having SG addresses in the ARIN RIR
Please see my latest update. I fixed a corner case where there is only the country name available.
Thank you , i will check it out .
Quote:
Interesting. OVH is a Canadian company, of course, so the CA refrence on the 139.99.0.0/16 block makes sense.
The 139.99.0.0/17 block and the 139.99.118.64/26 blocks are OVH Singapore. Presumably other 139.99. IPs are elsewhere, but it would take multiple queries to figure that out.
For your purposes, I'd think that SG is all you'd need to know, and you'd block the /26 block to start.
Note that the abuse reporting addresses are all the same...which is all I usually care about.
This particular anomaly is probably caused by having SG addresses in the ARIN RIR
Yesterday 02:51 PM
One of the solutions for me on whois tool for this kind of results where to validate only the first result and ignore the other 2 , but on different ips i notice that sometimes the real country came as a 2nd variable from whois and not as the 1st .
Worst than that is when i get EU (Europe) as result from whois and the real country is in US or anywhere else .
Of course if i wanted the abuse contacts only then whois tool was perfect for the job as you told before , but in my case i only need the country , and in this case the country letter code .
Maybe using the code from "Individual i will post here the full code with the country list hosted on an external server somewhere , ex : github , for those who need it , and the script code will pick up the country list in github and display the full country name in the script when it is not available from dnslytics .
ping in some computers dont work well because uses an echo request to google , some computers have problem with that and i believe that is because of some firewall rules on those computers , i have notice that very often in the past in other github projects i have collaborated .
Instead ping i used netcat to connect directly to port 80 using tcp protocol witch is 100% reliable .
Yup , you are right in the function used to display the help , i did the script very fast and i did not realize that option to use .
Usually on my other scripts when i have plenty of time to look into the code and optimize it i do that , but this one was made in 10 minutes and i just uploaded it to github .
I will do that as soon as i get sometime here because right now i have some issues in my cloud to deal and my web server is right now under fully attack .
I will change the code during next week , or if you want just create a github account , clone ipcountry git , make your changes in your code and send the pull request to me that i will accept it .
Maybe if you have any other ideas for the script then feel free to add them at your will , since basically you did the hardest part of the script witch i would problably wont get there easily .
ping in some computers dont work well because uses an echo request to google , some computers have problem with that and i believe that is because of some firewall rules on those computers , i have notice that very often in the past in other github projects i have collaborated .
Instead ping i used netcat to connect directly to port 80 using tcp protocol witch is 100% reliable .
Yup , you are right in the function used to display the help , i did the script very fast and i did not realize that option to use .
Usually on my other scripts when i have plenty of time to look into the code and optimize it i do that , but this one was made in 10 minutes and i just uploaded it to github .
I will do that as soon as i get sometime here because right now i have some issues in my cloud to deal and my web server is right now under fully attack .
I will change the code during next week , or if you want just create a github account , clone ipcountry git , make your changes in your code and send the pull request to me that i will accept it .
Maybe if you have any other ideas for the script then feel free to add them at your will , since basically you did the hardest part of the script witch i would problably wont get there easily .
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.