Skip to main content

Lookup numbers in NANPA database

Project description

nanpa_lookup

Look up callers in the North America Number Plan Adminstrator (NANPA) database. Useful for identifying source of robocalls.

Quickstart

$ pip install nanpa_lookup

Query the database for a number:

$ nanpa_lookup -n 9072001234 --field company
GCI COMMUNICATION CORP. DBA GENERAL COMMUNICATION

Or provide a file containing phone numbers:

$ nanpa_lookup -f numbers.txt --field company
GCI COMMUNICATION CORP. DBA GENERAL COMMUNICATION
CELLCO PARTNERSHIP DBA VERIZON WIRELESS - NC
ONVOY, LLC - TN
GCI COMMUNICATION CORP. DBA GENERAL COMMUNICATION

Pull Logs from Android

Grab call log for last 30 days from a rooted Android phone via adb:

$ nanpa_lookup -a 30 --field company | sort | uniq -c | sort -n
      3 ONVOY, LLC - TN
      3 PEERLESS NETWORK OF TENNESSEE,
      4 BELLSOUTH TELECOMM INC DBA SOU
      4 TELEPORT COMMUNICATIONS AMERIC
      5 NEW CINGULAR WIRELESS PCS, LLC
      5 ONVOY, LLC
      6 LEVEL 3 COMMUNICATIONS, LLC - 
      9 No matches found
     11 ILLINOIS BELL TEL CO
     27 BRIGHTLINK COMMUNICATIONS, LLC

Usage

usage: nanpa_lookup [-h] [-n N] [-f F] [-a A] [--field FIELD] [--query QUERY]
                    [--database DATABASE]

Look up number in NANPA database

options:
  -h, --help           show this help message and exit
  -n N                 number
  -f F                 file containing list of numbers
  -a A                 pull numbers from ADB device
  --field FIELD        print out specific field (company, npanxxy, type, ocn, email)
  --query QUERY        make arbitrary SQL query
  --database DATABASE  numbers database

Caveats

This does not work for robocalls which spoof the origin number, only for spammers making use of legitimate numbers from VOIP companies. This may eventually be addressed by STIR/SHAKEN.

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

nanpa_lookup-1.0.0.tar.gz (20.5 MB view details)

Uploaded Source

Built Distribution

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

nanpa_lookup-1.0.0-py3-none-any.whl (16.2 kB view details)

Uploaded Python 3

File details

Details for the file nanpa_lookup-1.0.0.tar.gz.

File metadata

  • Download URL: nanpa_lookup-1.0.0.tar.gz
  • Upload date:
  • Size: 20.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.10.5

File hashes

Hashes for nanpa_lookup-1.0.0.tar.gz
Algorithm Hash digest
SHA256 3be9fa3bebf6426d7cc2a87db90c693494b8aa7d01e3917364bf9bcf6affbb50
MD5 a5b454efa91ae1c58af8622366499dad
BLAKE2b-256 55853023782dac6a61c2a82c036e876cc7d838f5d5c82c2663e4020bb357a7af

See more details on using hashes here.

File details

Details for the file nanpa_lookup-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: nanpa_lookup-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 16.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.10.5

File hashes

Hashes for nanpa_lookup-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ee30337df1b57f613bdc21e311c75b9a397235cb25f94928d55e08d4b45d3bdd
MD5 19a17a099efdc1a89c5f5fe2bae36cd7
BLAKE2b-256 d6b15ba2b7e47dc9cf91cf8ac9dafe6964a33a956cc645c6a487010d8f725176

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