Re: What is the HTTP REFERER story?

2002-10-07 Thread csaba . raduly


On 06/10/2002 23:19:46 perl-win32-users-admin wrote:

Some browsers do not send the referer header. This variable seems so
useful, I'm wondering why it is being left out. Is it an error? Is it

Some people consider REFERER a privacy leak (and have written browsers
which don't send it by design !)
If the browser doesn't send HTTP_REFERER, there's little the server can
do (apart from refusing to serve up the page).

--
Csaba Ráduly, Software Engineer   Sophos Anti-Virus
email: [EMAIL PROTECTED]http://www.sophos.com
US Support: +1 888 SOPHOS 9 UK Support: +44 1235 559933

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



Connecting/Parsing Files On A Unix Machine - NEWBIE

2002-10-07 Thread Barlow, Neil

Hi All,

I was hoping that someone could send me in the right direction as to the
resources that I need to complete this task - I REALLY REALLY APPRECITATE
YOUR HELP!!! I ahave been reading away at Programming Perl/Perl Cookbook to
no avail.

I have a script which will be launched from a Win32 Machine - the problem is
that I have to connect to a Unix box which contains a directory of different
files which I have to process.

I am unable to work out how to connect to the Unix box and parse the
directory - can anyone advise on the way to go???

I have been reading up on IO::Socket - I think that this is what I should be
doing?

Again, I really appreciate your input..



Neil Barlow

Network Analyst
Global Infrastructure SRS
Ireland Computing
Intel Ireland 

Phone: +353-1-6066889 Or #6889 
iNet: 8-606-6889
Loc: IR5-1-C4
Email: [EMAIL PROTECTED] 


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



Re: Connecting/Parsing Files On A Unix Machine - NEWBIE

2002-10-07 Thread Trevor Joerges

Net::FTP is probably what you want. Or depending on what you want to do with
the files Net::Telnet might be useful.

Hope this helps.

Kind regards,
Trevor J. Joerges

$_=q;rrUSFWPSZK.ZKPFSHFT,rkvtuZbopuifsZQZibdl
rrqpxfsfeZcyZQ,,riuuq://xxx.%.dpn,ru~@%.dpn ,rrr8-)
;;s;\~;kpfshft;g;s;\%;tfoenjnf;g;y;B-x;A-w;;
s;P;perl;g;s;,;\n;g;s;Y; ;g;s;q;\t;g;print;


- Original Message -
From: Barlow, Neil [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, October 07, 2002 7:34 AM
Subject: Connecting/Parsing Files On A Unix Machine - NEWBIE


| Hi All,
|
| I was hoping that someone could send me in the right direction as to the
| resources that I need to complete this task - I REALLY REALLY APPRECITATE
| YOUR HELP!!! I ahave been reading away at Programming Perl/Perl Cookbook
to
| no avail.
|
| I have a script which will be launched from a Win32 Machine - the problem
is
| that I have to connect to a Unix box which contains a directory of
different
| files which I have to process.
|
| I am unable to work out how to connect to the Unix box and parse the
| directory - can anyone advise on the way to go???
|
| I have been reading up on IO::Socket - I think that this is what I should
be
| doing?
|
| Again, I really appreciate your input..
|
|
| 
| Neil Barlow
|
| Network Analyst
| Global Infrastructure SRS
| Ireland Computing
| Intel Ireland
|
| Phone: +353-1-6066889 Or #6889
| iNet: 8-606-6889
| Loc: IR5-1-C4
| Email: [EMAIL PROTECTED]
| 
|
| ___
| Perl-Win32-Users mailing list
| [EMAIL PROTECTED]
| To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
|


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



Re: Connecting/Parsing Files On A Unix Machine - NEWBIE

2002-10-07 Thread Johan Lindstrom

At 12:34 2002-10-07 +0100, Barlow, Neil wrote:
I have a script which will be launched from a Win32 Machine - the problem is
that I have to connect to a Unix box which contains a directory of different
files which I have to process.

I am unable to work out how to connect to the Unix box and parse the
directory - can anyone advise on the way to go???

Either you a) run something on the Unix box, or you b) fetch the files and 
process them on the Windows box. I'd try to get it to work using a) if 
possible, but b) is good too if the file transfer isn't a problem wrt size 
and speed.

So, how to fetch the files? FTP is one option (existing protocols are good, 
don't invent your own). (If you need a secure connection take a look at SCP).

In Perl that means Net::FTP which is included in the libnet module. This is 
how to use it:
http://search.cpan.org/author/GBARR/libnet-1.12/Net/FTP.pm

This is how to install it:
C:\ ppm install libnet
should work if it's not already included in the ActiveState distribution.


/J

 --  --- -- --  --  -- -  - -
Johan LindströmSourcerer @ Boss Casinos [EMAIL PROTECTED]

Latest bookmark: Ramdisk - CENATEK
http://www.cenatek.com/product_ramdisk.cfm
dmoz (1 of 3): /Computers/Hardware/Storage/Hard_Drives/ 56


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



Check existence of registry key - not working

2002-10-07 Thread Michele Knight

I am trying to just check and see if a certain registry key exist.  What I
currently have will print even if the registry key does not exist.  How can
I correct this.  Here is what I have:

strict;
use Win32;
use Win32::Registry;

# declare variables
my (
  $regkey,
  $regobject,
  %regvals,
);





# SUBROUTINES:
# 

sub CheckForRegistryKey
{
  my($file) = @_;
  $file1 = $ENV{WINDIR} . \\system32\\msxml3.dll;
  $file2 = $ENV{WINDIR} . \\system32\\msxml3a.dll;
  $file3 = $ENV{WINDIR} . \\system32\\msxml3r.dll;

  # check the registry to see if the registry key exist

  $regkey =
Software\\Microsoft\\Installer\\Products\\544ADF5B4CAC6AB48ABF7A12B24D93ED
;

  if ($main::HKEY_CURRENT_USER-Open($regkey, $regobject))
  {
$regobject-GetValues(\%regvals);

$envVar = ProductName;

if($regvals{$envVar}-[2] == Microsoft SML Parser)
{
 #print Registry Value :  . $regvals{$envVar}[2] . \n;
}
  }
}

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



RE: Win32::NetAdmin - GetUsers...Why so slow?

2002-10-07 Thread Shaun Wallace

The other strategy that may speed up your script is to loop through the user
list once and store the results in a hash (key=user, value=scriptpath)
rather than looping through the user list for each script path.  Then you
can loop through the hash which is already in local memory.

Thanks,
Shaun


-Original Message-
From: Kirk W. Batzer [mailto:[EMAIL PROTECTED]] 
Sent: Saturday, October 05, 2002 10:50 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: Win32::NetAdmin - GetUsers...Why so slow?


Dave,

I can remember a similar problem where I was getting user attributes for
over 15,000 domain users.  The process took over 8 hours going against the
PDC.  When I changed the call to query a local BDC the time was reduced to
less than 3 hours.

Try querying a local domain controller.  Chances are there will be fewer
network hops and higher network bandwidth between your PC and the BCD.

Network latency can have a huge time impact when querying for domain user
attributes.


Kirk



 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]] On Behalf Of 
 Dave Neese
 Sent: Saturday, October 05, 2002 9:37 AM
 To: [EMAIL PROTECTED]
 Subject: Win32::NetAdmin - GetUsers...Why so slow?



 Hi All,

 The following code snippet is being run against an NT Domain with 
 roughly 8000 users. How come it takes over an hour to complete? Is 
 there a more efficient way I am overlooking?

 Thanks,
 Dave



 !perl -w
 # Script to get user login scripts.

 use strict;
 use Win32::NetAdmin qw(GetUsers);

 my $Server = pdc;
 my $Group = Domain Users;
 my %Attribs;
 my $Attribs;

 my $dataFile = D:/bin/logonscripts/phase3_users.csv;


 getdata;

 #
 --
 
 ---

 sub getdata {

 print Getting users\n;

 my @Scripts = (
   logon1.cmd,
   logon2.cmd,
   logon3.cmd,
   logon4.cmd,
   logon5.cmd
   );

 open FH, $dataFile or die $!;

 for (@Scripts) {

   my $Script = $_;

   print Working on $Script\n;

   my $User;
   my @List;

   if (GetUsers ( $Server, FILTER_NORMAL_ACCOUNT, \@List )) {

   foreach $User ( @List ) {
   my %Attribs;


 Win32::AdminMisc::UserGetMiscAttributes( $Server, $User, \%Attribs);
   if ( $Attribs{USER_SCRIPT_PATH}=~($Script)) {
   print $User,$Script\n;

   print FH \$User\;
   print FH ,;
   print FH \$Script\;
   print FH \n;
   }
   }
   }

   }

 print Finished getting data\n;

 close FH;
 }

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



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

---
CONFIDENTIAL  PRIVILEGED


Unless otherwise indicated or obvious from the nature of the following communication, 
the information contained herein is attorney-client privileged and confidential 
information/work product. The communication is intended for the use of the individual 
or entity named above.


 If the reader of this transmission is not the intended recipient, you are hereby 
notified that any dissemination, distribution or copying of this communication is 
strictly prohibited.  If you have received this communication in error or are not sure 
whether it is privileged, please immediately notify us by return e-mail and destroy 
any copies, electronic, paper or otherwise, which you may have of this communication.


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



Re: Check existence of registry key - not working

2002-10-07 Thread Tim . Moose

Change

if($regvals{$envVar}-[2] == Microsoft SML Parser)

to

if($regvals{$envVar}-[2] eq Microsoft SML Parser)

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



RE: Check existence of registry key - not working

2002-10-07 Thread Michele Knight

OoopsI missed that small error.  Thanks so much.  It's working fine now.

Michele

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of
[EMAIL PROTECTED]
Sent: Monday, October 07, 2002 10:12 AM
To: [EMAIL PROTECTED]
Subject: Re: Check existence of registry key - not working


Change

if($regvals{$envVar}-[2] == Microsoft SML Parser)

to

if($regvals{$envVar}-[2] eq Microsoft SML Parser)

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



Whats wrong with this??

2002-10-07 Thread Krishna, Hari

Hi friends,

I know this is off the list,  but I am pretty sure that some of you might
figure it out and give me some clues as what am I doing wrong.
I get the eror ksh: send_email: cannot execute
sendmail is in /usr/sbin
I changed the first line to reflect that, but still I get the error.


-

#!/usr/bin
ID=1600TEST_SQL_as_an_attachment
ATTACH=Y
R1=[EMAIL PROTECTED]
FILEPATH=/home/mj80380/hari.txt
S=TEST SQL as an attachment
ALL=[EMAIL PROTECTED]

NEWFILE='/home/mj80380/rik.txt'
echo From: HARI $NEWFILE
echo To: $ALL $NEWFILE
echo Subject: $S $NEWFILE
echo MIME-Version: 1.0 $NEWFILE
echo 'Content-Type: Multipart/Mixed; boundary=~-~-~-~-~' $NEWFILE
echo  $NEWFILE
echo --~-~-~-~-~ $NEWFILE
echo Content-type: Application/text; name=$FILEPATH $NEWFILE
echo Content-disposition: attachment; filename=`basename $FILEPATH`
$NEWFILE
FILE
echo  $NEWFILE
cat $FILEPATH $NEWFILE
sendmail  -t $NEWFILE
rm $NEWFILE
rm $FILEPATH

---
appreciate your help.

Thanks,
Hari..

CONFIDENTIALITY NOTICE:
This e-mail message, including all attachments, is for the sole use of the
intended recipient(s) and may contain confidential and privileged
information. You may NOT use, disclose, copy or disseminate this
information.  If you are not the intended recipient, please contact the
sender by reply e-mail immediately.  Please destroy all copies of the
original message and all attachments. Your cooperation is greatly
appreciated. 
Columbus Regional Hospital
2400 East 17th Street 
Columbus, Indiana 47201
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



Re: Whats wrong with this??

2002-10-07 Thread Jim Sander

Right off the bat, does the calling user have 'x' and 'r' permission to the
script?

On Mon, 7 Oct 2002 10:38:32 -0500 Krishna, Hari [EMAIL PROTECTED] wrote:

 Hi friends,
 
 I know this is off the list,  but I am pretty
 sure that some of you might
 figure it out and give me some clues as what am
 I doing wrong.
 I get the eror ksh: send_email: cannot
 execute
 sendmail is in /usr/sbin
 I changed the first line to reflect that, but
 still I get the error.
 
 
 -
 
 #!/usr/bin
 ID=1600TEST_SQL_as_an_attachment
 ATTACH=Y
 R1=[EMAIL PROTECTED]
 FILEPATH=/home/mj80380/hari.txt
 S=TEST SQL as an attachment
 ALL=[EMAIL PROTECTED]
 
 NEWFILE='/home/mj80380/rik.txt'
 echo From: HARI $NEWFILE
 echo To: $ALL $NEWFILE
 echo Subject: $S $NEWFILE
 echo MIME-Version: 1.0 $NEWFILE
 echo 'Content-Type: Multipart/Mixed;
 boundary=~-~-~-~-~' $NEWFILE
 echo  $NEWFILE
 echo --~-~-~-~-~ $NEWFILE
 echo Content-type: Application/text;
 name=$FILEPATH $NEWFILE
 echo Content-disposition: attachment;
 filename=`basename $FILEPATH`
 $NEWFILE
 FILE
 echo  $NEWFILE
 cat $FILEPATH $NEWFILE
 sendmail  -t 

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



RE: Whats wrong with this??

2002-10-07 Thread Krishna, Hari

I created the script and I am trying to execute the script. So I have the
rwx permissions on the script.
I did chmod 700 *.

-Original Message-
From: Jim Sander [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 07, 2002 10:46 AM
To: Krishna, Hari
Cc: [EMAIL PROTECTED]
Subject: Re: Whats wrong with this??


Right off the bat, does the calling user have 'x' and 'r' permission to the
script?

On Mon, 7 Oct 2002 10:38:32 -0500 Krishna, Hari [EMAIL PROTECTED] wrote:

 Hi friends,
 
 I know this is off the list,  but I am pretty
 sure that some of you might
 figure it out and give me some clues as what am
 I doing wrong.
 I get the eror ksh: send_email: cannot
 execute
 sendmail is in /usr/sbin
 I changed the first line to reflect that, but
 still I get the error.
 


 -
 
 #!/usr/bin
 ID=1600TEST_SQL_as_an_attachment
 ATTACH=Y
 R1=[EMAIL PROTECTED]
 FILEPATH=/home/mj80380/hari.txt
 S=TEST SQL as an attachment
 ALL=[EMAIL PROTECTED]
 
 NEWFILE='/home/mj80380/rik.txt'
 echo From: HARI $NEWFILE
 echo To: $ALL $NEWFILE
 echo Subject: $S $NEWFILE
 echo MIME-Version: 1.0 $NEWFILE
 echo 'Content-Type: Multipart/Mixed;
 boundary=~-~-~-~-~' $NEWFILE
 echo  $NEWFILE
 echo --~-~-~-~-~ $NEWFILE
 echo Content-type: Application/text;
 name=$FILEPATH $NEWFILE
 echo Content-disposition: attachment;
 filename=`basename $FILEPATH`
 $NEWFILE
 FILE
 echo  $NEWFILE
 cat $FILEPATH $NEWFILE
 sendmail  -t 

CONFIDENTIALITY NOTICE:
This e-mail message, including all attachments, is for the sole use of the
intended recipient(s) and may contain confidential and privileged
information. You may NOT use, disclose, copy or disseminate this
information.  If you are not the intended recipient, please contact the
sender by reply e-mail immediately.  Please destroy all copies of the
original message and all attachments. Your cooperation is greatly
appreciated. 
Columbus Regional Hospital
2400 East 17th Street 
Columbus, Indiana 47201
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



RE: Perl date and time

2002-10-07 Thread JGONCALV


Hi, i have this script to know what files have been last modified since a
hour:
my $pathname=d:/perlide;

my @files = grep time - (lstat)[9]  3600, $pathname/*.*;
foreach(@files)
{
  print $_\n;
   
}

It works but now I wanted to know all files that are last modified since a
date and a time that i could specify like for exemple since 2/10/2002.
How can i do this in Perl?
Thanks. 
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



RE: Whats wrong with this??

2002-10-07 Thread Fay Jason-W13246

Try running it with a ./send_email or a . send_email.  You didn't specify what 
platform or shell you are trying to run this in.  AIX, Solaris, Red Hat; bash, csh, 
ksh? 

Regards,

Jason Fay

-Original Message-
From: Krishna, Hari [mailto:[EMAIL PROTECTED]] 
Sent: Monday, October 07, 2002 10:39 AM
To: [EMAIL PROTECTED]
Subject: Whats wrong with this??

Hi friends,

I know this is off the list,  but I am pretty sure that some of you might
figure it out and give me some clues as what am I doing wrong.
I get the eror ksh: send_email: cannot execute
sendmail is in /usr/sbin
I changed the first line to reflect that, but still I get the error.


-

#!/usr/bin
ID=1600TEST_SQL_as_an_attachment
ATTACH=Y
R1=[EMAIL PROTECTED]
FILEPATH=/home/mj80380/hari.txt
S=TEST SQL as an attachment
ALL=[EMAIL PROTECTED]

NEWFILE='/home/mj80380/rik.txt'
echo From: HARI $NEWFILE
echo To: $ALL $NEWFILE
echo Subject: $S $NEWFILE
echo MIME-Version: 1.0 $NEWFILE
echo 'Content-Type: Multipart/Mixed; boundary=~-~-~-~-~' $NEWFILE
echo  $NEWFILE
echo --~-~-~-~-~ $NEWFILE
echo Content-type: Application/text; name=$FILEPATH $NEWFILE
echo Content-disposition: attachment; filename=`basename $FILEPATH`
$NEWFILE
FILE
echo  $NEWFILE
cat $FILEPATH $NEWFILE
sendmail  -t $NEWFILE
rm $NEWFILE
rm $FILEPATH

---
appreciate your help.

Thanks,
Hari..

CONFIDENTIALITY NOTICE:
This e-mail message, including all attachments, is for the sole use of the
intended recipient(s) and may contain confidential and privileged
information. You may NOT use, disclose, copy or disseminate this
information.  If you are not the intended recipient, please contact the
sender by reply e-mail immediately.  Please destroy all copies of the
original message and all attachments. Your cooperation is greatly
appreciated. 
Columbus Regional Hospital
2400 East 17th Street 
Columbus, Indiana 47201
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs