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.2.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.2-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: apikl-1.2.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.2.tar.gz
Algorithm Hash digest
SHA256 6a4290118357e247e3b7a2cfb3cd17e0588d08f0cf68cec625859d9f19e8359f
MD5 e6ea1bb75acac0b4ad5f4f12313b7b64
BLAKE2b-256 2e40cff8df614e6bec5384bb62fc1e95dd249db819c900b0138d3198e8f7b82d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: APIKL-1.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5f3e847635ee39409767537ca59b48820ed0b6a2d029bad5d9234637e41fccb4
MD5 e2bcf061d7a2866b41ebb6fb699b213e
BLAKE2b-256 ea8819332b0df6d2e18dedfa0131ba1d6f82146485f219bf96962b0f1ad2c186

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