• Stars
    star
    117
  • Rank 301,828 (Top 6 %)
  • Language
    Go
  • License
    MIT License
  • Created over 12 years ago
  • Updated over 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A package for handling reCaptcha (http://www.google.com/recaptcha) form submissions in Go (http://golang.org/).

go-recaptcha

https://godoc.org/github.com/dpapathanasiou/go-recaptcha

About

This package handles reCaptcha (API versions 2 and 3) form submissions in Go.

Usage

Install the package in your environment:

go get github.com/dpapathanasiou/go-recaptcha

To use it within your own code, import github.com/dpapathanasiou/go-recaptcha and call:

recaptcha.Init (recaptchaPrivateKey)

once, to set the reCaptcha private key for your domain, then:

recaptcha.Confirm (clientIpAddress, recaptchaResponse)

reCAPTCHA v2

For each reCaptcha form input you need to check, using the values obtained by reading the form's POST parameters (the recaptchaResponse in the above corresponds to the value of g-recaptcha-response sent by the reCaptcha server.)

The recaptcha.Confirm() function returns either true (i.e., the captcha was completed correctly) or false, along with any errors (from the HTTP io read or the attempt to unmarshal the JSON reply).

reCAPTCHA v3

Version 3 works differently: instead of interrupting page visitors with a prompt, it runs in the background, computing a score.

This repo has been updated to handle the score and action in the response, but the usage example is still in terms of version 2.

Usage Example

Included with this repo is example.go, a simple HTTP server which creates the reCaptcha form and tests the input.

See the instructions for running the example for more details.

Donate

If you find this work useful, please consider making a donation:

Bitcoin Donate 14TM4ADKJbaGEi8Qr8dh4KfPBQmjTshkZ2

QR code

More Repositories

1

simple-graph

This is a simple graph database in SQLite, inspired by "SQLite as a document database"
1,382
star
2

pdfminer-layout-scanner

A more complete example of programming with PDFMiner, which continues where the default documentation stops
Python
215
star
3

tweet-secret

This is a text steganography application optimized for use on Twitter, written in Clojure.
Clojure
183
star
4

go-statemachine

An implementation of a finite state machine in Go
Go
106
star
5

recipebook

This is a simple application for scraping and parsing food recipe data found on the web in hRecipe format, producing results in json
Python
104
star
6

recipes

A collection of cooking recipes in json format
79
star
7

go-api

This package provides a framework for creating HTTP servers in Go (http://golang.org/) to handle API requests capable of replying in xml, json, or any other valid content type.
Go
75
star
8

buckabuckaboo

An unobtrusive, cross-browser javascript plugin for tracking mouse movement on web pages
JavaScript
50
star
9

CleanScrape

A no-nonsense web scraping tool which removes the crap and preserves the content in epub and pdf formats.
Python
41
star
10

cmdline-news

This is a simple command-line based rss reader which is great for browsing your favorite sites unobtrusively, without having to open a browser window.
Python
27
star
11

simple-graph-pypi

This is the meta repository for packaging the simple-graph implementation in python for PyPI distribution
Python
25
star
12

go-one-password

A password generator for website logins based on a single, private passphrase. This is a self-contained, statically compiled application which runs on the command line or as a simple gui, and does not require an internet connection.
Go
22
star
13

simple-graph-go

This is the Go implementation of simple-graph (https://github.com/dpapathanasiou/simple-graph)
Go
16
star
14

intelligent-smtp-responder

This is an intelligent email-based agent server
Python
13
star
15

go-tree-notation

This is a Tree Notation library implemented in Go
Go
7
star
16

MyTeX

My LaTeX templates for personal correspondence and other documents
TeX
5
star
17

zen-thought

This is a zen thought-of-the-day aphorism application based on the daily paper calendar by JoTaiga, and modeled after the old unix fortune application.
C
5
star
18

nihongo-benkyou

This is Japanese language study: various notes and translations in easy to parse formats
4
star
19

python-recaptcha

This code handles reCaptcha form submissions in Python
Python
2
star
20

concept-catalog

This is a proof-of-concept in defining a catalog of software concepts as described in "The Essence of Software (EOS)"
Alloy
2
star
21

ARMS

Another RESTful Mongo Service
Kotlin
2
star
22

pyBDB

pyBDB is a series of helper functions for using Berkeley DB (BDB) in python, on top of bsddb3, with support for secondary indices alongside basic key/value functions
Python
2
star
23

algorithms-unlocked-haskell

An implementation of the algorithms in "Algorithms Unlocked", in the Haskell programming language, as a learning exercise.
Haskell
1
star
24

sedgewick-algorithms-racket

Implementations of the algorithms defined the first edition of "Algorithms in C++" by Robert Sedgewick but in racket
Racket
1
star