anmolrajpal / vehicle-info Goto Github PK
View Code? Open in Web Editor NEWGet Vehicle Details from the number plate's number. [Only for India]
Get Vehicle Details from the number plate's number. [Only for India]
sudo python vehical-info.py CH03X0301
Resolving Captcha
('OCR Result => ', u'Egkm66')
Egkm66
{'Accept-Language': 'en-us', 'Accept-Encoding': 'gzip, deflate, br', 'Connection': 'keep-alive', 'X-Requested-With': 'XMLHttpRequest', 'Faces-Request': 'partial/ajax', 'Origin': 'https://vahan.nic.in', 'Accept': 'application/xml, text/xml, /; q=0.01', 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0 Safari/605.1.15', 'Host': 'vahan.nic.in', 'Referer': 'https://vahan.nic.in/nrservices/faces/user/searchstatus.xhtml', 'Cookie': 'JSESSIONID=D36F14BEFF434810D56AD3E56AC4E341.worker3; SERVERID_7081=vahanapi_7081; SERVERID_7082=nrservice_7082', 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'}
('\nCookie JSESSIONID => ', 'D36F14BEFF434810D56AD3E56AC4E341.worker3')
Data =>
{'javax.faces.ViewState': u'+TtSxQw1h8H0Du6qfwtBxLKvXSTecbGo/fvF7/0CrvafIVhekXl9JuW+R5HMVC/SKUlnRNtMIoeK8ko2/7YLmn0GO25lym+cIkiwukNDaYYk2P3bvnap3keajxC6doBM/A/eI++lwVE4e02tSa47LrweHQsxGX3DSaiuuU9Oe9Y+YohMusj/6rXeUtbelhhor9TNXBoYuM/ixGQazdnDMDwWawH5Q6BsrO64vbHcjfSP+9xHEfg/RpStgPUGHqDiHQfKx7S7soGBCYYyjSTPXp38m4FUiifeTSh8Nkd1lWAcofVPxWc5XUi/QlSgeRRt4L7vrEL11P1cIvvteguYMzP3N0/M3G35ynNJGQ9CmjcSiFuD0XKS32I3PrRzaI0MRPLpGyEokjAaxz2xRqzf8w+WHfIdQMU3Rw/OpmjInuLO3rRZIWbjwryJzmv9b+KHBAWiU7/zRb1EXoIDRdk3VAIScWSmgOmBzwdbUMFYY+apTjHZpcqNHUauGktrjQlb4O68IzHINVVjVxkiAsFRavVz9v5TlacgZG/Ky2dTslwKg607XgAiidqD9PIH+AycZ39lNaPU6P0gOMEVVFLjCUoeJaHGQqjKXQNMwyyzk3w/FVfXTRL450mUSpYHoH93WKVTRo1CGErEWAr4WPBBNtbjz41e3aJ9WTTwfQ/YtIJUgkLE7gXL4Ly7cAgl8I4PF8SVLVm5y0aAer3DpABdtfEtF5hacaeb34TAj7TGfkovjpGg2QdJU3IR/qJf00iI1FO3P5dp4siLxsTVNmtsI21+qoiS/2sRuxnrBqK4FK+UMtzPAqo90UXwtQW5EIx+6aQQZ+5XrjqJWpWaWXmVcVOZo88G2h9gt0hhvp1SxxBww7cmE3hOkbe5iFNMUSXHPbmy75be2fV5mw6MwQ/HGQtLaxsCeHzrCdyvp5DS6tc95uxY/Xj7kTNsf7CQQyb+vsPPG76vLv4zGxHqbOWQWG3BtTCa/AI2tOyvS18sE+ek8uPXiBWCDSjNbEIZFKwOUTrqwJx19vx/JTp7pnbg+WiklQrZuOV+tvYHzlZvV+sNI2ToM8G0n4L37cTjC8Ek67+LwLftnAOYYQa4PRJrT7WOOmflsfz8n34Q0AxamPflGw3rIKaLxPohZhkr8OiK', 'j_idt32': '', 'javax.faces.partial.render': 'rcDetailsPanel resultPanel userMessages capatcha txt_ALPHA_NUMERIC', 'txt_ALPHA_NUMERIC': u'Egkm66', 'javax.faces.partial.execute': '@ALL', 'javax.faces.source': u'j_idt45', 'masterLayout': 'masterLayout', 'javax.faces.partial.ajax': 'true', u'j_idt45': u'j_idt45', 'regn_no1_exact': 'CH03X0301'}
POST Request -> Response =>
<Response [200]>
Mark: postResponse soup =>
class javax.faces.el.EvaluationException
root@kali:~# python vehicle-info.py MH04GM9660
Traceback (most recent call last):
File "vehicle-info.py", line 1, in
import pytesseract
ImportError: No module named pytesseract
AFTER THIS INSTALLED - pip install pytesseract
NExt Error
root@kali:~# python vehicle-info.py MH04GM9660
Traceback (most recent call last):
File "vehicle-info.py", line 7, in
import cv2
ImportError: No module named cv2
pip install opencv-python
next this error came
root@kali:~# python vehicle-info.py MH04GM9660
Resolving Captcha
Traceback (most recent call last):
File "vehicle-info.py", line 54, in
captcha_text = resolve(img)
File "vehicle-info.py", line 41, in resolve
return pytesseract.image_to_string(enhancedImage)
File "/usr/local/lib/python2.7/dist-packages/pytesseract/pytesseract.py", line 345, in image_to_string
}output_type
File "/usr/local/lib/python2.7/dist-packages/pytesseract/pytesseract.py", line 344, in
Output.STRING: lambda: run_and_get_output(*args),
File "/usr/local/lib/python2.7/dist-packages/pytesseract/pytesseract.py", line 253, in run_and_get_output
run_tesseract(**kwargs)
File "/usr/local/lib/python2.7/dist-packages/pytesseract/pytesseract.py", line 225, in run_tesseract
raise TesseractNotFoundError()
pytesseract.pytesseract.TesseractNotFoundError: tesseract is not installed or it's not in your path
python vehicle-info.py MH04GM9660
Resolving Captcha
OCR Result => 1>8079
1>8079
{'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8', 'Accept': 'application/xml, text/xml, /; q=0.01', 'Accept-Language': 'en-us', 'Accept-Encoding': 'gzip, deflate, br', 'Host': 'vahan.nic.in', 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0 Safari/605.1.15', 'Cookie': 'JSESSIONID=2809630D4740C4C8B8BE82E1E6E665E1.worker3; SERVERID_7081=vahanapi_7081; SERVERID_7082=nrservice_7082', 'X-Requested-With': 'XMLHttpRequest', 'Faces-Request': 'partial/ajax', 'Origin': 'https://vahan.nic.in', 'Referer': 'https://vahan.nic.in/nrservices/faces/user/searchstatus.xhtml', 'Connection': 'keep-alive'}
Cookie JSESSIONID => 2809630D4740C4C8B8BE82E1E6E665E1.worker3
Data =>
{'javax.faces.partial.ajax': 'true', 'javax.faces.source': 'j_idt41', 'javax.faces.partial.execute': '@ALL', 'javax.faces.partial.render': 'rcDetailsPanel resultPanel userMessages capatcha txt_ALPHA_NUMERIC', 'j_idt41': 'j_idt41', 'masterLayout': 'masterLayout', 'regn_no1_exact': 'MH04GM9660', 'txt_ALPHA_NUMERIC': '1>8079', 'javax.faces.ViewState': 'z3XEYdmw3nN5xGLda7HZWeew1uhlgF33kNqm5eLBtiUDw0HIzvqEeFxY636J6fmU8n/pFeHW8rOiczIzcdV0RT0fb8IAHPuyJLNK1Pnc+NUAPvfqhRGfKUFFXJWFLTogIjiVn/PVCZvFcNJEmlGXcxZwgnLECnTRq92g8DmTUeCsv3fktQQ8xBx4YcgCb2lPp+HCy2MxVgDnwPqP6ylHHkATRhAkhDVwWpt8pzcRrAeszggrqu+8Gn55HKCN6LBeqJpm05Bju4DfreUckUl8YcpPTQ6jqwEPZVC2eexEjpyzUhGbjBhb505aQaOz8g7vQFSLpcF9Ri5ysQIZaJEoSX6h+k5BlLC+/0gXfAaa7zw0JOy9nz8QnBOULD7chhltjwu7QR514/TA14naux3rkC91fj++MKYJY7JdNdoqOXR2uelHvQ9kJXZ+kL3PKztVGrEH9nGWYZca9CA/jhgJbF9O9hznbl47N7RA9HD/t8T2EmqOp9FhClrc001NSET0y/Y+Y1Q3cz906qdjv8y8tce9WeHib8Y/DHYvbGdzUWw0yUyKc4xFs5ms16oLxXeeq33IO4r0+BJkaOkaXNlSD0zrjBUbxtu9L2aG3J9y7FWDj6dNiXueQeQd61bvpfQWfY/uwtiXnHLWTtiAjd+ErJkUNcsVdkyx6fIilO/USK0Do4a6Mlqw1kSU6Jozw+xBqnr4wpLNdNjFCZk8QAQb6TzvJ4vXhO9Z5Siuj1jq9wnwRoBAnOwAHY0Y9S6GuB3ZJrE37qNvAURIVhwSGhiRW/yFviVSDT0tG6fdfD9XuKV9Zldr4rmP3AFIN5ssja1nqcjMIzJ97VoedjQOabG/Sm/SBBKmoOhgavqwROLEJ48t76Ww1ktxHH8MfYL7E60UReiwJc1HksAKTtsKuD+Km67tg7Pjl7ApFUAnemm/M/N54MUd+BCcKBtCN9boJivFpsC26tfOVh1yp7RL+GbQkpceQo9yamxJ5E+pl2Wdds4rFKVOoDZ13XnN8kBzu0Dn+0/FbhWdiM/muvgm0k+4PKfdEoewnXdjD1F/IxadKyMU9Ri+yvGzuW/MS6C5p1DMz1VFuKh25uL20EqlPejNg/wqZ5fXvYc3gXIdcGDO4ifSLlHnCgAeIHDJNgKaR81C', 'j_idt32': ''}
POST Request -> Response =>
<Response [200]>
Mark: postResponse soup =>
class javax.faces.application.ViewExpiredException
I've made some changes to the script and managed to get this output.
<?xml version='1.0' encoding='UTF-8'?>
<partial-response id="j_id1">
<changes>
<update id="j_id1:javax.faces.ViewState:0">
<![CDATA[I+C/uUSsfjq/50iD/qFdaGKV5QxUvq66kdwJHXmkdUcJRinvwCMZreJ/wVSZsABo0TiGaeQ6EPLyRVgrSgXQ3TVkT9oIjOzkSPdoYPlRbX/uCmONUmyhxqaG0zcZS0dLY0QjEYbKlkXUuFfxgrRs/xLYz6q5TzqH6hXNQlmFYMN7f/hoy/RRl//vGSDveP9/KM1hxBd3A07rLHhr1Rit6T9g1TEuHaZ9CcFUegjaaeM44ZhOPZAfeqdDeGfNc+/+78sSaui+4PCQs1zJnn4f1h6q1yZWr2UtDHSTqGRnziKGGYgP+hQ2OWeLagoH3m1tM+pEOh/0jDAaMwledIgIeGMF7VAEIhBTWbFTisDWZ3p6eYOrxUxIYvs3qK4vnyctx5ObCqSQLK+JIECfPljJT/qfkKpB82Knxn7G1/oEFIHBXLqhnmGgK13NaqpndNpg+O0qkrncDJuFnSGf2gWZHPZQTX0Zep+NbDWje2CfffsCKTrMcNERHx3mUIP4gb0+T74EiWJ665MqOQ6nWTwQjsuxFCaOEGY8MhNyvEam068c4rdeN56reiMv3PA/Kahe9BSmcjditfCpDLdI08rdzb7snVJT68hrvpx+oGqsmCPd3suPse332hZ00Yy32E2rWmI6tart2R1C52F2OKpveWgC+on4UYBJmi1I6oauN9XjbMnt96ZYhpc5uWE6e8P/LQrXRYoJq2n19o2gJ4X+ybIeaGw6om2QPK5xhUGVabKIU9fSsEpQ1JB4utsOkv9qs5WgwSw9UqJy5nUTAYHsl8MzpsqnfcCnk0RG0ba6yjMTkWH/kbFqUCAmYkDtgQy2NxcLo9wU1JfxyJZWvBhBxtSLiB8qcQ7fXsf6OsEJ7FC1SSDAhdXytSBPnuxIA2cuzjX8UgQX5c2r+PJ6g0/M2geh2dNwAdjLytE7lxHrbJdtCxjzlIoLvhlANPf+3KO+Bz5/lKY0G14toimUhqv7p5zB53XBX+RHRMhbCnw4ErL9kTZSyNwa15MMvey4r20IT4R/FhQEG7uwMw50fpXJ8T8L3ZiofqEi5zMIFsB0mt5hQ3eb5wzO3CTbIoFCLBdJM3hkDwKm0dq7oCVhJth/hZ+HHzQEGVRJUrhn/2SuQm7KOhTeRE0VIbveig9Ng7il]]>
</update>
</changes>
</partial-response>
Any clue on whats happening?, let me know if we can work on it.
The target site contains captcha images which are very small and unclear, hence the script is not able to extract the correct data from the image.
Hi ,
I am getting empty result in "resultPanel". Please take n look and tell me what i have sent wrongly.
Resolving Captcha
OCR Result => 67V54N
67V54N
{'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8', 'Accept': 'application/xml, text/xml, /; q=0.01', 'Accept-Language': 'en-us', 'Accept-Encoding': 'gzip, deflate, br', 'Host': 'vahan.nic.in', 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0 Safari/605.1.15', 'Cookie': 'JSESSIONID=2387DFA6222C790EA4751ECE2AC139DE.worker3; SERVERID_7081=vahanapi_7081; SERVERID_7082=nrservice_7082', 'X-Requested-With': 'XMLHttpRequest', 'Faces-Request': 'partial/ajax', 'Origin': 'https://vahan.nic.in', 'Referer': 'https://vahan.nic.in/nrservices/faces/user/searchstatus.xhtml', 'Connection': 'keep-alive'}
Cookie JSESSIONID => 2387DFA6222C790EA4751ECE2AC139DE.worker3
Data =>
{'javax.faces.partial.ajax': 'true', 'javax.faces.source': 'j_idt45', 'javax.faces.partial.execute': '@ALL', 'javax.faces.partial.render': 'rcDetailsPanel resultPanel userMessages capatcha txt_ALPHA_NUMERIC', 'j_idt45': 'j_idt45', 'masterLayout': 'masterLayout', 'regn_no1_exact': 'MH04GM9660', 'txt_ALPHA_NUMERIC': '67V54N', 'javax.faces.ViewState': '8XV06TbojSxwZw+5LO/3tCklVXkwtMfIYvZcwqRPTZ0zP1GDIN97fswee0gF+Ll6KlafU69ZTYgpWUcoODJGMjg7ZM1niHca2PeE5LWZO/v2V34mKRvOG9JnoHhwJzBdAfQRTEbAk1jGRfKex6LeEjx0K3UClR4J6wKU51u5H1zU3xxXLwTfeDOcL84NoPP9S3+QyVuv33fwiupxycOF3tb0k1uNcpMt2dHRbLjnfT/a5786O5A/Sv/yZ4e1Kee/aTYUC6LmRAVXxoTjH5WAfoNQT4M2Vo5kpfDXFd8A+ahgzHc3V2njhkB+AB0FwXnRlLBgeofcD99q0tUvOVLWQWzIsarKkJ+xvmOFzIv2vA81Gyfw6Gryt7UQhtd2N/QLyKvDPXh8D2Aecw0ra4m6+oCTRlDCnInSBjmvROvqBw+WHGlcd8aMCxmes86yflLchdV5G3+i4HauCPAzfon4eyhduWik9dmmojG6GilIwsSPUZ3ZEtLWKPeVBSo/bpJgQ8FHTGRyR2CXoTEAmgR802ABks1kgnHgTMM7m02evu7XG/x+q3lcOik07MjhxQNWNEsDHLPD5yuqPlZsjP1MgvWPrCfLSzi9rF2SCApono+j5eoRoq7jVXaRXxEcPIpVsubq4UhSHNvQabse2uXSyngv5eGMCFpy1QvDk0hAzZohxBq60AlxXoQ09fm9obPIBjntzRNS1ygaTyh8S4HJCqMt1qzNPrqZ3KAB6fCzwsHhbE5LBNGieix+7BCSs//1WGaiemChO7289qWDz3CLJSTyQQ245GSf5gz3BGwLVa18l5UuTx00MeqD8EL4xnAOScTP3qYqXICkFQ3Zpl4expTV+NGffafxTDXW0QVPH7gSPnOXUjjj4h1TEkO3KQB4nWiVtJ5MrNlyBfrWfEZCwhsEkuCXyC8XoblHl2f8nNfOm+YpLBFQq5GGkN2B8ve4jbaHLyTyDNxKfwv9iaqGIgSsELf/3Yy3d8K6NDz1ethk3/+mpWDNjUFWJvkM6Wl+2kt8vhiuap5YHVMFPlNs/R8hMjcSyjUVnuPRcrHhhNZQaLqCDqWNIehz4wIJBKY0Q8UPxrHrwf2BoO5sJvwG9CYKFSKFvs2Cfuyiha2Ulmc8Bv6t52KeklK/xoddk7IV', 'j_idt36': ''}
POST Request -> Response =>
<Response [200]>
Mark: postResponse soup =>
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.