예제 #1
0
파일: eapauth.py 프로젝트: web8search/ich
 def send_identity(self, packet_id):
     logger.info('Sending identity...')
     # FIXME is version info needed and right?
     eap = build_EAP('RESPONSE', packet_id, 'IDENTITY',
                     self.version_info + self.login_info['username'])
     packet = self.ethernet_header + build_EAPOL('EAPPACKET', eap)
     self.client.send(packet)
예제 #2
0
파일: eapauth.py 프로젝트: web8search/ich
 def send_md5_challenge(self, packet_id, md5value):
     logger.info('Sending our buggy md5 challenge response...')
     # FIXME TESTING yeah, I just guess the crypt method in GDUT is
     #
     #                   md5(id + password + md5value)
     #
     #               but actually, it didn't get the right value when
     #               I manage to calculate by hand... I hope it's only
     #               because I made some mistakes... XD (and I really get
     #               tired) anyway, leave it for debugging (or cracking...)
     origin = '%s%s%s' % (packet_id, self.login_info['password'], md5value)
     #: EAP-MD5 Value-Size(16) + EAP-MD5 Value
     digest = '\x10' + md5(origin).hexdigest()
     logger.debug('md5 challenge digest: %s') % digest
     eap = build_EAP('RESPONSE', packet_id, 'MD5_CHALLENGE', digest)
     #: EAP-MD5 Value-Size(16) + EAP-MD5 Value + EAP-MD5 Extra Data
     packet = self.ethernet_header + build_EAPOL('EAPPACKET',
                 eap + self.login_info['username'])
     logger.debug('md5 challenge packet: %s') % packet
     self.client.send(packet)