This, was being searched for by me for ages.. finally was able to get hold of some older code and play around with stack values, i will be adding a targets base to it soon, but for now, enjoy, thx to gunslinger for this, it was really needed,and, since i dont cover phone shit atall sofar, please readon.. this rocks, it really does,and, this is from personal use with this device the E585 only, it is a very very good thing to get to use if you can…for me, it was 28bux and, im unlocked 
Enjoy
xd @ #haxnet / e fnet
DONT become a victim!
#!/usr/bin/python
# Gunslinger <yudha.gunslinger@gmail.com> http://bit.ly/c0debreaker
import hashlib, string
__auth__ = "[MULTIPLE PPL]"
__date__ = "DEC 2011"
__version__ = "1.1"
__copyright__ = "Copyright (c) 2011"
class huawei_modem_unlocker(object):
"""
Instance variables:
Imei
Imei of the modem will be calculated
Default : '0'
Verbose
Display how algorithm Is working
Default : False
"""
def __init__(self, imei='0', verbose=False):
''' Huawei modem unlocker class constructor '''
self._imei = imei
self._verbose = verbose
self._md5u = hashlib.md5(str(imei)+str('5e8dd316726b0335')).hexdigest()
self._md5f = hashlib.md5(str(imei)+str('97b7bc6be525ab44')).hexdigest()
self._unlock_code = ''
self._flash_code = ''
self._width = 21
self._w = 10
self._header_format = '%-*s%*s'
self._format = ' %d | %-*s | %*s '
def xor_digits(self, source, counter):
''' Get a value and xoring it during looping iteration '''
digits = int('0x0'+source[0+counter:2+counter],16) ^ \
int('0x0'+source[8+counter:8+2+counter],16) ^ \
int('0x0'+source[16+counter:16+2+counter],16) ^ \
int('0x0'+source[24+counter:24+2+counter],16)
return digits
def calc(self):
''' Process calculate with the algorithm (read teh code) '''
cnt = 0
cnt2 = 1
if self._verbose:
print "="*(self._width+13)
print " Iter."+"|"+ " Unlock byte "+"|"+" Flash byte "
print "-"*(self._width+13)
while cnt < 8:
digits_unlock = self.xor_digits(self._md5u, cnt)
digits_flash = self.xor_digits(self._md5f, cnt)
unlock_byte = string.zfill(hex(digits_unlock)[2:],2)
flash_byte = string.zfill(hex(digits_flash)[2:],2)
self._unlock_code = str(self._unlock_code)+str(unlock_byte)
self._flash_code = str(self._flash_code)+str(flash_byte)
if self._verbose: print self._format % (int(cnt2), self._width - self._w, self._unlock_code , self._w, self._flash_code)
cnt +=2
cnt2 +=1
if self._verbose:
print "="*(self._width+13)
print "\nUNLOCK CODE = %d & %d | %d = %d" % (int('0x0'+self._unlock_code,16), 33554431, 33554432, eval("int('0x0'+self._unlock_code,16) & 33554431 | 33554432"))
print "FLASH CODE = %d & %d | %d = %d\n" % (int('0x0'+self._flash_code,16), 33554431, 33554432, eval("int('0x0'+self._flash_code,16) & 33554431 | 33554432"))
self._unlock_code = int('0x0'+self._unlock_code,16) & 33554431 | 33554432
self._flash_code = int('0x0'+self._flash_code,16) & 33554431 | 33554432
return (self._unlock_code, self._flash_code)
def run(self):
''' Fire it up ! '''
self.calc()
return (self._unlock_code, self._flash_code)
if __name__ == '__main__':
print "\nHuawei modem unlock code calculator v.%s by %s \n" % (__version__, __auth__)
inpimei = raw_input("Please input modem IMEI: ")
cracker = huawei_modem_unlocker(inpimei)
a, b = cracker.run()
print "\n-> IMEI = %s" % (inpimei)
print "-> UNLOCK CODE = %s" % (a)
print "-> FLASH CODE = %s" % (b)
Now thats what you would call, awesome :> , you wont find this to easy again my friends.. pocketwifi is now unlockable at ALL levels so, please enjoy it…free , thanks to some smart reversing of hardware by gunslinger ,propes up for this and thanks..when all others failed, gslinger came thru for me :>
thanks to my channel on efnet and its members @ps and frineds..and, please, feel free to ppin anytime..Nw, note, this unlocks the modem so, you could now use it alongside your own isp and, thus you would have free wifi i believe… but, also note, this can handle a Android-ROM! Yes, or even, Ubuntu installed within it! On the e585, and other models, above it, have an awesome feature to add a shared sdcard, so users logged in, can actually share like a ftpd!
These wifi routers really do rock, i would not have gone thru this amount of crap to get a calulator happenin for this thing, and, have to now maybe check other models and update a few strings….so, it mght have a target list next time you see it 
Again, this will handle a rom, or, work like a small os/router,and this means, you have basically, a 5 user (at the least) shell,and, thats only if you wish to allow 4 others on it, you could happily, connect thru it with your own shit..thats even very good reason to have this thing unlocked, it really works on, what phone isp is being used to access it, when it is unlocked, this means, no restrictions on any of its default.rules,wich are nice and changed by default on unlock..so, you could make a py object file? or a .pyc ? or just python file.py on the device sdcard,root of sdcard…just hook it up to the pc,copy file to its sdcard and root then, enjoy rom manager possibly? and, i know for fact it handles froyo rom, so that maybe where to startsearching on tht one :>
ENJOY PPL!
XD @ #HAXNET @ EFNET // Dont become a victim ..