Will reCaptcha work on Intranet...

2,137 views
Skip to first unread message

DaWinner2011

unread,
Aug 13, 2010, 11:22:34 AM8/13/10
to reCAPTCHA
New to reCaptcha...testing files on our Intranet server before posting
on Internet. Our system admin tells me to see if reCaptcha will work
on Intranet, but I don't think this is possible since reCaptcha has to
see our files on an Internet domain (http://hwc.ccc.edu) in order to
work. Can you confirm if reCaptcha will only work with files place on
the Internet vs. Intranet?

Adrian Godong

unread,
Aug 13, 2010, 11:34:46 AM8/13/10
to reca...@googlegroups.com
It should work on any machine that has access to the Internet.

Have you tried it?

> --
> You received this message because you are subscribed to the Google Groups "reCAPTCHA" group.
> To post to this group, send email to reca...@googlegroups.com.
> To unsubscribe from this group, send email to recaptcha+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/recaptcha?hl=en.
>
>

--
Adrian Godong
adrian...@gmail.com

DaWinner2011

unread,
Aug 13, 2010, 12:06:17 PM8/13/10
to reCAPTCHA
I tried it on the Internet, but our server doesn't process the ASP
processing
page...I get an Internal server error (500). I have tested on our
Intranet and
I know that the form works (although the reCaptcha part doesn't). Our
system
admin mentioned that there is an "error reporting feature" that has to
be turned
on for our Internet web server in order to allow this error reporting
feature to
work, but activating this feature has security issues (see context of
email from
my system admin below):

System Admin response below...

Well the idea was to enable error reporting on dev server (Intranet)
so that you can
debug the application and then move over to production (Internet).
Turning on Error
reporting feature has security issues. So please debug the ASP pages
on dev
server (Intranet) and it should work fine on production (Internet), if
it works on dev.

-Kaushal

>>> Dennis MACKLIN 8/9/2010 11:59 AM >>>

Kaushal,

Just a quick follow-up...

I "think" the feature that you enabled also has to be enabled for the
"production server" also. I copied the two files to the "production
server (http://hwc.ccc.edu, 2 files...librarycontact.asp and
libraryprocesscontact.asp)
and tried to submit the form and got a "500 Internal Server Error."

Also...I think the reCaptcha tool is not processing an error if I type
in the
wrong Captcha words because the reCaptcha API Public and Private keys
are assigned to the http://hwc.ccc.edu domain (Internet)...not the
http://hwcdev.co.ccc.edu
domain (Intranet), which I have been using this morning for testing
the form.

If I am wrong with this thought process let me know what I need to do
to correct
when you get a free moment.

On Aug 13, 10:34 am, Adrian Godong <adrian.god...@gmail.com> wrote:
> It should work on any machine that has access to the Internet.
>
> Have you tried it?
>
> On Fri, Aug 13, 2010 at 4:22 PM, DaWinner2011 <dawinner2...@gmail.com> wrote:
> > New to reCaptcha...testing files on our Intranet server before posting
> > on Internet. Our system admin tells me to see if reCaptcha will work
> > on Intranet, but I don't think this is possible since reCaptcha has to
> > see our files on an Internet domain (http://hwc.ccc.edu) in order to
> > work. Can you confirm if reCaptcha will only work with files place on
> > the Internet vs. Intranet?
>
> > --
> > You received this message because you are subscribed to the Google Groups "reCAPTCHA" group.
> > To post to this group, send email to reca...@googlegroups.com.
> > To unsubscribe from this group, send email to recaptcha+...@googlegroups.com.
> > For more options, visit this group athttp://groups.google.com/group/recaptcha?hl=en.
>
> --
> Adrian Godong
> adrian.god...@gmail.com

Adrian Godong

unread,
Aug 13, 2010, 1:35:47 PM8/13/10
to reca...@googlegroups.com
My limited debugging experience with ASP said: use Response.Write.
http://www.w3schools.com/asp/met_write_response.asp

Primitive debugging, I know. But since it's dev server, shouldn't be a problem.

Before you do that, you should check whether port 80 is open from that
server. If you can remote in, just browse any website.

Dennis Macklin

unread,
Aug 16, 2010, 12:21:42 PM8/16/10
to reca...@googlegroups.com
Can anyone look at my Classic ASP code w/reCaptcha to see what I need to change. The form works, except for the reCaptcha part...I can't figure it out. When I click on submit the form processes the info and send the email...but bypasses the reCaptcha part.

<% Option Explicit %>

<!-- #include file="adovbs.inc" -->

  <%
  recaptcha_challenge_field  = Request("recaptcha_challenge_field")
  recaptcha_response_field   = Request("recaptcha_response_field")
  recaptcha_public_key       = "I have info in form" ' your public key
  recaptcha_private_key      = "I have info in form" ' your private key

  ' returns the HTML for the widget
  function recaptcha_challenge_writer()

  recaptcha_challenge_writer = _
  "<script type=""text/javascript"">" & _
  "var RecaptchaOptions = {" & _
  "   theme : 'red'," & _
  "   tabindex : 0" & _
  "};" & _
  "</script>" & _
  "<script type=""text/javascript"" src=""http://www.google.com/recaptcha/api/challenge?k=" & recaptcha_public_key & """></script>" & _
  "<noscript>" & _
    "<iframe src=""http://www.google.com/recaptcha/api/noscript?k=" & recaptcha_public_key & """ frameborder=""1""></iframe><>" & _
      "<textarea name=""recaptcha_challenge_field"" rows=""3"" cols=""40""></textarea>" & _
      "<input type=""hidden"" name=""recaptcha_response_field""value=""manual_challenge"">" & _
  "</noscript>"

  end function

  ' returns "" if correct, otherwise it returns the error response
  function recaptcha_confirm(rechallenge,reresponse)

  Dim VarString
  VarString = _
          "privatekey=" & recaptcha_private_key & _
          "&remoteip=" & Request.ServerVariables("REMOTE_ADDR") & _
          "&challenge=" & rechallenge & _
          "&response=" & reresponse

  Dim objXmlHttp
  Set objXmlHttp = Server.CreateObject("Msxml2.ServerXMLHTTP")
  objXmlHttp.open "POST", "http://www.google.com/recaptcha/api/verify", False
  objXmlHttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
  objXmlHttp.send VarString

  Dim ResponseString
  ResponseString = split(objXmlHttp.responseText, vblf)
  Set objXmlHttp = Nothing

  if ResponseString(0) = "true" then
    'They answered correctly
     recaptcha_confirm = ""
  else
    'They answered incorrectly
     recaptcha_confirm = ResponseString(1)
  end if

  end function

  server_response = ""
  newCaptcha = True
  if (recaptcha_challenge_field <> "" or recaptcha_response_field <> "") then
    server_response = recaptcha_confirm(recaptcha_challenge_field, recaptcha_response_field)
    newCaptcha = False
  end if

  %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script language='javascript' type='text/javascript' src='libraryvalidatecontact.js'></script>
<title>Harold Washington College Library Contact General Request Form</title>
</head>
<body>
<table width="100%" align="center" border="0" cellpadding="0" cellspacing="0" summary="AV Service Request Form.">
 <tr valign='top'>
  <td width='100%' align='left'>
   <form style="margin-bottom: 0" action="libraryprocesscontact.asp" method="POST" onSubmit="return validateForm(this);">
      <table width='100%' summary='Online Registration Form.'>
       <tr valign='top'>
        <td width='100%' align='left'>
         <table width='100%' summary='Instructor Information Section.'>
          <tr valign='middle'>
           <td align='center'><b>HWC LIBRARY CONTACT GENERAL REQUEST FORM:</b></td>
          </tr>
           <tr valign='middle'>
            <td align='center'><b>Asterisk <font color="red">(*)</font> denotes required field.</b></td></tr>
           <tr valign='middle'><td align='center'>&nbsp;</td></tr>
          </table>
         </td>
        </tr>       
        <tr valign='top'>
         <td width='100%' align='left'>
          <table width='100%' align='left' summary='Name Field'>
           <tr valign='middle'>
            <td align='right' width='45%' class='redl'>
             <font color="#FF0000">*</font>
             <LABEL for='First Name:' class='blkl'><b>First Name:</b></LABEL>
            </td>
            <td align='left' width='55%'>
             <input type='text' name='fname' size='20' value='' id=''>
            </td>
           </tr>
           <tr valign='middle'>
            <td align='right' width='45%' class='redl'>
             <font color="#FF0000">*</font>
             <LABEL for='Last Name:' class='blkl'><b>Last Name:</b></LABEL>
            </td>
            <td align='left' width='55%'>
             <input type='text' name='lname' size='20' value='' id=''>
            </td>
           </tr>
           <tr valign='middle'>
            <td align='right' width='45%' class='redl'>
             <font color="#FF0000">*</font>
             <LABEL for='Email Address:' class='blkl'><b>Email Address:</b></LABEL>
            </td>
            <td align='left' width='55%'>
             <input type='text' name='email' size='20' value='' id=''>
            </td>
           </tr>
           <tr valign='top'>
            <td align='right' width='45%'>
             <LABEL for='Comment/Question:'><b>Comment/Question:</b></LABEL>
            </td>
            <td align='left' width='55%'>
             <textarea name='comments' cols='20' rows='5' id=''></textarea>
            </td>
           </tr>
          </table>
         </td>
        </tr>
        <tr valign='middle'>
         <td width='100%' align='center'>
          <table width='100%' summary='Class Dates and Submission Buttons.'>
           <tr valign='middle'>
            <td align='center' width='100%'>
             <b>SPAM Guard:</b> Please verify that you are not a SPAM robot by
             entering the characters shown in the box below:
            </td>
           </tr>
          </table>
         </td>
        </tr>       
        <tr valign='middle'>
         <td width='100%' align='center'>
          <table width='100%' summary='Class Dates and Submission Buttons.'>
           <tr valign='middle'>
            <td align='center' width='100%'>
             <% if server_response <> "" or newCaptcha then %>
             <% if newCaptcha = False then %>
             <!--- An error occurred --->
             Wrong!
             <% end if %>
             <!--- Generating the form --->
             <form action="recaptcha.asp" method="post">
              <%=recaptcha_challenge_writer()%>
             </form>
             <% else %>
             <!-- The solution was correct -->
             Correct!
             <%end if%>
            </td>
           </tr>
          </table>
         </td>
        </tr>                             
        <tr valign='top'>
         <td width='100%' align='center'>
          <table width='100%' summary='Class Dates and Submission Buttons.'>
           <tr><td align='center'><LABEL for='Submit by Email'> </LABEL><input type='Submit' value='Submit by Email' id='Submit by Email'></td></tr>
           <tr>
            <td align='center'>Please submit any additional comments and/or questions to:</td>
           </tr>          
           <tr>
            <td align='center'><b>Dennis Macklin, HWC Library Research Specialist, Room 501</b></td></tr>
           <tr><td align='center'><b>Phone #: 312.553.5600</b></td></tr>
          </table>
         </td>
        </tr> 
       </table> <!-- End of table form -->
      </form>
     </td>
    </tr>
   </table>
 </body>
</html>

Alexander Orlov

unread,
Sep 7, 2012, 8:50:33 AM9/7/12
to reca...@googlegroups.com
Will reCAPTCHA work in "intranet mode"? I have the constraint that the customer should be able to work using the company intranet only.

Alex

Adrian Godong

unread,
Sep 8, 2012, 11:06:49 PM9/8/12
to reca...@googlegroups.com
No. You have to validate the challenges with Google servers.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/recaptcha/-/pLObG0Xw94sJ.
Reply all
Reply to author
Forward
0 new messages