07-30-2009
Accessing a Perl CGI script, security issue
Hi Everybody,
I was wondering if it was possible for someone to gain access to my Perl CGI scripts before they are interpreted by Perl (mod_perl on apache2) i.e. getting a hold of my raw scripts and not the html output?
Let's say I use the DBI module where I have the hostname, user and password stored in my CGI script (currently I store these parameters in another file and the user only has select privileges anyway), is there a way to prevent someone from getting the script as it is (if it is possible)?
Many thanks,
Dave
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hi Bros,
I am in a serious trouble with concurrency issue while using mailx. I have a shell script which reads all the emails of a unix user account and create a copy (another mbox for processing and archive purpose). This script works fine for 99.99% of the time but sometime it start creating... (2 Replies)
Discussion started by: Sumit_Fundoo
2 Replies
2. Shell Programming and Scripting
I am trying to use a script to replace the header of each file, whose filename are stored within the array $test, using the sed command within a Perl script as follows:
$count = 0;
while ( $count < $#test )
{
`sed -e 's/BIOGRF 321/BIOGRF 332/g' ${test} > 0`;
`cat 0 >... (2 Replies)
Discussion started by: userix
2 Replies
3. Shell Programming and Scripting
hi,,
i have perl scipt with line :
system('./try.sh $t $d $m');
in shell scipt try.sh i have the line:
echo $1
its not printing value of $t that i hav passed..y is it so..i am running it from apache web server (2 Replies)
Discussion started by: raksha.s
2 Replies
4. Web Development
hi,i hav a form in cgi perl script.this script accepts a value from user from another html form, and depending upon this value,i need to disable /enable radio buttons in cgi-perl script wen second page is displayed on executing cgi perl script.how do i do it using javascript? (0 Replies)
Discussion started by: raksha.s
0 Replies
5. Web Development
Hello,
Met a problem learning perl cgi script.
1 #!/usr/bin/perl -wT
2
3 use strict;
4 use CGI qw(:standard);
5
6 my $q = new CGI;
7
8 my $filename = $q->param('/home/yifangt/hello.cgi');
9 my $contenttype = $q->uploadInfo($filename)->{'Content-Type'};
10... (5 Replies)
Discussion started by: yifangt
5 Replies
6. Web Development
Can anyone tell me how to export a variable from one perl CGI script to another perl cgi script when using a redirect.
Upon running the login.pl the user is prompted to enter user name and password. Upon entering the correct credentials (admin/admin) the user is
redirected to welcome page.
My... (3 Replies)
Discussion started by: Arun_Linux
3 Replies
7. Programming
Hi
I have a bash script which takes parameters
sh /tmp/gdg.sh -b BASE-NAME -n 1 -s /source/data -p /dest/data/archive -m ARC
gdg.sh will scan the /source/data and will move the contents to /dest/data/archive after passing through some filters. Its working superb from bash
I have... (0 Replies)
Discussion started by: rakeshkumar
0 Replies
8. Shell Programming and Scripting
Hi All,
I am aware that html tags can be embedded in cgi script as below.. In the same way is it possible to embed the below javascript in perl cgi script ??
print("<form action="action.htm" method="post" onSubmit="return submitForm(this.Submitbutton)">");
print("<input type = "text"... (1 Reply)
Discussion started by: scriptscript
1 Replies
9. Shell Programming and Scripting
Hi team,
I have a typical problem with cgi pages in apache webserver in WINDOWS
I am able to execute(display) the pages that are saved in cgi-bin folder.
But I am not able to execute the pages stored in htdocs or other folder other than cgi-bin folder.
Could anyone please let me know how... (1 Reply)
Discussion started by: scriptscript
1 Replies
10. Shell Programming and Scripting
Hi All,
I have written an cgi perl script that displays an image(Excel image) and when clicked on that Image I need to download a excel sheet.
I made sure that excel sheet exists in the folder with the given name but still I am not able to download the sheet.
print "<center><table... (2 Replies)
Discussion started by: scriptscript
2 Replies
LEARN ABOUT DEBIAN
cgi::application::plugin::authentication::driver::cdbi
CGI
::Application::Plugin::Authentication::Driver::CDBI(3User Contributed Perl DocumentaCGI::Application::Plugin::Authentication::Driver::CDBI(3pm)
NAME
CGI::Application::Plugin::Authentication::Driver::CDBI - Class::DBI Authentication Driver
VERSION
Version 0.02
SYNOPSIS
use base qw(CGI::Application);
use CGI::Application::Plugin::Authentication;
__PACKAGE__->authen->config(
DRIVER => [ 'CDBI',
CLASS => 'My::CDBI::Users',
FIELD_METHODS => [qw(user MD5:passphrase)]
],
CREDENTIALS => [qw(auth_username auth_password)],
);
DESCRIPTION
This Authentication driver uses the Class::DBI module to allow you to authenticate against any Class::DBI class.
PARAMETERS
The Class::DBI authentication driver accepts the following required parameters.
CLASS (required)
Specifies the Class::DBI class to use for authentication. This class must be loaded prior to use.
FIELD_METHODS (required)
FIELD_METHODS is an arrayref of the methods in the Class::DBI class specified by CLASS to be used during authentication. The order of these
methods needs to match the order of the CREDENTIALS. For example, if CREDENTIALS is set to:
CREDENTIALS => [qw(auth_user auth_domain auth_password)]
Then FIELD_METHODS must be set to:
FIELD_METHODS => [qw(userid domain password)]
FIELD_METHODS supports filters as specified by CGI::Application::Plugin::Authentication::Driver
METHODS
verify_credentials
This method will test the provided credentials against the values found in the database, according to the Driver configuration.
SEE ALSO
CGI::Application::Plugin::Authentication::Driver, CGI::Application::Plugin::Authentication, perl(1)
AUTHOR
Shawn Sorichetti, "<ssoriche@coloredblocks.net>"
BUGS
Please report any bugs or feature requests to "bug-cgi-application-plugin-authentication-driver-cdbi@rt.cpan.org", or through the web
interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=CGI-Application-Plugin-Authentication-Driver-CDBI
<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=CGI-Application-Plugin-Authentication-Driver-CDBI>. I will be notified, and then you'll
automatically be notified of progress on your bug as I make changes.
ACKNOWLEDGEMENTS
Special thanks to Cees Hek for writing CGI::Application::Plugin::Authentication and his assistance in writing this module.
COPYRIGHT & LICENSE
Copyright 2005 Shawn Sorichetti, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.12.3 2011-05-16 CGI::Application::Plugin::Authentication::Driver::CDBI(3pm)