EvilZone

Hacking and Security => Hacking and Security => : Clone March 14, 2014, 12:24:30 AM

: question:Cracking Huawei 3G ,4G modems
: Clone March 14, 2014, 12:24:30 AM
Huawei modem:
(http://www.bing.com/images/search?q=huawei+3g+modem&id=122E172EA5E4687B199C886D7A97E7F37275C25B&FORM=IQFRBA)

A phone provider acting as an ISP gives you access to internet via a huawei modem.The technology used is similar to taking a phne call or better using a phone to browse the internet.The ISP can restrict bandwidth so how do you overcome the restrictions? I know you can unlock the modem.
: (Python)
import hashlib, getopt, sys
 
 
def usage():
    print "Options: -i*, --imei=*      IMEI of the device"
    print ""
    print "Example: huawei-unlock.py --imei=351234567891239"
    print ""
 
def testIMEIChecksum(digits):
    _sum = 0
    alt = False
    for d in reversed(digits):
        assert 0 <= d <= 9
        if alt:
            d *= 2
        if d > 9:
            d -= 9
        _sum += d
        alt = not alt
    return (_sum % 10) == 0
 
def checkIMEI(imei):
    digits = []
    if len(imei) != 15:
        print "IMEI too short/long"
        return False
    for i in imei:
        digits.append(int(i))
    if not testIMEIChecksum(digits):
        print "IMEI checksum invalid"
        return False
    return True
 
def getCode(imei, salt):
    digest = hashlib.md5((imei+salt).lower()).digest()
    code = 0
    for i in range(0,4):
        code += (ord(digest[i])^ord(digest[4+i])^ord(digest[8+i])^ord(digest[12+i])) << (3-i)*8
    code &= 0x1ffffff
    code |= 0x2000000
    return code
 
def main():
    info()
        try:   
                opts, args = getopt.getopt(sys.argv[1:], "hi:", ["help", "imei="])
        except getopt.GetoptError, err:
                print str(err) # will print something like "option -a not recognized"
                usage()
                sys.exit(2)
 
    imei = ""
    interactive = False
 
        for o, a in opts:
                if o in ("-i", "--imei"):
                        imei = a
                elif o in ("-h", "--help"):
                        usage()
                        sys.exit()
 
    if imei == "":
        imei = raw_input("Please enter the IMEI of the device: ")
        interactive = True
 
    if checkIMEI(imei):
        print "Unlock Code: %d" % (getCode(imei, hashlib.md5("hwe620datacard").hexdigest()[8:24]))
        print "Flash Code:  %d" % (getCode(imei, hashlib.md5("e630upgrade").hexdigest()[8:24]))
        print "done."
 
    if interactive:
        raw_input()
     
if __name__ == "__main__":
    main()

code so that it uses different sim cards or a variety of ISP but  how woul you hack the modem to increase bandwith or in other words how can i crack the modem deeper to letting it intercept signals and shit