Updating my IP address in real time

2012-05-03 Thread Terry Shepherd
For a project at work, I need to have my development machine here at my house reachable via a name. I don't have static IP from my ISP (they offer it, but it's an expensive add-on). I have the router configured so that if you go to http://205.178.x../mypage you get to my server, but I need to

Re: Updating my IP address in real time

2012-05-03 Thread Leopoldo Caballero
Actually you can do this with ddclient and a service like DynDNS. Maybe you can put your somehost.mydomain.com in CNAME of blabla.dyndns.org and configure ddclient to update the service for blabla.dyndns.org On Thu, May 3, 2012 at 12:25 PM, Terry Shepherd terry.shepherd.94...@gmail.com wrote:

Re: Updating my IP address in real time

2012-05-03 Thread Lawrence Statton
On 05/03/2012 12:25 PM, Terry Shepherd wrote: For a project at work, I need to have my development machine here at my house reachable via a name. I don't have static IP from my ISP (they offer it, but it's an expensive add-on). I have the router configured so that if you go to

Re: Updating my IP address in real time

2012-05-03 Thread Terry Shepherd
Wow. Thanks for the fast response. This is amazing. No, I did not work for that station. I am in San francisco and was in elementary school during the 80s. What does fqdn mean and what is the authoritave server? On Thu, May 3, 2012 at 12:52 PM, Lawrence Statton lawre...@cluon.com wrote: On

Re: Updating my IP address in real time

2012-05-03 Thread Uri Guttman
the solution you need. contact dyndns.com for a free dns name for your dhcp (dynamic ip address). many routers (mine from verizon) actually have built in support to update the dns servers at dyndns (they invented this protocol). if you don't have the support, you can download a short perl program from

Re: Updating my IP address in real time

2012-05-03 Thread Lawrence Statton
On 05/03/2012 01:02 PM, Terry Shepherd wrote: Wow. Thanks for the fast response. This is amazing. You're welcome. I'm pretty sure on this list, the custom is not to top-post. No, I did not work for that station. I am in San francisco and was in elementary school during the 80s. You

Re: Updating my IP address in real time

2012-05-03 Thread Terry Shepherd
On Thu, May 3, 2012 at 1:35 PM, Lawrence Statton lawre...@cluon.com wrote: On 05/03/2012 01:02 PM, Terry Shepherd wrote: Wow. Thanks for the fast response. This is amazing. You're welcome. I'm pretty sure on this list, the custom is not to top-post. Sorry. Getting the hang of this.

Re: Updating my IP address in real time

2012-05-03 Thread Lawrence Statton
On 05/03/2012 01:44 PM, Terry Shepherd wrote: I like the idea of it being in our zone. Yes, I am running bind - can I hire you to help me configure the server for this? I think I can do it, but it looks like you have done this before already. Yes, I'd be glad to. Let's go off-list and

regular expression for email id and IP address

2011-04-09 Thread Sunita Rani Pradhan
Hi All 1. Can anybody guide me to write a regular expression to verify correct Email address ? 2. I have written a regular expression to verify correct IP address : print $ipadd if ($ipadd =~ /^([0-9])|([1-9][0-9])|([1-2][0-5][0-5])\.([0-9])|([1-9][0-9])|([1

Re: regular expression for email id and IP address

2011-04-09 Thread Jim Gibson
IP address : print $ipadd if ($ipadd =~ /^([0-9])|([1-9][0-9])|([1-2][0-5][0-5])\.([0-9])|([1-9][0-9])|([1-2][0- 5][0-5])\.([0-9])|([1-9][0-9])|([1-2][0-5][0-5])\.([0-9])|([1-9][0-9])|( [1-2][0-5][0-5])/); It is working as per my input . Please let me know if it correct or not . I don't

RE: regular expression for email id and IP address

2011-04-09 Thread Sunita Rani Pradhan
Yes it is matching 167.249.0.0 . -Sunita -Original Message- From: Jim Gibson [mailto:jimsgib...@gmail.com] Sent: Saturday, April 09, 2011 11:50 PM To: Perl Beginners Subject: Re: regular expression for email id and IP address At 11:42 PM +0530 4/9/11, Sunita Rani Pradhan wrote: Hi All

Re: regular expression for email id and IP address

2011-04-09 Thread Brian Fraser
use Regexp::Common qw/ net /; $ip =~ /$RE{net}{IPv4}/;

Re: regular expression for email id and IP address

2011-04-09 Thread Olof Johansson
On 2011-04-09 23:53 +0530, Sunita Rani Pradhan wrote: Yes it is matching 167.249.0.0 . But it's also matching things like 42. Feature? Read about quantifiers, and also about the precedence of |. -- - Olof Johansson - www: http://www.stdlib.se/ - {mail,xmpp}: o...@ethup.se - irc:

RE: regular expression for email id and IP address

2011-04-09 Thread Sunita Rani Pradhan
Hi Johan You are right. Thanks for pointing out . Can you help me getting it correct ? Thanks Sunita -Original Message- From: Olof Johansson [mailto:o...@ethup.se] Sent: Sunday, April 10, 2011 12:13 AM To: beginners@perl.org Subject: Re: regular expression for email id and IP

Re: regular expression for email id and IP address

2011-04-09 Thread Olof Johansson
On 2011-04-10 01:40 +0530, Sunita Rani Pradhan wrote: Hi Johan s/Johan/Olof/, but who keeps score? You are right. Thanks for pointing out . Can you help me getting it correct ? Somebody already mentioned Regex::Common. -- - Olof Johansson - www: http://www.stdlib.se/ -

Re: regular expression for email id and IP address

2011-04-09 Thread Rob Dixon
On 09/04/2011 21:30, Olof Johansson wrote: On 2011-04-10 01:40 +0530, Sunita Rani Pradhan wrote: You are right. Thanks for pointing out. Can you help me getting it correct ? Somebody already mentioned Regex::Common. Use the same module for email addresses: use Regexp::Common qw/ net

Re: ip address substitution

2011-03-17 Thread Rob Dixon
On 16/03/2011 15:08, Shawn H Corey wrote: On 11-03-16 11:05 AM, John W. Krahn wrote: Jim wrote: $old_ip_address = 1.2.3.4; $new_ip_address = 5.6.7.8 $old_ip_address_regexp = $old_ip_address; $old_ip_address_regexp =~ s/\./\\./ig; $read_line =~

ip address substitution

2011-03-16 Thread Jim
I propose the following code will properly take the variable $read_line and substitute $new_ip_address for all occurrences of $old_ip_address. Basically the snippet of code is from some software that will update a set of old ip addresses with new ip addresses within a file. Can anyone find any

Re: ip address substitution

2011-03-16 Thread Brian Fraser
and replace part of it anyway. There's a great section about this on Mastering Regular Expressions[1], 5.2.2. Matching an IP Address and 5.2.2.1. Know your context. my $old_ip_address = 1.2.3.4; my $new_ip_address = 5.6.7.8 $read_line =~ s/ (?![\w

Re: ip address substitution

2011-03-16 Thread Shawn H Corey
On 11-03-16 10:29 AM, Jim wrote: $old_ip_address_regexp = $old_ip_address; $old_ip_address_regexp =~ s/\./\\./ig; $old_ip_address_regexp = quotemeta( $old_ip_address ); See `perldoc -f quotemeta`. -- Just my 0.0002 million dollars worth, Shawn Confusion is the first step of

Re: ip address substitution

2011-03-16 Thread John W. Krahn
Jim wrote: I propose the following code will properly take the variable $read_line and substitute $new_ip_address for all occurrences of $old_ip_address. Basically the snippet of code is from some software that will update a set of old ip addresses with new ip addresses within a file. Can anyone

Re: ip address substitution

2011-03-16 Thread Shawn H Corey
On 11-03-16 11:05 AM, John W. Krahn wrote: Jim wrote: $old_ip_address = 1.2.3.4; $new_ip_address = 5.6.7.8 $old_ip_address_regexp = $old_ip_address; $old_ip_address_regexp =~ s/\./\\./ig; $read_line =~ s/(\D*)$old_ip_address_regexp(\D*)/$1$new_ip_address$2/ig; (\D*) won't work because it can

Re: ip address substitution

2011-03-16 Thread Jim
, 1.2.3.4.5 is not a valid IP, but you'd match and replace part of it anyway. There's a great section about this on Mastering Regular Expressions[1], 5.2.2. Matching an IP Address and 5.2.2.1. Know your context. my $old_ip_address = 1.2.3.4; my $new_ip_address = 5.6.7.8 $read_line =~ s/ (?![\w

Re: ip address substitution

2011-03-16 Thread Brian Fraser
/x does exactly what you think it does; It's free form style, where any non-escaped whitespace is ignored. See perlretut[0], perlop[1], and perlre[2]. (?!) is a negative lookbehind; (?!) is a negative lookahead. Meanwhile, (?=) is a positive lookbehind, and (?=) is a positive lookahead; They are

Convert Site Name to Dotted IP Address

2009-10-22 Thread Anant Gupta
I wrote #!usr/bin/perl use Socket; use constant ADDR = 'www.google.com'; my $name=shift || ADDR; $packed=gethostbyname($name); $dotted-inet_ntoa($packed); print DOtted Address is $packed; but it is showing an error Bad argument length for Socket length in inet_ntoa ??? Help

Re: Convert Site Name to Dotted IP Address

2009-10-22 Thread Philip Potter
) print DOtted Address is $packed; did you mean print Dotted Address is $dotted\n; you were printing the wrong variable. With these changes, I get a dotted ip address which matches the output of host www.google.com Philip -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional

Re: Convert Site Name to Dotted IP Address

2009-10-22 Thread Anant Gupta
is $packed; did you mean print Dotted Address is $dotted\n; you were printing the wrong variable. With these changes, I get a dotted ip address which matches the output of host www.google.com Philip

Re: Convert Site Name to Dotted IP Address

2009-10-22 Thread Philip Potter
($packed); did you mean  $dotted = inet_ntoa($packed); (you used a - minus sign instead of a = assignment operator) print DOtted Address is $packed; did you mean  print Dotted Address is $dotted\n; you were printing the wrong variable. With these changes, I get a dotted ip address which

Re: Convert Site Name to Dotted IP Address

2009-10-22 Thread Anant Gupta
ip address which matches the output of host www.google.com Philip

Re: Convert Site Name to Dotted IP Address

2009-10-22 Thread Philip Potter
2009/10/22 Anant Gupta anantgupta...@gmail.com: Thank you. I just used use strict and use warnings and it worked. Even now I cant figure out what difference can this make :) Thank you for tour time If it helps, I have no idea either :) Philip -- To unsubscribe, e-mail:

Re: Convert Site Name to Dotted IP Address

2009-10-22 Thread Shlomi Fish
Hi Anant! Here's some review of your code: On Thursday 22 Oct 2009 12:23:55 Anant Gupta wrote: I wrote #!usr/bin/perl use Socket; 1. You should add use strict; and use warnings; at the top of every file. Writing programs without them is dangerous. Probably the only instance where they

Re: Convert Site Name to Dotted IP Address

2009-10-22 Thread John W. Krahn
??? perldoc -f gethostbyname [ SNIP ] In the opposite way, to resolve a hostname to the IP address you can write this: use Socket; $packed_ip = gethostbyname(www.perl.org); if (defined $packed_ip) { $ip_address = inet_ntoa($packed_ip

get external IP address

2008-08-22 Thread William
Hello, if I want to make an application to allow user find their WAN IP address, what are the available options in Perl ? I have searched around. Thank you, William New Email names for you! Get the Email name you#39;ve always wanted on the new @ymail and @rocketmail. Hurry before

Re: get external IP address

2008-08-22 Thread John W. Krahn
William wrote: Hello, Hello, if I want to make an application to allow user find their WAN IP address, what are the available options in Perl ? I have searched around. perldoc -q How do I find out my hostname, domainname, or IP address? John -- Perl isn't a toolbox, but a small machine

Looking for example of how to keep an FTP processing running if the Ip Address is down or unavailable

2008-03-24 Thread Wagner, David --- Senior Programmer Analyst --- WGO
I have a polling process that runs 24x7 ( internal site ) and for the most part has no problems except that they shutdown the the internal site every three or four weeks and my process then dies. I have a simple setup: $MyFtp = Net::FTP-new($GlblInfo{ipaddr}, Debug = 1);

Re: Looking for example of how to keep an FTP processing running if the Ip Address is down or unavailable

2008-03-24 Thread yitzle
1) Can you set a really long timeout? 2) When I asked about doing something similar with Mechanize-get(), someone suggested wrapping the call in an eval block and testing the exit status of the function call. Or something like that. Would that approach work here? -- To unsubscribe, e-mail:

Re: Looking for example of how to keep an FTP processing running if the Ip Address is down or unavailable

2008-03-24 Thread Chas. Owens
On Mon, Mar 24, 2008 at 2:25 PM, Wagner, David --- Senior Programmer Analyst --- WGO [EMAIL PROTECTED] wrote: I have a polling process that runs 24x7 ( internal site ) and for the most part has no problems except that they shutdown the the internal site every three or four weeks and my

RE: Looking for example of how to keep an FTP processing running if the Ip Address is down or unavailable

2008-03-24 Thread Wagner, David --- Senior Programmer Analyst --- WGO
-Original Message- From: Chas. Owens [mailto:[EMAIL PROTECTED] Sent: Monday, March 24, 2008 11:42 To: Wagner, David --- Senior Programmer Analyst --- WGO Cc: Perl Beginners Subject: Re: Looking for example of how to keep an FTP processing running if the Ip Address is down

Re: find external ip address

2007-11-26 Thread Celejar
On Sat, 24 Nov 2007 16:38:21 +0100 Jenda Krynicky [EMAIL PROTECTED] wrote: From: doubleHelix [EMAIL PROTECTED] ok i know how i can find my INERNAL ip address in a script with perl: use Socket; print inet_ntoa(inet_aton()) .\n; but how would I find my EXTERNAL ip

Re: find external ip address

2007-11-24 Thread Tom Phoenix
On 11/23/07, doubleHelix [EMAIL PROTECTED] wrote: but how would I find my EXTERNAL ip address? If there's an IP address at which routers send traffic to your machine, your machine doesn't intrinsically know what it is. You generally have to ask some program such as ipconfig. Inquire in forums

Re: find external ip address

2007-11-24 Thread Jenda Krynicky
From: doubleHelix [EMAIL PROTECTED] ok i know how i can find my INERNAL ip address in a script with perl: use Socket; print inet_ntoa(inet_aton()) .\n; but how would I find my EXTERNAL ip address? Define external ... it's not as simple as it may sound. One definition

find external ip address

2007-11-23 Thread doubleHelix
ok i know how i can find my INERNAL ip address in a script with perl: use Socket; print inet_ntoa(inet_aton()) .\n; but how would I find my EXTERNAL ip address? Thanks -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Search for IP address and delete from file

2007-10-18 Thread Matthew Whipple
mv $TMP_FILE $FILE_NAME Be careful, the 192.168.0.0 can also match a line with 192.168.010 in it. See also the -F option of grep. -- Affijn, Ruud Gewoon is een tijger. Good point, bad example (although natural continuation of previous discussion). Most programs

Re: Search for IP address and delete from file

2007-10-18 Thread Matthew Whipple
On Fri, 2007-10-19 at 01:55 +0200, Dr.Ruud wrote: yitzle schreef: If you are on a Linux machine, it might just be easier to use the grep command with a shell script. FILE_NAME=./log TMP_FILE=./tmp IP_TO_REMOVE=192.168.0.0|192.168.0.255 COUNT=`grep $IP_TO_REMOVE $FILE_NAME | wc

Re: Search for IP address and delete from file

2007-10-18 Thread Dr.Ruud
yitzle schreef: If you are on a Linux machine, it might just be easier to use the grep command with a shell script. FILE_NAME=./log TMP_FILE=./tmp IP_TO_REMOVE=192.168.0.0|192.168.0.255 COUNT=`grep $IP_TO_REMOVE $FILE_NAME | wc -l` echo The IPs occur $COUNT times grep -v $IP_TO_REMOVE

Search for IP address and delete from file

2007-10-17 Thread Phillip Gonzalez
Hi, I'm trying to search a .txt file for matching ip addresses. I then want to delete those ip addresses. So far I have opened the file where the ip list is and stored it in an array. But How do I search the array for ip's? Here's what I have so far: #!/usr/bin/perl

Re: Search for IP address and delete from file

2007-10-17 Thread yitzle
Take a look at the grep function http://perldoc.perl.org/functions/grep.html Also of potential use is the qr// quote operator: http://perldoc.perl.org/perlop.html#Regexp-Quote-Like-Operators This lets you do: my $ip_search = qr/$ip_string/; my @lines_with_ip = grep /$ip_search/, @raw_data; # or

Re: Search for IP address and delete from file

2007-10-17 Thread Matthew Whipple
yitzle wrote: Take a look at the grep function http://perldoc.perl.org/functions/grep.html Also of potential use is the qr// quote operator: http://perldoc.perl.org/perlop.html#Regexp-Quote-Like-Operators This lets you do: my $ip_search = qr/$ip_string/; my @lines_with_ip = grep

Re: Search for IP address and delete from file

2007-10-17 Thread Matthew Whipple
Matthew Whipple wrote: yitzle wrote: Take a look at the grep function http://perldoc.perl.org/functions/grep.html Also of potential use is the qr// quote operator: http://perldoc.perl.org/perlop.html#Regexp-Quote-Like-Operators This lets you do: my $ip_search = qr/$ip_string/; my

Re: Search for IP address and delete from file

2007-10-17 Thread Phillip Gonzalez
They have all been helpful. Thanks, On Oct 17, 2007, at 4:40 PM, Matthew Whipple wrote: Matthew Whipple wrote: yitzle wrote: Take a look at the grep function http://perldoc.perl.org/functions/grep.html Also of potential use is the qr// quote operator:

Re: Search for IP address and delete from file

2007-10-17 Thread Jeff Pang
On 10/18/07, Phillip Gonzalez [EMAIL PROTECTED] wrote: Hi, I'm trying to search a .txt file for matching ip addresses. I then want to delete those ip addresses. The better way for finding an IP from given list is to use Net::IP module from CPAN rather than using regex I think. -- To

Re: Search for IP address and delete from file

2007-10-17 Thread yitzle
If you are on a Linux machine, it might just be easier to use the grep command with a shell script. FILE_NAME=./log TMP_FILE=./tmp IP_TO_REMOVE=192.168.0.0|192.168.0.255 COUNT=`grep $IP_TO_REMOVE $FILE_NAME | wc -l` echo The IPs occur $COUNT times grep -v $IP_TO_REMOVE $FILE_NAME $TMP_FILE mv

Re: Search for IP address and delete from file

2007-10-17 Thread Phillip Gonzalez
FreeBSD, and that's actually what I ended up doing basically using cat and grep -v. Thanks, On Oct 17, 2007, at 9:14 PM, yitzle wrote: If you are on a Linux machine, it might just be easier to use the grep command with a shell script. FILE_NAME=./log TMP_FILE=./tmp

Re: Getting ip address

2006-06-15 Thread Danny
Danny wrote: Hi list, I am trying to get the ip address from each of my NIC's (only the ip address) from ifconfig and then mailing the addresses to a remote mailbox. The problem is that I am making one BIG stuff-up out of it and I am too embarrassed to post my script here

RE: Getting ip address

2006-06-15 Thread Ron McKeever
, 2006 8:52 AM To: Perl-beginners Subject: Re: Getting ip address Danny wrote: Hi list, I am trying to get the ip address from each of my NIC's (only the ip address) from ifconfig and then mailing the addresses to a remote mailbox. The problem is that I am making one BIG stuff-up out

Getting ip address

2006-06-12 Thread Danny
Hi list, I am trying to get the ip address from each of my NIC's (only the ip address) from ifconfig and then mailing the addresses to a remote mailbox. The problem is that I am making one BIG stuff-up out of it and I am too embarrassed to post my script here. The more I try, the harder

Re: Getting ip address

2006-06-12 Thread James Turnbull
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 Danny wrote: Hi list, I am trying to get the ip address from each of my NIC's (only the ip address) from ifconfig and then mailing the addresses to a remote mailbox. The problem is that I am making one BIG stuff-up out of it and I am

How to use IP Address from VPN instead of Primary?

2006-04-05 Thread Siegfried Heintze
I'm using the LWP, HTML::Parser, HTTP::Request::Common and other packages retrieve some infromation from some web sites which require I have a certain IP address. I'm using a VPN to connect to this network. How can I tell perl to use the secondary IP address aquired by means of the VPN instead

Re: How to use IP Address from VPN instead of Primary?

2006-04-05 Thread Lawrence Statton
I'm using the LWP, HTML::Parser, HTTP::Request::Common and other packages retrieve some infromation from some web sites which require I have a certain IP address. I'm using a VPN to connect to this network. How can I tell perl to use the secondary IP address aquired by means of the VPN instead

Re: IP Number/ IP Address Array

2006-02-20 Thread John W. Krahn
180884579 imstrmcs08 180884580 imstrmcs09 180884581 imstrmcs10 Script: # Properly formatting into an array open(IPLIST, file) || die couldn't open the file; while ($x = IPLIST) { chop $x; @arr = split /\s+/,$x; print @arr\n; } # Converting IP number to IP address

IP Number/ IP Address Array

2006-02-19 Thread overkill
180884581 imstrmcs10 Script: # Properly formatting into an array open(IPLIST, file) || die couldn't open the file; while ($x = IPLIST) { chop $x; @arr = split /\s+/,$x; print @arr\n; } # Converting IP number to IP address. foreach $ipaddr { $ip1 = int ($ipaddr / (256**3)); $ipaddr

IP Number/ IP Address Array

2006-02-19 Thread overkill
imstrmcs09 180884581 imstrmcs10 Script: # Properly formatting into an array open(IPLIST, file) || die couldn't open the file; while ($x = IPLIST) { chop $x; @arr = split /\s+/,$x; print @arr\n; } # Converting IP number to IP address. foreach $ipaddr { $ip1 = int ($ipaddr / (256**3

Query, Finding IP Address of all the connected machines to remote server?

2005-10-12 Thread Sanjaykumar Gupta
Hi all, I an new to group and perl itself. I need to find the IP address of the machines, which tries/does access my unix server. For eq if someone connect using ftp, telnet,ssh or anyother tool I need to know the IP address of the user and the time when he connected. Thank you all

Re: Host IP address

2005-04-18 Thread JupiterHost.Net
DiGregorio, Dave wrote: Help please, I am trying to get the IP address of the host PC into a perl script. I tried using Gethostbyname() without success. I have a Bluetooth adapter connected to this PC and when I ping host name it returns the IP address of the BT adapter. Ipconfig shows the 2

Re: How to map IP address with country

2004-12-24 Thread Anish Kumar K.
: How to map IP address with country Anish Kumar K. wrote: Hi Hello, Is there any module in perl where I can Map the IP country with the country.. Do you mean something like: http://search.cpan.org/~nwetters/IP-Country-2.18/lib/IP/Country.pm John -- use Perl; program fulfillment

How to map IP address with country

2004-12-23 Thread Anish Kumar K.
Hi Is there any module in perl where I can Map the IP country with the country.. Thanks Anish

Re: How to map IP address with country

2004-12-23 Thread John W. Krahn
Anish Kumar K. wrote: Hi Hello, Is there any module in perl where I can Map the IP country with the country.. Do you mean something like: http://search.cpan.org/~nwetters/IP-Country-2.18/lib/IP/Country.pm John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For

Re: IP address and Browser version.

2004-11-20 Thread Gary Stainburn
On Friday 19 November 2004 7:18 pm, Chris Devers wrote: On Fri, 19 Nov 2004 [EMAIL PROTECTED] wrote: I wanted to get the IP address and the OS of the system when some one checks in the page...How will I get the IP address and OS of the person who visits the page(with PERL CGI) As I

IP address and Browser version.

2004-11-19 Thread anish
Hi I wanted to get the IP address and the OS of the system when some one checks in the page...How will I get the IP address and OS of the person who visits the page(with PERL CGI) Thanks Anish -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED

Re: IP address and Browser version.

2004-11-19 Thread Chasecreek Systemhouse
On Fri, 19 Nov 2004 23:47:01 +0530 (IST), [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi I wanted to get the IP address and the OS of the system when some one checks in the page...How will I get the IP address and OS of the person who visits the page(with PERL CGI) Clients can lie to your

Re: IP address and Browser version.

2004-11-19 Thread Chris Devers
On Fri, 19 Nov 2004 [EMAIL PROTECTED] wrote: I wanted to get the IP address and the OS of the system when some one checks in the page...How will I get the IP address and OS of the person who visits the page(with PERL CGI) As I was saying the last time you asked a version of this question

RE: IP address and Browser version.

2004-11-19 Thread Bob Showalter
[EMAIL PROTECTED] wrote: Hi I wanted to get the IP address and the OS of the system when some one checks in the page...How will I get the IP address and OS of the person who visits the page(with PERL CGI) Short answer: $ENV{REMOTE_ADDR} contains the client IP address $ENV

RE: IP address and Browser version.

2004-11-19 Thread Chris Devers
On Fri, 19 Nov 2004, Bob Showalter wrote: 1. The client IP address, which you can get by calling getpeername() on STDIN (or from REMOTE_ADDR environment variable). If the client is behind a proxy, you'd need to depend on the proxy adding something to the request headers. Moreover, nearly

Re: regexp for ip address

2004-11-13 Thread Ing. Branislav Gerzo
PS This isn't shorter, but it is easier to understand :-) PS /^(\d+)(??{ $1 0 $1 256 ? : (?!) }) \. PS(\d+)(??{ $2 0 $2 256 ? : (?!) }) \. PS(\d+)(??{ $3 0 $3 256 ? : (?!) }) \. PS(\d+)(??{ $4 0 $4 256 ? : (?!) }) PS $/x PS

Re: regexp for ip address

2004-11-13 Thread Peter Scott
In article [EMAIL PROTECTED], [EMAIL PROTECTED] (Ing. Branislav Gerzo) writes: PS This isn't shorter, but it is easier to understand :-) PS /^(\d+)(??{ $1 0 $1 256 ? : (?!) }) \. PS(\d+)(??{ $2 0 $2 256 ? : (?!) }) \. PS(\d+)(??{ $3 0 $3 256 ? : (?!)

Re: regexp for ip address

2004-11-12 Thread Chasecreek Systemhouse
while (TXT) { /^((2[0-5]{2}|1\d{2}|[1-9]\d|[1-9])\.((2[0-5]{2}|1\d{2}|[1-9]\d|\d)\.){2}(2[0-5]{2}|1\d{2}|[1-9]\d|\d))(\s*(port|:|\s|\/td\s*td[^]+)\s*)([2-9]\d|[1-9]\d{2,3}|[1-5]\d{4}|6[0-4]\d{3}|654\d{2}|655[0-2]\d|6553[0-5])$/g; ip = $1; port = $8; push(@ip,$ip,$port); #for

Re: regexp for ip address

2004-11-12 Thread Gunnar Hjalmarsson
Ing. Branislav Gerzo wrote: hm, quite huge regexp, hm ? I think I would have done it in more than one step. Leaving the ports aside, you could for instance start with extracting possible IP addresses with something like: /(\d{1,3}(?:\.\d{1,3}){3})/ Then you could have a function test the

Re: regexp for ip address

2004-11-12 Thread Ing. Branislav Gerzo
Chasecreek Systemhouse [CS], on Friday, November 12, 2004 at 03:18 (-0500) typed: CS For theose less inclined to work with such a R/E - CS This module accepts valid IP Addresses: CS http://search.cpan.org/~frajulac/Net-IPv4Addr-0.10/IPv4Addr.pm Ok, but I also wrote about IP:PORT, and at the

Re: regexp for ip address

2004-11-12 Thread Ing. Branislav Gerzo
Gunnar Hjalmarsson [GH], on Friday, November 12, 2004 at 09:23 (+0100) typed the following: GH I think I would have done it in more than one step. Leaving the ports GH aside, you could for instance start with extracting possible IP GH addresses with something like: GH

Re: regexp for ip address

2004-11-12 Thread Peter Scott
In article [EMAIL PROTECTED], [EMAIL PROTECTED] (Ing. Branislav Gerzo) writes: anyone knows how looks _good_ ip adress regexp ? I use something like: (\d{1,3}\.){3}\d{1,3} but that also matches for example 888.777.444.222, which is of course not good ip adress. I don't want use any module for

Re: regexp for ip address

2004-11-12 Thread Paul Johnson
On Fri, Nov 12, 2004 at 03:18:50PM -, Peter Scott wrote: In article [EMAIL PROTECTED], [EMAIL PROTECTED] (Ing. Branislav Gerzo) writes: anyone knows how looks _good_ ip adress regexp ? I use something like: (\d{1,3}\.){3}\d{1,3} but that also matches for example 888.777.444.222,

regexp for ip address

2004-11-11 Thread Ing. Branislav Gerzo
Hi all, anyone knows how looks _good_ ip adress regexp ? I use something like: (\d{1,3}\.){3}\d{1,3} but that also matches for example 888.777.444.222, which is of course not good ip adress. I don't want use any module for this, I only want fing proper regular expression for IPs. I thought

Re: regexp for ip address

2004-11-11 Thread Christopher Maujean
; # random and invalid my $bad_ip = 259.1000.345.701; for my $curr_ip (($ip, $bad_ip)) { if (ip_is_ipv4($curr_ip)) { print IP $curr_ip is GOOD\n; } else { print $curr_ip is not a valid IP address\n; } } # output: # IP 209.168.201.93 is GOOD

Re: regexp for ip address

2004-11-11 Thread Christopher Maujean
On Thu, 2004-11-11 at 15:44, Christopher Maujean wrote: On Thu, 2004-11-11 at 15:29, Ing. Branislav Gerzo wrote: Hi all, anyone knows how looks _good_ ip adress regexp ? I would skip re-inventing the wheel and use the Net::IP module. Example: didn't notice your requirement about not

Re: regexp for ip address

2004-11-11 Thread Gunnar Hjalmarsson
Ing. Branislav Gerzo wrote: anyone knows how looks _good_ ip adress regexp ? I use something like: (\d{1,3}\.){3}\d{1,3} but that also matches for example 888.777.444.222, which is of course not good ip adress. What's your definition of a good IP address? Do you care about correct DNS, do you

Re: regexp for ip address

2004-11-11 Thread Chasecreek Systemhouse
(\d{1,3}\.){3}\d{1,3} sub goodIP { gethostbyaddr pack('C4', split /\./, shift), 2 } print Good IP address\n if goodIP('11.22.33.44'); You'd better define good. I agree -- let's define it as a CIDR block: http://search.cpan.org/search?query=CIDRmode=all =) -- WC -Sx- Jones

Re: regexp for ip address

2004-11-11 Thread Ing. Branislav Gerzo
Gunnar Hjalmarsson [GH], on Friday, November 12, 2004 at 00:59 (+0100) contributed this to our collective wisdom: GH What's your definition of a good IP address? Do you care about correct GH DNS, do you care about whether the address is in use? I care about that, if its syntax is correct: 1

Re: regexp for ip address

2004-11-11 Thread Ajey Kulkarni
:59 (+0100) contributed this to our collective wisdom: GH What's your definition of a good IP address? Do you care about correct GH DNS, do you care about whether the address is in use? I care about that, if its syntax is correct: 1-255.0-255.0-255.0-255 GH To me, this test comes to mind

How to get browsers IP address?

2004-08-24 Thread Siegfried Heintze
How do I get the browser's IP address in a server side cgi perl script? The web server stores this information in an environment variable but I don't see a function to retrieve it in the 5.6.1 perldoc for cgi. Thanks, Siegfried

Re: How to get browsers IP address?

2004-08-24 Thread Chris Devers
On Tue, 24 Aug 2004, Siegfried Heintze wrote: How do I get the browser's IP address in a server side cgi perl script? It's in $ENV{'REMOTE_ADDR'}. Poke at your %ENV hash for other possibly useful values. -- Chris Devers [EMAIL PROTECTED] http://devers.homeip.net:8080/blog/ np: 'Charles

Re: Detecting the Country and other information of a IP address

2004-05-26 Thread John W. Krahn
Lrmk wrote: I want one of my scripts to process IP addreses and detect the country and other information like city, ISP, and the IP range which has the same attributes I tryied writing a script to post the IP address to regional network information center's web site's who is form

Detecting the Country and other information of a IP address

2004-05-25 Thread LRMK
I want one of my scripts to process IP addreses and detect the country and other information like city, ISP, and the IP range which has the same attributes I tryied writing a script to post the IP address to regional network information center's web site's who is form and then process

Change computername and IP address on WIN32

2003-11-24 Thread Ned Cunningham
Hello. I need to be able to rename a NT4 workstations computername and IP address remotely with Perl. Has any one a good starting point? Example scripts? Links? Thankx Ned Cunningham POS Systems Development Monro Muffler Brake 200 Holleder Parkway Rochester, NY 14615 (585) 647-6400 ext. 310

Re: finding out my IP address..

2003-10-31 Thread Harry Putnam
[EMAIL PROTECTED] writes: Hi, I'm trying to find my IP address from within Perl for eth0 and ppp0. Currently I run a regex on the output of ifconfig to extract his data - but, I'd like to do this from within Perl and it strikes me that this should be possible. HELP! ANYBODY! Well

Re: finding out my IP address..

2003-10-31 Thread Wiggins d'Anconia
Harry Putnam wrote: [EMAIL PROTECTED] writes: Hi, I'm trying to find my IP address from within Perl for eth0 and ppp0. Currently I run a regex on the output of ifconfig to extract his data - but, I'd like to do this from within Perl and it strikes me that this should be possible. HELP! ANYBODY

RE: finding out my IP address..

2003-10-30 Thread McMahon, Chris
on will probably have some other systemly way to find this information. -Chris -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 29, 2003 6:41 AM To: [EMAIL PROTECTED] Subject: finding out my IP address.. Hi, I'm trying to find my IP

finding out my IP address..

2003-10-29 Thread Kevin . Bewley
Hi, I'm trying to find my IP address from within Perl for eth0 and ppp0. Currently I run a regex on the output of ifconfig to extract his data - but, I'd like to do this from within Perl and it strikes me that this should be possible. HELP! ANYBODY! Kev -- To unsubscribe, e-mail: [EMAIL

Re: finding out my IP address..

2003-10-29 Thread Wiggins d Anconia
Hi, I'm trying to find my IP address from within Perl for eth0 and ppp0. Currently I run a regex on the output of ifconfig to extract his data - but, I'd like to do this from within Perl and it strikes me that this should be possible. HELP! ANYBODY! Well this module seems to do

Re: finding out my IP address..

2003-10-29 Thread Kevin . Bewley
Hi, I'm trying to find my IP address from within Perl for eth0 and ppp0. Currently I run a regex on the output of ifconfig to extract his data - but, I'd like to do this from within Perl and it strikes me that this should be possible. HELP! ANYBODY! Well this module seems to do what

Re: finding out my IP address..

2003-10-29 Thread Rob Dixon
Kevin Bewley I'm trying to find my IP address from within Perl for eth0 and ppp0. Currently I run a regex on the output of ifconfig to extract his data - but, I'd like to do this from within Perl and it strikes me that this should be possible. Hi Kevin. This is from perldoc -q IP

  1   2   3   >