networknerd has asked for the wisdom of the Perl Monks concerning the following question:
Does anyone have ConfigLocal.pm
Used on win32 machines with activestate perl sending info to my linux firewall.
perl2exe is causing me grief I have found all the files that it asked for except this one.
I need to remotely send information to my firewall, I don't want students finding and messing with the scripts so it has to be compiled.
My Perl script works perfectly but it won't work without this file, tried exlude command but that didn't work either (It elcuded the file which compiled and then dosn't work.
Proff of concept scrip below works but exe won't post.
I
#!/usr/bin/perl #perl2exe_include HTTP::Request::Common #perl2exe_include LWP::UserAgent # Script to emulate a browser for posting to a # CGI program with method="POST". # Specify the URL of the page to post to. # my $URLtoPostTo = "http://flowto.info/cgi-bin/Dump.cgi"; my $URLtoPostTo = "https://10.10.10.10:5445/cgi-bin/lon.cgi"; # Specify the information to post, the form field name on # the left of the => symbol and the value on the right. my %Fields = ( "name" => "nivend", "test" => "testdata", "ip" => "10.10.10.171" ); # As seen above, "@" must be escaped when quoted. # If you want to specify a browser name, # do so between the quotation marks. # Otherwise, nothing between the quotes. my $BrowserName = "This Be Mine"; # It's a good habit to always use the strict module. use strict; # Modules with routines for making the browser. use LWP::UserAgent; #Next Module does the post request use HTTP::Request::Common; # Create the browser that will post the information. my $Browser = new LWP::UserAgent; # Insert the browser name, if specified. if($BrowserName) { $Browser->agent($BrowserName); } # Post the information to the CGI program. my $Page = $Browser->request(POST $URLtoPostTo,\%Fields); # Print the returned page (or an error message). print "Content-type: text/html\n\n\n"; if ($Page->is_success) { print $Page->content; } else { print $Page->message; } # end of script
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Encode:ConfigLocal Missing
by marto (Cardinal) on Jan 02, 2010 at 16:46 UTC | |
|
Re: Encode:ConfigLocal Missing
by syphilis (Archbishop) on Jan 03, 2010 at 11:49 UTC | |
by rkazak (Initiate) on Feb 03, 2011 at 03:45 UTC |