Skip to main content

FraudRecord API client for Python

Install from PyPI:

$ pip install fraudrecord

If you will use the non-blocking API, include aio extra:

$ pip install fraudrecord[aio]

This package is maintained, stable, and perpetually tested. There will never be any breaking changes.

Example

Using the blocking API:

from fraudrecord.query import query as fraudrecord_query

if __name__ == "__main__":
    api_code = "a51ff508c331b7e9" # XXX: use your own
    print(fraudrecord_query(api_code, email="example@example.org"))

Using the non-blocking API:

import asyncio

from fraudrecord.query_aio import query as fraudrecord_query


async def main():
    api_code = "a51ff508c331b7e9" # XXX: use your own
    response = await fraudrecord_query(api_code, email="example@example.org")
    print(response)


if __name__ == "__main__":
    asyncio.run(main())

Using the CLI:

$ FRAUDRECORD_API_CODE=a51ff508c331b7e9 fraudrecord-query --email=example@example.org

Documentation

fraudrecord.hash

FraudRecord hashing scheme as described on https://fraudrecord.com/security/.

32,000 iterations of SHA-1. Case- and whitespace- insensitive: the input is lowercased and stripped of all whitespace. The hexadecimal digest of each iteration is fed into the next iteration. The input of each iteration is prefixed with fraudrecord-.

  • function hexdigest(s: str) -> str

    Returns the hexadecimal digest of the input string.

fraudrecord.model

Concepts of FraudRecord API.

  • type APICode

    API code. Lowercase alphanumeric string, 16 characters. Get one by signing up with FraudRecord and creating a reporter profile.

  • type Reliability

    Result reliability measurement. Decimal; either 0.0 (if there are no submitted reports) or between 1.0 and 10.0 with one digit after the decimal point.

  • type ReportCode

    Report code. Lowercase alphanumeric string, 16 characters. Used in order to fetch a human-readable report.

  • constant ENDPOINT: HttpUrl

    API endpoint URL.

  • function query_url(api_code: APICode, **data_vars: str) -> HttpUrl

    Given an API code and non-hashed data variables, returns the corresponding query API URL.

    Data variables are arbitrary bits of information about someone as described on https://fraudrecord.com/developers/ under "Data variables". Well-known data variable names are:

    • name: full name
    • company: company name
    • email: email address
    • address: postal address
    • phone: phone number
    • ip: registration IP address
    • hostname: server hostname
    • accountuser: hosting account username
    • accountpass: hosting account password
    • domain: domain name without www.
    • paypalemail: PayPal email address
    • ccname: name on the credit card
    • ccnumber: credit card number
  • function report_url(report_code: ReportCode) -> HttpUrl

    Given a report code, returns the corresponding human-readable report URL.

  • class QueryResponse

    Query API response.

    • field value: NonNegativeInt

      Total sum of points (severity scores) across all submitted reports.

    • field total_reports: NonNegativeInt

      Total number of the submitted reports.

    • field reliability: Reliability

      Result reliability measurement, out of possible 10.

    • field report_url: HttpUrl

      Human-readable report URL.

      Example: https://www.fraudrecord.com/api/?showreport=0f5dac5aab7762e6

    • class method parse(s: str) -> QueryResponse

      Parses the input string containing the query API HTTP response body into a QueryResponse object.

fraudrecord.query

Blocking FraudRecord query API client.

  • function query(api_code: APICode, **data_vars: str) -> QueryResponse

    Makes a query request to the API and returns a QueryResponse.

fraudrecord.query.cli

FraudRecord query API command-line interface.

Usage: fraudrecord-query --DATA_VARIABLE=VALUE ...

FRAUDRECORD_API_CODE environment variable must be set to a valid FraudRecord API code. Get one by signing up with FraudRecord and creating a reporter profile.

fraudrecord.query_aio

Non-blocking FraudRecord query API client.

Requires aio extra to be installed.

  • async function query(api_code: APICode, **data_vars: str) -> QueryResponse

    Makes a query request to the API and returns a QueryResponse.


Note that the report submission functionality isn't and won't be implemented. I believe that users of FraudRecord violate their clients' privacy, and I don't want to be a part of that.

While it's true that FraudRecord only stores hashes of (arbitrary, sensitive) data, if you do end up in the database, it lets anyone on the internet easily check if their guess of your personal email address, physical address, legal name, credit card number, IP address, and such is correct or not as long as they know any single one of these bits of information in advance. There is no defined limit to the number of guesses they could make.

Moreover, reports themselves are presented in cleartext and frequently contain some sensitive data anyway. Here you can see various FraudRecord users posting their (ostensibly fraudulent) clients' full names, addresses, and even, in one case, a photo of the driver's license: [1], [2], [3]. I wish I was making it up.

This API client is intended for privacy research only.

Metadata

Release files for fraudrecord 2022.10.22

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fraudrecord 2022.10.22
File Size Uploaded Provenance
fraudrecord-2022.10.22.tar.gz 8.1 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for fraudrecord 2022.10.22
File Interpreter ABI Platform
fraudrecord-2022.10.22-py3-none-any.whl Python 3 none any Details

Total release size: 17.5 kB

Release files / fraudrecord-2022.10.22.tar.gz

Download URL fraudrecord-2022.10.22.tar.gz
Size 8.1 kB
Tags Source
SHA-256 checksum
How to use checksums
d9213780721a8ff9bcb7ef402f6ca79dffe851964fe04980f10569d1cee634da
BLAKE2b-256 checksum
How to use checksums
07f223c8897c21686350ae9f3f41aaea601288c79fb7fb26598ced4664831659
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.2.2 CPython/3.10.8 Linux/5.19.16-hardened1-1-hardened

Release files / fraudrecord-2022.10.22-py3-none-any.whl

Download URL fraudrecord-2022.10.22-py3-none-any.whl
Size 9.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0ffdbd83df45b8ad1cff3414c2dbd50811ddb6f3baf6dd9191a077eaa64273a8
BLAKE2b-256 checksum
How to use checksums
a6c2a7927b67884f53d6938dceb344ab162a6d95cec9179df7ea481b7b2e9b76
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.2.2 CPython/3.10.8 Linux/5.19.16-hardened1-1-hardened

Security for fraudrecord 2022.10.22

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

2022.10.22 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page