Skip to main content

G-Osintlib

This Python script contains several functions designed to validate and retrieve detailed information for various data types such as phone numbers, IP addresses, credit cards, email addresses, VINs, ISINs, ISBNs, and IP cameras. These functions utilize third-party APIs and libraries to fetch relevant data, enabling quick and efficient data lookups.


Table of Contents

  1. Functions Overview
  2. Function Details
  3. Requirements
  4. Usage
  5. Error Handling
  6. License
  7. Credits

Functions Overview

The script includes the following functions:

  • phone(number): Validates and retrieves information about a phone number.
  • ipscan(ip, fast=False): Performs an IP scan and retrieves geolocation and open port information.
  • creditcard(card): Validates and retrieves information about a credit card.
  • email(email): Validates an email address and checks for a valid mail server.
  • vinscan(vin): Retrieves information about a vehicle using its VIN (Vehicle Identification Number).
  • isin(isin): Validates and retrieves information about an ISIN (International Securities Identification Number).
  • isbn(isbn): Validates and retrieves information about a book using its ISBN.
  • ipcams(countrycode): Retrieves IP addresses of public IP cameras in a given country.
  • ipcamscode(): Displays a list of countries and the number of webcams available in each country.

Function Details

phone(number)

  • Description: Validates a phone number and retrieves details such as country, carrier, time zone, and international format.
  • Input: A phone number as a string.
  • Output: Displays phone number information including country, carrier, and time zone.

ipscan(ip, fast=False)

  • Description: Scans an IP address, retrieves location information, and performs port scanning (optional).
  • Input: IP address (string), fast (boolean) to skip port scanning.
  • Output: Prints IP information such as location, organization, and open ports (if fast is set to False).

creditcard(card)

  • Description: Validates a credit card number using the Luhn algorithm and retrieves card information from BIN (Bank Identification Number).
  • Input: A credit card number as a string.
  • Output: Prints card details such as type, brand, issuer, country, and currency.

email(email)

  • Description: Validates the format of an email address and checks for a valid mail server (MX records).
  • Input: An email address as a string.
  • Output: Prints information about the email's domain and mail server validity.

vinscan(vin)

  • Description: Retrieves vehicle information based on the VIN (Vehicle Identification Number).
  • Input: A VIN as a string.
  • Output: Prints detailed information about the vehicle, such as make, model, and year.

isin(isin)

  • Description: Validates the format of an ISIN (International Securities Identification Number) and extracts its components.
  • Input: An ISIN number as a string.
  • Output: Prints the country code, security identifier, and checksum of the ISIN.

isbn(isbn)

  • Description: Validates the format of an ISBN and retrieves information about the book.
  • Input: An ISBN number as a string (either ISBN-10 or ISBN-13).
  • Output: Prints information about the book based on the ISBN format.

ipcams(countrycode)

  • Description: Retrieves the IP addresses of publicly available IP cameras from a specific country.
  • Input: Country code (ISO 3166-1 alpha-2).
  • Output: Prints a list of IP camera IP addresses from the country specified and saves the results to a .txt file.

ipcamscode()

  • Description: Displays a list of countries and the number of webcams available in each country.
  • Input: None.
  • Output: Prints the country code, country name, and the number of webcams in each country.

Requirements

To run this script, you will need to install the following Python packages:

  • phonenumbers: For phone number validation and information.
  • requests: For making HTTP requests to external APIs.
  • socket: For resolving IP addresses.
  • dns.resolver: For resolving MX records for email validation.
  • re: For regular expressions to validate ISIN, ISBN, and email formats.
  • concurrent.futures: For multi-threaded port scanning.
  • colorama: For color formatting in the terminal.

You can install the required packages using the following command:

pip install phonenumbers requests dnspython colorama

Usage

To use the script, simply call one of the functions with the appropriate input. For example:

Example 1: Phone Number

phone("+14155552671")

Example 2: IP Scan

ipscan("8.8.8.8", fast=True)

Example 3: Credit Card

creditcard("4111111111111111")

Example 4: Email

email("example@example.com")

Example 5: VIN Scan

vinscan("1HGCM82633A123456")

Example 6: ISIN

isin("US0378331005")

Example 7: ISBN

isbn("9780132350884")

Example 8: IP Cameras in a Country

ipcams("US")

Example 9: List of Countries and Webcams

ipcamscode()

Error Handling

The functions handle various exceptions gracefully, including:

  • Invalid Format: If the input does not match the expected format (e.g., a malformed phone number, VIN, or credit card), an error message will be shown.
  • Network Issues: If there is a problem with the external API or network, the script will output a relevant error message.
  • Invalid Data: If the data retrieved from an API is invalid or incomplete, the script will print an error message, prompting the user to try again or verify the data.

License

This script is released under the MIT License. Feel free to modify and distribute it as needed.


Credits

This script was created by LemonPower21 (also known as Francesco Vito Giotta).


Metadata

Release files for gosintlib 4.0

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

Source distribution (sdist)

Source distribution for gosintlib 4.0
File Size Uploaded Provenance Actions
gosintlib-4.0.tar.gz 7.2 kB Without provenance Details for gosintlib-4.0.tar.gz

Built distribution (wheel)

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

Total release size: 13.5 kB

Release files / gosintlib-4.0.tar.gz

Download URL gosintlib-4.0.tar.gz
Size 7.2 kB
Tags Source
SHA-256 checksum
How to use checksums
e59fc44b2107a5dde056cc95a04e7664d6894c9a3f138f49f37894dde5d76c19
BLAKE2b-256 checksum
How to use checksums
ac429ad2cede9d60b71efb0bc6ce267d2ef0828815d9f3e73c97d7728c039e08
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.13.0

Release files / gosintlib-4.0-py3-none-any.whl

Download URL gosintlib-4.0-py3-none-any.whl
Size 6.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
900268342368cb6c8392df08f166681fad9f60fb82ab9cb3049d37e005473a78
BLAKE2b-256 checksum
How to use checksums
20a10d21e12651c043f93346481c08b43c4f5292c5d1d2cbb8d9058b1b69a12c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.13.0

Security for gosintlib 4.0

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.

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