Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

scraptcha

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

scraptcha

Scraptcha provides a method of user validation (not a bot) for submission forms.

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

Scraptcha

Scraptcha provides a method of user validation for submission forms.

var express = require('express');
var scraptcha = require('scraptcha');

 // Scraptcha images source information.   
var imageInformation = {path:          __dirname + "/images/green/",
                        filePrefix:    "i_cha_",
                        fileExtension: ".gif"};

// Initialize the Scraptcha data.
scraptcha.initialize(imageInformation);

// Static file server.
var server = new express();
server.use(express.static(__dirname));
server.listen(8800);
console.log("Server is listening on http://localhost:8800");

// Gets the scratcha code sequence. The "id" compensates for a browser update restriction. 
server.get('/scraptcha/:id', function (req, res) {
    res.send(scraptcha.getHTMLSnippet());
});

// Returns validation response.
server.get('/scraptchaValidate/:data', function (req, res) {
    res.send(scraptcha.verify(req));    
});

Installation

$ npm install scraptcha

Features

  • Image reference code entry
  • Base64 image conversion
  • Random code digit sizes
  • Image digit warp
  • Image order scrambling
  • Image code verification

Quick Start

Reference files are located in the 'test' folder. Start the example server by navigating to the ./node_modules/scraptcha directory from the command prompt and perform the command "npm start" or "node ./test/file-server.js".

See the 'submit: function(){...}' in the 'main.js' file for end user form adaptation.

Use your own image base by creating a image cache and then edit 'imageInformation{...}' from the above example. Update 'scraptchaCode[...]' in the package 'index.js' file if the code sequence is different.

License

MIT

Keywords

FAQs

Package last updated on 25 Jul 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc