Skip to main content

This module allows you to find API keys and passwords in your project.

Project description

API Key Locator (APIKL)

What is this?

This module allows you to find API keys and passwords in your project.
In short, it uses regular expressions to find suspicious strings and Shannon’s entropy prove that they are API keys.
This module successfully finds not only API keys but also passwords.
It doesn't use any web services so your API keys are in safe, you may check all the code in my GitHub.

Quick Guide

The module is based on the following structure:

files = ['...']
probability = 6
locator = APIKL(files, probability)
locator.find_keys()

files is for files you want to check (blank to check the current folder)
probability defines level of keys to show (from 1 to 10, 5 is default)


Using

Using the library is as simple and convenient as possible:

First, import everything from the library (use the from ... import * construct).

Examples of all operations:

Finding keys in files_to_check find_keys(files_to_check: list)
If files_to_check is blank, it will check for keys in locator.files_to_check which is defined in constructor

files = ['path/to/file1', 'path/to/file2']
locator.find_keys(files)

Troubleshooting

This module doesn't pose much of a problem since it's quite simple. But there's one issue that cannot be fixed.

APIKL(['C:\Users\User\Desktop\database.xml'], 6).find_keys()

You may get SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UXXXXXXXX escape. In this case just place "r" before your path to replace it with raw string. Example:

APIKL([r'C:\Users\User\Desktop\database.xml'], 6).find_keys()

Developer

My site: https://github.com/VitalyKalinsky

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

apikl-1.1.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

APIKL-1.1-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file apikl-1.1.tar.gz.

File metadata

  • Download URL: apikl-1.1.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.2

File hashes

Hashes for apikl-1.1.tar.gz
Algorithm Hash digest
SHA256 1638abcb4a6a9b4d5d47e2d0178d460d74304e9d323eb5f4adb3bec4d0aa8514
MD5 a71c555f68b61a5bf9726b03a40b9e2f
BLAKE2b-256 64d4d94b0aa678be834149206342d6233014b3a24b606447000e3f3ff6c803a7

See more details on using hashes here.

File details

Details for the file APIKL-1.1-py3-none-any.whl.

File metadata

  • Download URL: APIKL-1.1-py3-none-any.whl
  • Upload date:
  • Size: 5.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.2

File hashes

Hashes for APIKL-1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 72060fd8693e0d1992a4e13b5005f0c96e2a628113069a09cc331991a31daa9e
MD5 6ee76fa7d80bc97eec942b28b909f5e4
BLAKE2b-256 298d3badee1bf12896019eef251547a9c23984f94473d48c0725a083c2f43df6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page