Skip to content

Simple Signature to secure your website's traffic with backend validation api

Notifications You must be signed in to change notification settings

xtekky/Simple-Sig

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

Simple-Sig

Simple Signature to secure your website's traffic with backend validation api

Usage example

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js"></script>
    <script src="https://cdn.jsdelivr.net/gh/xtekky/Simple-Sig/src/sig.js"></script>
    <title>sig demo</title>
  </head>
  <body>
    <button type="button" id="test">test</button>
    <script src="/assets/js/index.js"></script>
  </body>
</html>
$('#test').click(function() {
    data = 'username=grgrg&password=1234'

    fetch("/test", {
        headers: {
            ...x(data),
        },
        body   : data,
        method : "POST",
        mode   : "cors",
  });
});

Backend (verification api)

curl -X POST -H 'Accept: */*' -H 'Accept-Encoding: gzip, deflate' -H 'Connection: keep-alive' -H 'Content-Length: 156' -H 'Content-Type: application/json' -H 'User-Agent: python-requests/2.28.1' -d '{"x-kspx-00": "x-kspx-00 HEADER", "x-tx-00": "x-tx-00 HEADER", "data": "POST DATA"}' https://sig.xtekky.repl.co/verify

  • response :
{
  "is_valid": True/False,
  "tts": time elapsed since sig creation (you can then define a limit so sig cant be used again)
}

Heavy obfuscation - fast execution

image