示例#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)
示例#3
0
文件: eapauth.py 项目: web8search/ich
 def send_logoff(self):
     logger.info('Sending logoff...')
     packet = self.ethernet_header + build_EAPOL('LOGOFF')
     self.client.send(packet)
     self.sent_logoff = True
示例#4
0
文件: eapauth.py 项目: web8search/ich
 def send_start(self):
     logger.info('Sending start...')
     packet = self.ethernet_header + build_EAPOL('START')
     self.client.send(packet)