Skip to content
/ nic-exec Public

Sri Lankan National Identity Card Data Extractor

License

Notifications You must be signed in to change notification settings

nzx9/nic-exec

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

nic-exec

Sri Lankan National Identity Card Data Extractor

This script works for both old(9 digits + v/x) and new(12 digits) NIC numbers

USAGE

use python3

In Unix (Linux/ Mac)

python3 nic.py nic_number

or

chmod +x nic.py
./nic.py nic_number

In Windows

python nic.py nic_number

MORE INFO

10 Character NIC | Ex: 987654321V

  • First 2 characters(98) give the last two digits of birth year(1900 + 98 = 1998)
  • Next 3(765) characters give information about gender and birth month and day
  • If value of 3rd character to 5th character is higher than 500 that means gender is female, if it less than 500 means gender is male
  • If gender is female, have to substract 500 from 3rd character to 5th character(765 - 500), then take the month and day accoding to the number of days in each month(January: 31, February: 29, March: 31, April: 30, ...)

12 Character NIC | Ex: 199876543210

  • First 4 characters(1998) give the birth year
  • Next 3(765) characters give information about gender and birth month and day
  • If value of 5th character to 8th character(765) is higher than 500 that means gender is female, if it less than 500 means gender is male
  • If gender is female, have to substract 500 from value of 5th character to 8th chatacter(765 - 500), then take the month and day accoding to the number of days in each month(January: 31, February: 29, March: 31, April: 30, ...)

Other Implementations

For c++ implementation, please goto krypto-i9/SL-NIC-Decoder

About

Sri Lankan National Identity Card Data Extractor

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages