Wednesday 15 July 2015

Ehaj.haj.gov.sa whats new? How attach passport readers?


Wow, new season new surprise.

Add Hajj Information


How this page works?

Easy. Many passport readers enter data via the keyboard (simulate keyboard typing).

Then you try to start typing something you will see changes in blue box with "Ready for scan" text.
This mean js script start to parse input data. After it js script encrypt mrz data by RSA with public key, divide it by 3 path and send to server. They obfuscate encrypting script  but no problem to read code. They use  open encrypting js library  and add own ~170 lines of code at the end of file.

How you can test it without passport reader?

1) Install it http://www.autohotkey.com
2) Create mrz.ahk file with this content
Sleep 4000
Send  P<USAOBAMA<<BARAK<<<<<<<<<<<<<<<<<<<<<<<<<<<{enter}01111111<5USA6001010M1001015<<<<<<<<<<<<<<08;
3) Turn keyboard lang to english.
4)  Start mrz.ahk and quickly move to the front your browser with page like on upper picture. Click on page to set window focus. Wait.


Props:
  • They allow upload photograph more then 15kb! Below 5kb you can get error.
  • They did pilgrims form simpler
  • They want to change something with hajj process
  • They have a ticket system
 This is this is a small holiday :-)

Cons:
  • They did more steps for pilgrim submiting
  • They did slow speed portal
  • They did portal with often 500 errors
  • They still use old technology and patterns with mojarra framework (java)
  • And the most important  - they do not want hear about API for submitting!
    What they think? Manually submitting provide less errors? This is not right. No one interesting for dong errors.
  • There is ActiveX for reading images from e-passports? Why we need upload images 1000 times?

For Access-is OCR640 
For 3M AT 9000  MK2