Skip to content

Latest commit

 

History

History
88 lines (53 loc) · 4.36 KB

readme_en.md

File metadata and controls

88 lines (53 loc) · 4.36 KB

cnIDNumberGuesser

GitHub release GitHub release date GitHub last commit GitHub download latest GitHub download total
GitHub stars GitHub forks GitHub issues GitHub issues closed

This document is in English.For Simplified Chinese? Please click here.

Introduction

This project is designed to guess and complete Chinese mainland ID numbers. It is useful when you don't remember part of your ID number or if a part of the document number is missing. The tool is available in both Python and Web versions. You can choose to run it locally with Python or deploy it on a server and implement it through front-end JS code. Note: This project is intended only for academic research purposes. Please comply with local laws and do not use it for illegal purposes. The author is not responsible for any misuse or consequences thereof.

NOTE: The C/C++ version is temporarily unavailable. If you are good at C/C++, you can submit a PR to help us improve it together.

Deployment and Usage

Python

  1. Download guessID.py and citycodes.txt and place them in the same folder. You can also download the entire repository:
git clone https://github.com/Gloridust/cnIDNumberGuesser
cd cnIDNumberGuesser
  1. Install dependencies
pip install psutil

Ensure you are using the pip version compatible with your Python. If working in multiple Python environments, you might need to use pip3 or a specific command like python -m pip install.

  1. Run the program:
python3 guessID.py
  1. Usage: Input an 18-digit ID number, replacing missing parts with asterisks "*".

Python run example

  1. After the program ends, check the results in resultID.txt. Please delete the original resultID.txt file before using it again.

Python result example

Web

  1. For web deployment, you can Fork this project, then select a branch and bind a domain on Github Page for immediate use.

Web page example

  1. To deploy on your own server, download index.html, script.js, style.css, and citycodes.txt and place them in the same folder. You can also download the entire repository:
git clone https://github.com/Gloridust/cnIDNumberGuesser
cd cnIDNumberGuesser
  1. After deployment, visit index.html to start using. Similarly, input an 18-digit ID number, replacing missing parts with asterisks "*".

Web run example

  1. Click “GuessID” to run. Once the result is obtained, it will be displayed below. You can also click “Download” to save the result in 'guessedIDs.txt' and download it to your device.

Web result example

Privacy Statement

We fully respect user privacy. Whether it's the Python or Web version, all data is processed locally on the user's end and no data is uploaded.

Similarly, we hope users respect others' privacy and do not use this for illegal purposes; please comply with local laws and do not use it for illegal purposes. The author is not responsible for any misuse or consequences thereof.

Acknowledgements

The Python version of this project and the citycodes.txt file were inspired by content from https://github.com/wlkjyh/completion_idcard. Many thanks to the author for their open source contribution!

Open Source License

MIT