Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Elect 2012 Python Script
#!/usr/bin/env python
# this python script has been written by Saleh Alsanad, @bo9lo7
# as a proof of concept that given any name I can get the information
# of any registered guy in Kuwait, even by searching part of his name
# Date: 17 Jan 2012, saleh [AT] angelic [DOT] com
import urllib, httplib, sys, json
if __name__ == '__main__':
if len(sys.argv) < 2:
print 'Please provide some input!'
name = urllib.quote(" ".join(sys.argv[1:]))
conn = httplib.HTTPConnection('')
conn.request('GET', '/rest/citizin/fullname/%s?page=1&limit=30' % (name))
res = conn.getresponse()
jo = json.loads(
for i in jo:
print 'Area: %s' % (i['area'])
print 'Job: %s' % (i['job'])
print 'Circle: %s' % (i['daera'])
print 'Nationality Number: %s' % (i['natno'])
print 'Full Name: %s' % (i['fullname'])
print '-'
print 'Nobody Found!'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.