Sponsored Content
Top Forums Shell Programming and Scripting Creating a captcha with amazon node .htaccess" Post 302944611 by jr44 on Wednesday 20th of May 2015 03:12:36 PM
Old 05-20-2015
Creating a captcha with amazon node .htaccess"

hello i have a project that i have to create a captcha
can someone please help me do this in my mac terminal im a beginner tell me the steps to do this?




in public_html, create a file named ".htaccess" with the following content:

AuthType Basic
AuthName "CIS440"
AuthBasicProvider file
AuthUserFile <path name to your password file. see below>
Require valid-user




in order to create your own password file to be used for "AuthUserFile", do this


htpasswd -c <path name to the password file> <your user id> <your web password>

the password file should be somewhere not under the public_html directory (you would not want someone to be able to download your password file)

Last edited by jr44; 05-20-2015 at 04:22 PM..
 

7 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

creating an .htaccess file

I don't know anything about Unix but I have to create a htaccess file and a htpasswd file. I have instructions that tell me to "create an htaccess file using the vi editor" How do I get into the directory that should be password protected and how do I start creating the htaccess file? If I can... (5 Replies)
Discussion started by: WhitneyMay
5 Replies

2. Virtualization and Cloud Computing

CEP as a Service (CEPaaS) with MapReduce on Amazon EC2 and Amazon S3

Tim Bass 11-25-2008 01:02 PM Just as I was starting to worry that complex event processing community has been captured by RDBMS pirates off the coast of Somalia, I rediscovered a new core blackboard architecture component, Hadoop. Hadoop is a framework for building applications on large... (0 Replies)
Discussion started by: Linux Bot
0 Replies

3. Virtualization and Cloud Computing

Creating VirtualBox-Image as "harddisk" by shell-script

Hello, I'm trying to create a VirtualBox "harddisk" and put an dd-image into it. This image shoudn't work as a virtual maschine, I just want to be able to mount it to an folder. How can I do this with an shell script? Sebi ---------- Post updated at 10:36 AM ---------- Previous update... (0 Replies)
Discussion started by: Sebi0815
0 Replies

4. Shell Programming and Scripting

Creating a Shortcut (to just type "l" but it runs "ls -lah")

How do I create shortcuts? For example: I just want to type one key "l" and have it output the command of "ls -lah" I believe it's creating a file called l with 755 permissions but I'm not sure where to put the file. *if it matters, I'm on a shared hosting web server using cPanel with... (2 Replies)
Discussion started by: ijustsawmars
2 Replies

5. Shell Programming and Scripting

mv command to include files beginning with "." (like .htaccess)

Hi, how can I get the mv command to include files beginning with . (such as .htaccess)? Right now when I mv a directory the .htaccess file is missing and I need to do this on a lot of directories, so there's a lot of wordpress permalinks that don't work anymore because the .htaccess file wasn't... (5 Replies)
Discussion started by: vanessafan99
5 Replies

6. Programming

"make" fails on the first .f90 file it encounters: not creating .o files

i may be asking way too much here but i am not a programmer and not sure where to to turn. i have a program that i am trying to "make". but the compiler i am supposed to use gets nowhere. there are a bunch of .f90 files that are being processed as follows but it doesn't get past the first one: ... (1 Reply)
Discussion started by: crimso
1 Replies

7. Homework & Coursework Questions

Need help creating shell script with output that has 2014 calendar and 2 text items from a"fortune"

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: I am required to create a bash shell script with either emacs or vi. It must include the year 2014 calendar on... (9 Replies)
Discussion started by: dandanhelpmeman
9 Replies
Captcha::reCAPTCHA(3pm) 				User Contributed Perl Documentation				   Captcha::reCAPTCHA(3pm)

NAME
Captcha::reCAPTCHA - A Perl implementation of the reCAPTCHA API VERSION
This document describes Captcha::reCAPTCHA version 0.93 SYNOPSIS
use Captcha::reCAPTCHA; my $c = Captcha::reCAPTCHA->new; # Output form print $c->get_html( 'your public key here' ); # Verify submission my $result = $c->check_answer( 'your private key here', $ENV{'REMOTE_ADDR'}, $challenge, $response ); if ( $result->{is_valid} ) { print "Yes!"; } else { # Error $error = $result->{error}; } For complete examples see the /examples subdirectory DESCRIPTION
reCAPTCHA is a hybrid mechanical turk and captcha that allows visitors who complete the captcha to assist in the digitization of books. From <http://recaptcha.net/learnmore.html>: reCAPTCHA improves the process of digitizing books by sending words that cannot be read by computers to the Web in the form of CAPTCHAs for humans to decipher. More specifically, each word that cannot be read correctly by OCR is placed on an image and used as a CAPTCHA. This is possible because most OCR programs alert you when a word cannot be read correctly. This Perl implementation is modelled on the PHP interface that can be found here: <http://recaptcha.net/plugins/php/> To use reCAPTCHA you need to register your site here: <https://www.google.com/recaptcha/admin/create> INTERFACE
"new" Create a new "Captcha::reCAPTCHA". "get_html( $pubkey, $error, $use_ssl, $options )" Generates HTML to display the captcha. print $captcha->get_html( $PUB, $err ); $pubkey Your reCAPTCHA public key, from the API Signup Page $error Optional. If set this should be either a string containing a reCAPTCHA status code or a result hash as returned by "check_answer". $use_ssl Optional. Should the SSL-based API be used? If you are displaying a page to the user over SSL, be sure to set this to true so an error dialog doesn't come up in the user's browser. $options Optional. A reference to a hash of options for the captcha. See "get_options_setter" for more details. Returns a string containing the HTML that should be used to display the captcha. "get_options_setter( $options )" You can optionally customize the look of the reCAPTCHA widget with some JavaScript settings. "get_options_setter" returns a block of Javascript wrapped in <script> .. </script> tags that will set the options to be used by the widget. $options is a reference to a hash that may contain the following keys: "theme" Defines which theme to use for reCAPTCHA. Possible values are 'red', 'white' or 'blackglass'. The default is 'red'. "tabindex" Sets a tabindex for the reCAPTCHA text box. If other elements in the form use a tabindex, this should be set so that navigation is easier for the user. Default: 0. "check_answer" After the user has filled out the HTML form, including their answer for the CAPTCHA, use "check_answer" to check their answer when they submit the form. The user's answer will be in two form fields, recaptcha_challenge_field and recaptcha_response_field. The reCAPTCHA library will make an HTTP request to the reCAPTCHA server and verify the user's answer. $privkey Your reCAPTCHA private key, from the API Signup Page. $remoteip The user's IP address, in the format 192.168.0.1. $challenge The value of the form field recaptcha_challenge_field $response The value of the form field recaptcha_response_field. Returns a reference to a hash containing two fields: "is_valid" and "error". my $result = $c->check_answer( 'your private key here', $ENV{'REMOTE_ADDR'}, $challenge, $response ); if ( $result->{is_valid} ) { print "Yes!"; } else { # Error $error = $result->{error}; } See the /examples subdirectory for examples of how to call "check_answer". CONFIGURATION AND ENVIRONMENT
Captcha::reCAPTCHA requires no configuration files or environment variables. To use reCAPTCHA sign up for a key pair here: <https://www.google.com/recaptcha/admin/create> DEPENDENCIES
LWP::UserAgent, HTML::Tiny INCOMPATIBILITIES
None reported . BUGS AND LIMITATIONS
No bugs have been reported. Please report any bugs or feature requests to "bug-captcha-recaptcha@rt.cpan.org", or through the web interface at <http://rt.cpan.org>. AUTHOR
Andy Armstrong "<andy@hexten.net>" LICENCE AND COPYRIGHT
Copyright (c) 2007, Andy Armstrong "<andy@hexten.net>". All rights reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic. DISCLAIMER OF WARRANTY
BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. perl v5.12.3 2010-07-03 Captcha::reCAPTCHA(3pm)
All times are GMT -4. The time now is 04:42 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy