I'm interested in reproducing a particular python script.
I have a friend who was accessing an ldap database, without authentication. There was a particular field of interest, we'll call it nin (an integer) for reference, and this field wasn't accessible without proper authentication. However, my friend managed to access this field through some sort of binary search (rather than just looping through integers) on the data; he would check the first digit, check if it was greater or less than the starting value, he would augment that until it returned a true value indicating existence, adding digits and continuing checking until he found the exact value of the integer nin. 
Any ideas on how he went about this? I've access to a similarly set up database.
Your best bet would be to get authorization to access that field.  You are circumventing the security of the database otherwise.
Binary search of unaccesible data field in ldap from python