On Monday 24 June 2002 5:06 am, Octavian Rasnita wrote:
> Hi all,
>
> Can you recommend me a good editor for Perl scripts that runs under
> Windows? It should:
>
> 1. Save the text with Unix end of lines.
> 2. Write somewhere the current line I am in.
> 3. Not necessary but it would be wonderful t
Hi,
Don't forget to close the FH :
close();
Regs David
-
>
> Greetings All,
>
> I have the following code, from which I attempt to call the module
> Test
> #!/usr/local/bin/perl
> ###
> ### Program name: demo.pl
> ### Created By:Theresa Mullin
>
> require "cgi.lib
For the following the syntax is correct but when I try to open it
nothing displays, what should I change?
#!/usr/bin/perl -wT
use strict;
use CGI::Pretty qw/ :standard /;
$CGI::DISABLE_UPLOADS = 1;
$CGI::POST_MAX = 512 * 1024;
print header ( "text/html" );
my $date = localtime;
my $c = param(
When I load this in the browser I just get a blank page. The source
shows declaration, html, body, head, and meta tags, but that's it.
What should I change?
#!/usr/bin/perl -wT
use strict;
use CGI::Pretty qw/ :standard /;
$CGI::DISABLE_UPLOADS = 1;
$CGI::POST_MAX = 512 * 1024;
print header (
Niko, et al --
...and then Niko Gunadi said...
%
% On Mon, Jun 24, 2002 at 02:35:06PM -0700, Ovid wrote:
% >Niko,
% >
% >If you pass the variables to the page, the user can find them, period. If you
control the output
...
%
% From what i know (which is limited :), if we pass the variable in
At 06:06 AM 6/25/02 -0500, David T-G wrote:
>If the variables are in the page to be in the form to be
>sent back via POST, then the user can find them, period.
>
>Try it yourself: set up something via POST and then surf to the page
>and then "view source" or the equivalent in your browser (and if
Marty --
...and then Marty Landman said...
%
% At 06:06 AM 6/25/02 -0500, David T-G wrote:
%
% >If the variables are in the page to be in the form to be
% >sent back via POST, then the user can find them, period.
% >
% >Try it yourself: set up something via POST and then surf to the page
% >and
At 06:50 AM 6/25/02 -0500, David T-G wrote:
>When you have page1 loaded and you're about to press the submit button
>to send it, and your secret var1, off to the script, don't; instead,
>view the page source and you will see the form structure and the hidden
>(note that "hidden" simply means "don
Marty --
...and then Marty Landman said...
%
% At 06:50 AM 6/25/02 -0500, David T-G wrote:
%
...
% >view the page source and you will see the form structure and the hidden
% >(note that "hidden" simply means "don't bother to try to display on the
% >page", not "secretly encrypted or made to dis
Marty,
David's explaining it pretty well, but let me take
another crack at it. I was in your position about a
year ago and got royally (and publically) flamed on
the perl beginners list by a security admin for
deigning to give CGI advice without knowing this, so I
got what you might call a cras
> -Original Message-
> From: Kyle Babich [mailto:[EMAIL PROTECTED]]
> Sent: Monday, June 24, 2002 4:09 PM
> To: [EMAIL PROTECTED]
> Subject: Displaying Problems
>
>
> For the following the syntax is correct but when I try to open it
> nothing displays, what should I change?
There are s
> -Original Message-
> From: Kyle Babich [mailto:[EMAIL PROTECTED]]
> Sent: Monday, June 24, 2002 7:44 PM
> To: [EMAIL PROTECTED]
> Subject: Not displaying in browser
>
>
> When I load this in the browser I just get a blank page. The source
> shows declaration, html, body, head, and me
I still can't get it to work even with those changes.
Quoting Bob Showalter <[EMAIL PROTECTED]>:
> > -Original Message-
> > From: Kyle Babich [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, June 24, 2002 4:09 PM
> > To: [EMAIL PROTECTED]
> > Subject: Displaying Problems
> >
> >
> > For th
Thanks, but this doesn´t work either, the problem with the + is that the cgi:param
method takes everything after the & sign as the next variable. As the syntax for the
param method is: http://server/script.pl?variable1=value&variable2=value...etc
> -Ursprüngliche Nachricht-
> Von: MECK
At 05:47 AM 6/25/02 -0700, John Brooking wrote:
> As David says, the place that you can see the
>"hidden" variables is in the page where the form is,
>before you submit it.
Got that now, thx John.
> But wait, there's more! Even if your script *did*
>check the referer, that's no protection e
One solution, when not using $value = param('value');
sub parse_form {
read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
if (length($buffer) < 5) {
$head = $ENV{QUERY_STRING};
}
@pairs = split(/\?/, $head); # split vars using ? as delimitor
foreach $pair(@pairs) {
on Tue, 25 Jun 2002 13:10:05 GMT, [EMAIL PROTECTED]
(Theuerkorn Johannes) wrote:
> Thanks, but this doesn´t work either, the problem with the + is
> that the cgi:param method takes everything after the & sign as the
> next variable. As the syntax for the param method is:
> http://server/script.p
Anyone know of a program that can create barcodes on the screen from entered numbers?
thanks!
Puh thats tought! So i have to go the hard way for it? What a pity!
Lets see if i understand the code... Is there any source where I can read about
passing parameters to a perl script via the browser?
> One solution, when not using $value = param('value');
>
> sub parse_form {
>
> read(STDIN
On Tuesday 25 June 2002 1:58 pm, Fred Sahakian wrote:
> Anyone know of a program that can create barcodes on the screen from
> entered numbers?
>
> thanks!
Found this on CPAN:
http://www.perl.com/CPAN-local/modules/by-module/Barcode/
--
Geraint Jones
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
Kyle,
Well, I'd start by printing an actual content type instead of depending on CGI.pm
for that:
---
print "content-type: text/html\n\n";
---
Second, I would condense your if to this
-
Hi Johan,
Let's tell you a secret.
I don't know what it means as well :)
Well some part then. This is just typicaly something I always re-use and
actualy never had the time to re-look at it.
Don't worry about the length by the way. Just give it a try, it never failed for
me. And maybe you might
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 25, 2002 10:26 AM
> To: Kyle Babich; [EMAIL PROTECTED]
> Subject: Re: Displaying Problems
>
>
> Kyle,
> Well, I'd start by printing an actual content type
> instead of depending on CGI.pm
Bob,
> I fail to see how writing code with errors is somehow CGI.pm's fault
No its not. But I'll tell you one thing, people who depend so heavily on CGI.pm
generally have a
good understanding of how to use CGI.pm, but have less understanding of what is really
going on. Me
personally, I want t
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 25, 2002 11:12 AM
> To: Bob Showalter; [EMAIL PROTECTED]
> Subject: Re: Displaying Problems
>
>
> Bob,
>
> ...
> So what exactly is the RFC2616 compliant content type?
cf. ftp://ftp.isi.edu/
--- [EMAIL PROTECTED] wrote:
> what about a sesion id based on their IP? or soem relevent info like that?
Here's how I create session IDs:
my $md5= new Digest::MD5;
my $remote = $ENV{ REMOTE_ADDR } . $ENV{ REMOTE_PORT } . $self->{ _rand };
my $id = $md5->md5_base64( time, $$, $remo
--- John Brooking <[EMAIL PROTECTED]> wrote:
> So
> really, POST variables are no more secure than GET
> variables, it just takes a little more doing to fake
> them.
Side note (without really reading the rest of the thread :)
The reason that many people think POST is more secure than GET is bec
Bob,
> CGI.pm--a threat to our way of life! Down with the troglodytes! :)
Well, not exactly my point, but ok :) Just kidding
I just think there are too many who close their minds to anything but CGI.pm,
including potentially
more efficient customized solutions.
David
- Original Message
--- Marty Landman <[EMAIL PROTECTED]> wrote:
> > ...
> >check the referer, that's no protection either! An
> >experienced programmer can easily use Perl's LWP
> >module or its equivalent in some other language to
> >make the request with a faked referer variable. So
> >really, POST variables are n
Marty, et al --
...and then Marty Landman said...
%
% At 05:47 AM 6/25/02 -0700, John Brooking wrote:
%
...
% > But wait, there's more! Even if your script *did*
% >check the referer, that's no protection either! An
% >experienced programmer can easily use Perl's LWP
% >module or its equivalen
Ok, so here's the deal:
"Some HTTP/1.0 software has interpreted a Content-Type header without charset
parameter incorrectly
to mean "recipient should guess." Senders wishing to defeat this behavior MAY include
a charset
parameter even when the charset is ISO-8859-1 and SHOULD do so when it is k
Well, I still can't get my page to display.
Quoting [EMAIL PROTECTED]:
> Ok, so here's the deal:
>
> "Some HTTP/1.0 software has interpreted a Content-Type header without charset
> parameter incorrectly
> to mean "recipient should guess." Senders wishing to defeat this behavior MAY
> include a
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 25, 2002 12:47 PM
> To: Bob Showalter; [EMAIL PROTECTED]
> Subject: Re: Displaying Problems
>
>
> Ok, so here's the deal:
>
> "Some HTTP/1.0 software has interpreted a Content-Type header
>
Hi Joe,
just hab the same Problems with your Script as with cgi::param,...
Ok, I just played around a little bit, checked some books and came to this solution:
our %values;
sub parse_form {
my ($ENV,$daten,@fields,$name,$value);
if ($ENV{'REQUEST_METHOD'} eq 'GET')
{$
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 25, 2002 1:05 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Displaying Problems
>
>
> Well, I still can't get my page to display.
>
Remove this line:
body( -bgcolor => "\#Ff" ),
It's em
Hmm, a perl syntax checks out, but the script seemingly dies when ran? One
thing I've found and don't yet fully understand, is it seems like when
importing other modules the perl check doesn't seem to catch undeclared subs
despite use strict- any ideas?
Either way, I digress- basic things but
> my $md5= new Digest::MD5;
> my $remote = $ENV{ REMOTE_ADDR } . $ENV{ REMOTE_PORT } . $self->{
_rand };
> my $id = $md5->md5_base64( time, $$, $remote );
> $id=~ tr|+/=|-_.|; # Make non-word characters URL-friendly
>
> The "Make ... URL-friendly" part is in case I need to
I tend to always use CGI.pm to get the parameters, but
I may or may not use it to output HTML. If it's simple
HTML, I will, because it's easier and safer, but if
it's complicated, like a lot of JavaScript in the
header, or for most form input controls, I just use
print statements, either normal on
Bob,
That's interesting.
You know, I work with about 5 other perl programmers, most of which do use CGI.pm,
but none of
them use it for anything other that gathering input from the web. I have also
downloaded many
packages from CPAN, I would say a majority of them use CGI.pm, but very r
>thanks very much Ovid, it was very nice of you, but can you complete your
>favour and describe how to implement Apache::Session, i mean, whats the use
>of that module if i could generate a session id with md5?
you actually can use CGI::Session, the front end of Apache::Session.
By using this mod
On Tue, Jun 25, 2002 at 12:10:34PM -0600, [EMAIL PROTECTED] wrote:
>You know, I work with about 5 other perl programmers, most of which do use
>CGI.pm, but none of
>them use it for anything other that gathering input from the web. I have also
>downloaded many
>packages from CPAN, I would sa
--- Niko Gunadi <[EMAIL PROTECTED]> wrote:
> >thanks very much Ovid, it was very nice of you, but can you complete your
> >favour and describe how to implement Apache::Session, i mean, whats the use
> >of that module if i could generate a session id with md5?
>
> you actually can use CGI::Session
Ok, I did like perldoc cgi said and changed it to this:
print start_html(
-title => "IMAP.cc",
-head => Link(
{
-rel => "stylesheet",
-type => "text/css",
-href => "style.css",
}
),
-bgcolor => "\#FF"
),
It still won't
How can I quickly change the extension of a lot of files???
something like "file" into "file.something" ,JP.
_
Send and receive Hotmail on your mobile device: http://mobile.msn.com
--
To unsubscribe, e-mail: [EMAIL
> -Original Message-
> From: Ovid [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 25, 2002 3:34 PM
> To: Niko Gunadi; Beginners cgi
> Subject: Re: Fwd: passing variables in POST
>
>
> I was under the
> impression that Apache::Session required Apache. I'm told
> that this is not true,
on Tue, 25 Jun 2002 19:51:14 GMT, JoãO Paulo wrote:
>
> How can I quickly change the extension of a lot of files???
>
> something like "file" into "file.something" ,JP.
perldoc -f rename
perldoc -f opendir
perldoc -f readdir
--
felix
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
F
use this:
you could use system commands if you are on winnt or w2k.
I normally just use
@filelist = `dir *.ext /b`;
foreach (@filelist){
@filename=split on the .
if last element of @filename is what you're looking for{
`rename $_ @filename[0].newext`
}
}
Please let us know a little bit more about your setup. i.e. have you
already installed mysql or are you running it on a remote server, what
OS are you running?
to connect to the mysql server from perl you will have to use the DBI
module, and the DBD:mysql module.
this is a link you may find use
48 matches
Mail list logo