Re: Need advice on obtaining MAC addresses...

2003-08-21 Thread Stephen Patterson
On 20 Aug 03, Todd Morrison ([EMAIL PROTECTED]) wrote:
> Is there a way to capture a user's MAC address when a user visits a web 
> page? Can this info be captured through the use of $ENV{'HTTP_USER_AGENT'} 
> or perhaps a Net module?

An ARP request targerted at the source ip *should* do it (or at least
reveal the user's firewall address), the Net::ARPing and
NetPacket::ARP modules look like they'l help.

-- 
Stephen Patterson http://www.lexx.uklinux.net http://patter.mine.nu
[EMAIL PROTECTED]  remove SPAM to reply
Linux Counter No: 142831 GPG Public key: 252B8B37
Last one down the pub's an MCSE
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: Need advice on obtaining MAC addresses...

2003-08-21 Thread Carl Jolley
On Wed, 20 Aug 2003, Todd Morrison wrote:

> Hello,
>
> Is there a way to capture a user's MAC address when a user visits a web
> page? Can this info be captured through the use of $ENV{'HTTP_USER_AGENT'}
> or perhaps a Net module?
>
> Any help/suggestions would be greatly appreciated. I am still a bit of a
> Perl greenhorn, so go easy on me! ;)
>

Off hand I don't know of any way using the environment of a web
server to capture the user's MAC address. The HTTP_USER_AGENT
just identifies the browser that the user was using. If you
are trying to verify the identity of a particular user then
the appropriate way with a web server is to require the user
to enter a password and do basic authenication. Note they will
only have to enter the password the first time they access the
page in their current browser session.

 [EMAIL PROTECTED] 
 All opinions are my own and not necessarily those of my employer 

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Need advice on obtaining MAC addresses...

2003-08-20 Thread Todd Morrison
Hello,

Is there a way to capture a user's MAC address when a user visits a web 
page? Can this info be captured through the use of $ENV{'HTTP_USER_AGENT'} 
or perhaps a Net module?

Any help/suggestions would be greatly appreciated. I am still a bit of a 
Perl greenhorn, so go easy on me! ;)

Thanks,

Todd

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: need advice

2001-05-28 Thread David Johnson

Well, I got away with it by simply forking off the subroutine that
handles the transfer and file write.  Everything works, except for when
I try to exit the program, it locks.  Here's the code:

if (($pid = fork) == 0) {
&forkProc(\$ftp); # passes a ref to the ftp obj to do transfer
exit;
}

The routine containing this code does exit.  Other interesting tidbits:
I can do the transfer again, successfully, without it locking up.  I can
enter my configuration info (another subroutine).  Do I need to clean up
the forked process somehow?  Sorry for the dumb questions.

Andy Jennings wrote:
> 
> David
> 
> You could certainly fork off the transfer process which reads the data. You
> will then need an open pipe between the parent and child so the child can
> pass back the number of bytes read and any other info, so that you can
> update the progress bar in the parent. If the user hits 'cancel' then kill
> the child pid from the parent - if it still exists.
> 
> Something along these lines...:-
> 
> pipe(READER,WRITER) or die "Can't open pipe: $!\n";
> 
> if (fork == 0) { # child writes to WRITER
>   close READER;
>   select WRITER; $| = 1;
>   #do child stuff here - get data and send progress to WRITER
>   close WRITER;
>   exit 0;
> }
> 
> # parent process closes WRITER and reads from READER
> close WRITER;
> #get data from   and update progress bar;
> 
> This type of code works fine in a finite program but if the GUI is going to
> stay open and another transfer may be attempted, then there are probably
> other file handle clean-up issues that will need addressing, but at least
> you should be going in the right direction.
> 
> hth
> 
> Andy
> 
> - Original Message -
> From: "David Johnson" <[EMAIL PROTECTED]>
> To: "Perl Users" <[EMAIL PROTECTED]>
> Sent: Saturday, May 26, 2001 8:17 PM
> Subject: need advice
> 
> > I've developed a small, configurable file transfer program using
> > Net::FTP.  I have one problem that I'm looking for advice on how to
> > fix.  In a nutshell, this is the problem: I use Net::FTP's method retr()
> > to get a dataconn obj so that I can count up how many bytes I've
> > gotten.  Unfortunately, I am using a while loop to read() the data from
> > the remote box.  This locks up the window (in which I am displaying
> > progress bar, etc; I'm using Win32::GUI).  Is there some way I can fork
> > this process off, or at least unlock the window so that the user can
> > abort the transfer?  I can't think of any solutions (but this is my
> > first time doing windows programming with perl).  Thanks for your input.
> >
> > david johnson
> > ___
> > Perl-Win32-Users mailing list
> > [EMAIL PROTECTED]
> > http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
> >
> >
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users



Fw: need advice

2001-05-28 Thread Andy Jennings



> David
>
> You could certainly fork off the transfer process which reads the data.
You
> will then need an open pipe between the parent and child so the child can
> pass back the number of bytes read and any other info, so that you can
> update the progress bar in the parent. If the user hits 'cancel' then kill
> the child pid from the parent - if it still exists.
>
> Something along these lines...:-
>
> pipe(READER,WRITER) or die "Can't open pipe: $!\n";
>
> if (fork == 0) { # child writes to WRITER
>   close READER;
>   select WRITER; $| = 1;
>   #do child stuff here - get data and send progress to WRITER
>   close WRITER;
>   exit 0;
> }
>
> # parent process closes WRITER and reads from READER
> close WRITER;
> #get data from   and update progress bar;
>
> This type of code works fine in a finite program but if the GUI is going
to
> stay open and another transfer may be attempted, then there are probably
> other file handle clean-up issues that will need addressing, but at least
> you should be going in the right direction.
>
> hth
>
> Andy
>
>
> - Original Message -
> From: "David Johnson" <[EMAIL PROTECTED]>
> To: "Perl Users" <[EMAIL PROTECTED]>
> Sent: Saturday, May 26, 2001 8:17 PM
> Subject: need advice
>
>
> > I've developed a small, configurable file transfer program using
> > Net::FTP.  I have one problem that I'm looking for advice on how to
> > fix.  In a nutshell, this is the problem: I use Net::FTP's method retr()
> > to get a dataconn obj so that I can count up how many bytes I've
> > gotten.  Unfortunately, I am using a while loop to read() the data from
> > the remote box.  This locks up the window (in which I am displaying
> > progress bar, etc; I'm using Win32::GUI).  Is there some way I can fork
> > this process off, or at least unlock the window so that the user can
> > abort the transfer?  I can't think of any solutions (but this is my
> > first time doing windows programming with perl).  Thanks for your input.
> >
> > david johnson
> > ___
> > Perl-Win32-Users mailing list
> > [EMAIL PROTECTED]
> > http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
> >
> >
>

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users



Re: need advice

2001-05-28 Thread Andy Jennings

David

You could certainly fork off the transfer process which reads the data. You
will then need an open pipe between the parent and child so the child can
pass back the number of bytes read and any other info, so that you can
update the progress bar in the parent. If the user hits 'cancel' then kill
the child pid from the parent - if it still exists.

Something along these lines...:-

pipe(READER,WRITER) or die "Can't open pipe: $!\n";

if (fork == 0) { # child writes to WRITER
  close READER;
  select WRITER; $| = 1;
  #do child stuff here - get data and send progress to WRITER
  close WRITER;
  exit 0;
}

# parent process closes WRITER and reads from READER
close WRITER;
#get data from   and update progress bar;

This type of code works fine in a finite program but if the GUI is going to
stay open and another transfer may be attempted, then there are probably
other file handle clean-up issues that will need addressing, but at least
you should be going in the right direction.

hth

Andy


- Original Message -
From: "David Johnson" <[EMAIL PROTECTED]>
To: "Perl Users" <[EMAIL PROTECTED]>
Sent: Saturday, May 26, 2001 8:17 PM
Subject: need advice


> I've developed a small, configurable file transfer program using
> Net::FTP.  I have one problem that I'm looking for advice on how to
> fix.  In a nutshell, this is the problem: I use Net::FTP's method retr()
> to get a dataconn obj so that I can count up how many bytes I've
> gotten.  Unfortunately, I am using a while loop to read() the data from
> the remote box.  This locks up the window (in which I am displaying
> progress bar, etc; I'm using Win32::GUI).  Is there some way I can fork
> this process off, or at least unlock the window so that the user can
> abort the transfer?  I can't think of any solutions (but this is my
> first time doing windows programming with perl).  Thanks for your input.
>
> david johnson
> ___
> Perl-Win32-Users mailing list
> [EMAIL PROTECTED]
> http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
>
>


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users