Re: C#, Perl and COM objects (PerlNET / Win32::OLE)

2015-10-23 Thread sisyphus1
From: Miriam Heinz
Sent: Friday, October 23, 2015 8:51 AM
To: perl-win32-users@listserv.ActiveState.com
Subject: C#, Perl and COM objects (PerlNET / Win32::OLE)

> I would greatly appreciate any help - or advise on where to look further.

Hi Miriam,

This is a very inactive list, and you may well get no helpful response to 
your request.
That being the case, I would suggest posting to perlmonks ( 
http://www.perlmonks.org/?node=Seekers%20of%20Perl%20Wisdom ).
Another option might be a post to stackoverflow 
http://stackoverflow.com/)  - which is a forum I haven't tried, but one that 
seems to be fairly well attended.

Cheers,
Rob


___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: PAR failure

2014-11-14 Thread sisyphus1
-Original Message- 
From: John
Sent: Thursday, November 13, 2014 1:25 PM
To: pw32-users
Subject: PAR failure

 Attempt to reload Config.pm aborted.

I've not struck this error before.
If you google that error message you'll get a few hits. Do any of them help 
you at all ?

Is your Config.pm normally loadable ? For example, do the following work 
without error:

perl -MConfig -e 1
perl -MConfig -e use Config;

Both of those commands should produce no output at all.

To reach a broader range of perl programmers I suggest you post to (eg) 
perlmonks.

Cheers,
Rob 

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: SFTP

2014-10-27 Thread sisyphus1

From: Schwartz, Peter W
Sent: Tuesday, October 28, 2014 2:44 AM
To: perl-win32-users@listserv.ActiveState.com
Subject: SFTP

 I’m trying to locate an SFTP install for Windows (32-bit) but I can’t seem 
 to find anything in the PPM for some reason.  Does anyone have any 
 recommendations on how to get this for Windows?

You can do SFTP with Net::SSH2 - which is now part of Strawberry Perl.
Or, if you don't have Net::SSH2 you can:
ppm install http://www.sisyphusion.tk/ppm/Net-SSH2.ppd --force

However, the Net::SSH2 user interface is a bit awkward, so the nicest way to 
utilise that module (and this is how I use it) is to then:

ppm install http://www.sisyphusion.tk/ppm/Net-SFTP-Foreign.ppd --force
ppm install 
http://www.sisyphusion.tk/ppm/Net-SFTP-Foreign-Backend-Net_SSH2.ppd --force

(Those last 2 are pure-perl and just as simple to install using 'cpan -i' or 
similar, if you want. The reason we use --force is explained at
http://www.sisyphusion.tk/faq.html )

That done, it's just a matter of something like:

#
use strict;
use warnings;
use Net::SFTP::Foreign;

$ftp = Net::SFTP::Foreign-new
  (host = $server,
   backend = 'Net_SSH2',
   user = $user,
   password = $pass,
   );
$ftp-error and die Unable to establish SFTP connection: . $ftp-error;
print Connected to the SFTP server (and authorised)\n;

$ftp-put($local_file, $remote_file) or die $ftp-error;
$ftp-get($rem_file, $loc_file) or die $ftp-error;

$ftp-disconnect;

#

Works well for me.

Cheers,
Rob

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: trouble doing regex in file containing both ascii and binary content

2014-02-15 Thread sisyphus1
Hi Greg,

This list is all but dead – it may be that you and me are the only people 
receiving mail from it.
Much better, IMO, to post these types of questions to perlmonks.

Anyway ... this might help:

#
use strict;
use warnings;

my $str = \x1F\x8B\x08;

print String contains: $str\n;

open WR, '', 'file.bin' or die $!;
binmode WR;
print WR $str;
close WR or die $!;

undef $/;

open RD, '', 'file.bin' or die $!;
binmode RD;
my $contents = RD;
close RD or die $!;

if($contents =~ /$str/){print ok 1\n}

# To safeguard against presence of
# metacharacters in $str:

if($contents =~ /\Q$str\E/){print ok 2\n}
##

Cheers,
Rob

From: Greg VisionInfosoft 
Sent: Saturday, February 15, 2014 9:41 AM
To: Perl-Win32-Users@listserv.ActiveState.com 
Subject: trouble doing regex in file containing both ascii and binary content
i cant figure out what im doing wrong here. 
i ran wireshark to monitor a small http client/server query/response.
point of exercise is to see exactly what an ajax response looks like (as im 
trying to learn ajax).

unfortunately, the ajax response is sent from server in 'gzip' format (not 
plain text).

so wireshark shows two standard http headers and at the end of the stream is 
the binary 'gzipped' small stream.

ive saved this wireshark tcp 'stream' to a file.  viewing the file in hex mode, 
i see clearly the first three binary bytes of the gzipped stream are hex1F 
hex8B hex08

what i need to do next is save just the binary gzipped stream to a stand alone 
file, then see if i can un-gzip it to read the plain text contents.

in theory, a straight forward task.

i write a quick few line perl script, whereby i open the saved wireshark tcp 
stream file, set this input file to binary mode (so as to not change any 
internal binary byte values), undefine the input line seperator (to upserp the 
entire file into memory when read), read the file to upserp its contents into a 
var, do a simple pattern match of \x1F\x8B\x08, then save the matched pattern 
$ and what follows the match $' to a new file... (right now the script doesnt 
actually yet output to a file, it just dumps to screen)

for reasons that elude me, the pattern match fails.

i know the 3 bytes are in the file, yet the pattern match to those 3 bytes 
fails.

any ideas?

heres the small script.

open(IN, $ARGV[0]) || die cant open input file;
binmode(IN);

undef $/;

my $data = IN;

if ($data =~ /\x1F\x8B\x08/) {
  print matched:  . $ . $';
} else {
  print no match\n;
}


the contents of the wireshark stream is as follows...


POST /ajax/demo_post.asp HTTP/1.1
Host: www.w3schools.com

Connection: keep-alive

Content-Length: 0

User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like 
Gecko) Chrome/32.0.1700.107 Safari/537.36

Origin: http://www.w3schools.com

Accept: */*

Referer: http://www.w3schools.com/ajax/tryajax_post.htm

Accept-Encoding: gzip,deflate,sdch

Accept-Language: en-US,en;q=0.8

Cookie: ASPSESSIONIDAASDBBTC=BFEPJKCDLGDHEEOJIKANOEHP



HTTP/1.1 200 OK
Cache-Control: private,public

Content-Type: text/html

Content-Encoding: gzip

Vary: Accept-Encoding

Server: Microsoft-IIS/7.5

X-Powered-By: ASP.NET

Date: Fri, 14 Feb 2014 21:03:48 GMT

Content-Length: 201


.`.I.%/m.{.J.J..t...`.$..@.iG#).*..eVe]f.@..{{;.N'...?\fd.l..J...!?~|.?...V.6_..U..u...y...t./_.I.y;.f..wWG.qBo..
..Q.www.~..h.../..h.c...


note; the binary data at end is obviously not easily discerned here in ascii 
mode.  when i open this same file in a binary editor the actual binary contents 
(displayed in hex) is as follows... (ive inserted an extra space to make the 
hex values be easily discerned).

1f 8b 08 00 00 00 00 00 04 00 ed bd 07 60 1c 49 96 25 26 2f 6d ca 7b 7f 4a f5 
4a d7 e0 74 a1 08 80 60 13 24 d8 90 40 10 ec c1 88 cd e6 92 ec 1d 69 47 23 29 
ab 2a 81 ca 65 56 65 5d 66 16 40 cc ed 9d bc f7 de 7b ef bd f7 de 7b ef bd f7 
ba 3b 9d 4e 27 f7 df ff 3f 5c 66 64 01 6c f6 ce 4a da c9 9e 21 80 aa c8 1f 3f 
7e 7c 1f 3f 22 1e af 8e de cc 8b 26 9d 56 cb 36 5f b6 e9 55 d6 a4 75 fe 8b d6 
79 d3 e6 b3 74 dd 14 cb 8b b4 9d e7 e9 cb 2f 5f bf 49 17 79 3b af 66 e3 c7 77 
57 47 bf 71 42 6f be b2 0d b3 f6 51 ba 77 77 77 ff ee de ce ee 7e ba ff 68 e7 
de a3 fd 87 e9 cb 2f d0 f4 ff 01 a8 9f 68 15 63 00 00 00





___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: perl to web-scrape an html page that requires 'Javascript' to fullyrender

2013-02-15 Thread sisyphus1
Hi Greg,

This is one of the many things that I don’t know much about.
My first thought was WWW::Mechanize might be the way to go, but I found this in 
the WWW::Mechanize documentation:

[quote]
Please note that Mech does NOT support JavaScript, you need additional
software for that. Please check JavaScript in WWW::Mechanize::FAQ for
more.
[end quote]

(“Mech” is just an abbreviation for “WWW::Mechanize”.)

Probably a good idea for you to peruse that FAQ:
http://search.cpan.org/~jesse/WWW-Mechanize-1.72/lib/WWW/Mechanize/FAQ.pod

In there, I found losts of stuff including:

[quote]
Which modules work like Mechanize and have JavaScript support?
  In no particular order: Gtk2::WebKit::Mechanize, Win32::IE::Mechanize,
  WWW::Mechanize::Firefox, WWW::Scripter, WWW::Selenium
[end quote]

For 32-bit perls, I provide ppm packages for Gtk2::WebKit (and dependencies). 
Gtk2::WebKit::Mechanize is pure perl, and would (presumably) be installable 
with:

cpan –i Gtk2::WebKIt::Mechanize

once Gtk2::WebKit and dependencies have been installed.

However, for 64-bit perls I don’t yet have ppm packages for Gtk2::WebKit. I 
think it’s some problem I had in obtaining a 64-bit webkit library.
For 64-bit 5.16.x perl, ActiveState provide ppm packages for both WWW::Scripter 
and WWW::Selenium – so that might be your best bet for x64 perl-5.16.0.
On 64-bit Strawberry ‘cpan -i Win32::IE::Mechanize’ hanged during ‘dmake test’, 
but it might be serviceable if you download the source, unpack it, then install 
manually with ‘perl Makefile.PL’, ‘dmake test’, ‘dmake install’.

Hope there’s something there that helps.

You might also try perlmonks, where you’ll possibly encounter more people who 
have faced (and, hopefully, solved) the same problem on Windows.
They’re a bit finicky over there, however, and don’t respond all that well to 
requests for help if no code attempts are provided.

Cheers,
Rob

From: Greg Aiken 
Sent: Friday, February 15, 2013 11:36 AM
To: Perl-Win32-Users@listserv.ActiveState.com 
Subject: perl to web-scrape an html page that requires 'Javascript' to 
fullyrender
ive used the sample/simple lwpget.pl sample script (thats found in numerous 
place on the internet, which uses LWP package). 

if the url requested is 'static content', the page is received in its 
full/complete content.

if however, the url requested is dynamic content (that normally requires 
Javascript to be running in the 'client-browser-environment' - to be fully 
rendered) - then obviously, in this case - such a page does not retrieve with 
all parts being present.

is there any perl package that adds Javascript functionality to the basic 
lwpget.pl - so that when the perl-script-acting-as-a-web-client requests the 
page, its actually parsed, and javascript functions are performed - to allow 
the perl requested page to be the full equivalent as if the page were rendered 
in a fully Javascript aware web browser?

any help here would be appreciated, as well as a sample script.

sincerely,

greg



___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: perl58.dll: Perl_sv_2iv_flags (undefined reference)

2007-08-25 Thread sisyphus1

- Original Message - 
From: Suresh Govindachar [EMAIL PROTECTED]
To: perl-win32-users@listserv.ActiveState.com
Cc: 'Sisyphus' [EMAIL PROTECTED]; 'Jan Dubois'
[EMAIL PROTECTED]
Sent: Saturday, August 25, 2007 2:20 PM
Subject: RE: perl58.dll: Perl_sv_2iv_flags (undefined reference)




  Sisyphus suggested linking with C:/opt/perl/lib/CORE/perl58.lib
  (which does have the symbols in it) in the command that creates
  if_perl.o and/or in the command that builds gvim.exe (which is
  also the command that reports the missing references).

  But the build is supposed to use the library dynamically, rather
  than be statically linked.

But you will still have a dynamic build - perl58.lib is an import library
rather than a static library.

For dynamic builds using MSVC++ it is compulsory that you link to the import
library. MSVC++ doesn't accommodate linking directly to the dll.

For dynamic builds using MinGW (gcc), you generally have a choice - either
link directly to the dll or link to the import library.
In this instance, the dll (perl58.dll) has been built using MSVC++ and I
therefore wonder whether MinGW can link directly to it.

I would at least be trying to link to the import library (perl58.lib) in the
hope that it would solve the problem. (No guarantees :-)

Cheers,
Rob
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs