Skip to content

JonnyBytesMe/imei-validator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

IMEI Validator & Info Lookup Tool

WARNING: EDUCATIONAL AND SCREENING TOOL ONLY

CRITICAL DISCLAIMER: This tool is designed for EDUCATIONAL PURPOSES and PRELIMINARY SCREENING only. ALL RESULTS must be manually validated through authorized official channels before use in any legal proceedings, evidence collection, or official investigations.

This is an educational demonstration tool for validating and analyzing International Mobile Equipment Identity (IMEI) numbers. It is designed for learning purposes, portfolio demonstrations, and preliminary screening that requires subsequent verification through official channels.

πŸ” Overview

The IMEI Validator provides educational analysis and validation of IMEI numbers using industry-standard algorithms for learning purposes. It supports both interactive analysis and batch processing for educational demonstrations and preliminary screening that must be verified through official channels.

Key Features

  • βœ… Luhn Algorithm Validation: Educational demonstration of standard mathematical validation
  • πŸ“± Device Intelligence: Limited TAC database lookup for educational purposes
  • 🏒 Reporting Body Analysis: Educational RBI code analysis for learning
  • πŸ“Š Batch Processing: Process multiple IMEIs from files with CSV export
  • πŸ“ Educational Reporting: Learning-focused reports with timestamps and methodology
  • πŸ–₯️ Command-Line Interface: Scriptable operations for educational automation
  • πŸ“‹ Audit Trail: Basic logging for educational compliance demonstration

VERIFICATION REQUIREMENTS

Before using results for any official purpose, verify through:

  • Official GSMA TAC database
  • Carrier verification systems
  • Manufacturer databases
  • Law enforcement resources
  • Certified forensic tools

πŸš€ Installation

Prerequisites

  • Python 3.7 or higher
  • No external dependencies required (uses Python standard library)

Quick Start

  1. Clone or download the tool:

    git clone <repository-url>
    cd imei_validator
  2. Run the tool (interactive mode):

    python imei_validator.py
  3. Command-line usage:

    # Single IMEI validation
    python imei_validator.py --imei 357561856136304
    
    # Batch processing
    python imei_validator.py --batch input_imeis.txt

πŸ“– IMEI Structure Explained

What is an IMEI?

The International Mobile Equipment Identity (IMEI) is a unique identifier for mobile devices. It consists of:

IMEI Structure: TAC(8) + SNR(6) + CD(1) = 15 digits total
Example: 357561856136304

Component Breakdown

  1. TAC (Type Allocation Code) - 8 digits

    • First 8 digits identify the device type
    • Assigned by GSMA to manufacturers
    • Example: 35756185 (Google Pixel 8 Pro)
  2. SNR (Serial Number Range) - 6 digits

    • Unique serial number within the TAC
    • Assigned by manufacturer
    • Example: 613630
  3. Check Digit (CD) - 1 digit

    • Calculated using Luhn algorithm
    • Validates IMEI mathematical integrity
    • Example: 4

Reporting Body Identifier (RBI)

The first 2 digits of the TAC indicate the certification authority:

Code Authority Region
01 PTCRB USA
35 BABT United Kingdom
44 ICASA South Africa
49 BNetzA Germany
86 TAF China
99 GCF Global

πŸ”¬ Luhn Algorithm Methodology

The tool implements the industry-standard Luhn algorithm for IMEI validation:

Algorithm Steps

  1. Take first 14 digits (excluding check digit)
  2. Double every second digit from left to right (positions 1,3,5,7,9,11,13)
  3. Subtract 9 from any doubled digit > 9
  4. Sum all digits
  5. Calculate check digit: (10 - (sum % 10)) % 10

Example Calculation

IMEI: 357561856136304
Step 1: Use first 14 digits: 35756185613630
Step 2: Double positions 1,3,5,7,9,11,13: 3,10,7,10,6,2,8,10,6,2,3,6,3,0
Step 3: Subtract 9 from >9: 3,1,7,1,6,2,8,1,6,2,3,6,3,0
Step 4: Sum: 3+1+7+1+6+2+8+1+6+2+3+6+3+0 = 49
Step 5: Check digit: (10 - (49 % 10)) % 10 = 4 βœ“

πŸ’» Usage Guide

Interactive Mode

Run without arguments for the full interactive experience:

python imei_validator.py

Menu Options:

  1. Validate single IMEI - Comprehensive forensic analysis
  2. View session summary - Statistics and device breakdown
  3. Exit program - Generate final session report

Command-Line Interface

Single IMEI Validation

# Verbose output
python imei_validator.py --imei 357561856136304

# Quiet mode (for scripting)
python imei_validator.py --quiet --imei 357561856136304

Batch Processing

  1. Create input file (input_imeis.txt):

    357561856136304
    123456789012345
    35404206123456789
    
  2. Process batch:

    python imei_validator.py --batch input_imeis.txt
  3. Output files generated:

    • batch_reports/batch_imei_analysis_YYYYMMDD_HHMMSS.csv
    • batch_reports/batch_imei_analysis_YYYYMMDD_HHMMSS_summary.txt

CSV Export Format

Batch processing generates CSV files with these columns:

Column Description
IMEI Validated IMEI number
Status VERIFIED/COMPROMISED/INCOMPLETE/FORMAT_ERROR
Manufacturer Device manufacturer
Model Device model
Country Manufacturing country
Luhn_Valid TRUE/FALSE
RBI_Code Reporting body identifier
Reporting_Body Certification authority
Calculated_Check_Digit Expected check digit
Error_Details Validation error messages

πŸ” Educational Applications

Learning and Demonstration Use Cases

  1. Educational Device Analysis

    • Learn device identification processes
    • Understand IMEI structure and validation
    • Practice preliminary screening techniques
    • ⚠️ Results must be verified through official channels
  2. Portfolio Demonstration

    • Showcase understanding of mobile forensics concepts
    • Demonstrate technical skills in IMEI analysis
    • Practice tool development for forensic applications
    • ⚠️ Not for actual evidence collection
  3. Preliminary Screening

    • Initial assessment before official investigation
    • Educational inventory demonstrations
    • Learning bulk validation processes
    • ⚠️ All findings require official verification

Educational Status Classifications

The tool provides learning-focused status classifications:

  • VERIFIED: Mathematically valid for educational purposes - VERIFY OFFICIALLY
  • COMPROMISED: Failed validation - REQUIRES OFFICIAL INVESTIGATION
  • INCOMPLETE: Missing check digit - VERIFY THROUGH OFFICIAL CHANNELS

IMPORTANT: These classifications are for educational purposes only and must be verified through authorized official channels before any legal, investigative, or evidence use.

Audit Trail

All operations are logged with:

  • Timestamps (UTC)
  • Session tracking
  • Validation results
  • Device identification
  • Error conditions

πŸ“Š TAC Database

The tool includes a curated database of 34+ verified TACs covering:

Supported Manufacturers

  • Apple: iPhone 12-15 series
  • Samsung: Galaxy S21-S24, Note 20, A52
  • Google: Pixel 6-8 series
  • Huawei: P40/P50/Mate 40 Pro
  • Nokia: 8.3 5G, XR20
  • Sony: Xperia 1/5 III
  • LG: V60 ThinQ, Wing
  • OnePlus: OnePlus 9/10 Pro
  • Xiaomi: Mi 11/12, Redmi Note 11

Note: Production forensic tools use comprehensive GSMA TAC databases with 500,000+ entries

πŸ›‘οΈ Professional Compliance

Forensic Standards

  • Chain of Custody: Complete audit logging
  • Reproducibility: Documented methodology
  • Court Admissibility: Professional reporting format
  • Industry Standards: GSMA-compliant algorithms

Data Integrity

  • No External Dependencies: Self-contained validation
  • Deterministic Results: Consistent output across runs
  • Error Handling: Graceful failure modes
  • Input Validation: Comprehensive format checking

πŸ“ Output Files

Directory Structure

imei_validator/
β”œβ”€β”€ imei_validator.py          # Main application
β”œβ”€β”€ README.md                  # This documentation
β”œβ”€β”€ forensic_logs/            # Session audit logs
β”‚   └── imei_validation_YYYYMMDD_HHMMSS.log
β”œβ”€β”€ forensic_reports/         # Individual analysis reports
β”‚   └── IMEI_Analysis_[IMEI]_YYYYMMDD_HHMMSS.txt
└── batch_reports/           # Batch processing results
    β”œβ”€β”€ batch_imei_analysis_YYYYMMDD_HHMMSS.csv
    └── batch_imei_analysis_YYYYMMDD_HHMMSS_summary.txt

Report Types

  1. Individual Reports: Detailed forensic analysis per IMEI
  2. Batch Summaries: Statistics and device breakdowns
  3. Session Logs: Complete audit trail
  4. CSV Exports: Spreadsheet-compatible data

πŸ”§ Advanced Features

Error Handling

The tool handles various input formats and error conditions:

  • Format Tolerance: Spaces, dashes, dots, brackets
  • Pattern Detection: Invalid sequences (all zeros, repeating digits)
  • Graceful Degradation: Partial analysis when possible
  • Detailed Errors: Specific validation failure messages

Performance

  • Batch Processing: Efficient handling of large datasets
  • Memory Management: Streaming file processing
  • Progress Tracking: Real-time batch progress indicators
  • Resource Cleanup: Automatic temporary file management

🀝 Contributing

This tool is designed for professional forensic use. For bug reports or feature requests:

  1. Document the Issue: Include IMEI examples (if safe to share)
  2. Provide Context: Forensic use case and requirements
  3. Test Environment: Python version and operating system

βš–οΈ Legal Notice

Important: This tool is intended for legitimate forensic and security purposes only. Users are responsible for:

  • Compliance with local privacy laws
  • Proper authorization for IMEI analysis
  • Appropriate handling of sensitive data
  • Following organizational security policies

πŸ“œ License

Professional Digital Forensics Tool Copyright (c) 2024 Digital Forensics Professional

This software is provided for educational and professional forensic use.


πŸ” IMEI Validator v2.0 - Professional Digital Forensics Tool

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages