Skip to content

Commit

Permalink
Ignore first PADI.
Browse files Browse the repository at this point in the history
  • Loading branch information
TheOfficialFloW committed May 7, 2024
1 parent 69522af commit 64b9ab2
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions pppwn.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,17 +259,18 @@ def ipcp_negotiation(self):
id=pkt[PPP_IPCP].id,
options=pkt[PPP_IPCP].options))

def ppp_negotation(self, cb=None, ignore_initial_reqs=False):
num_reqs_to_ignore = 6 # Ignore initial requests in order to increase the chances of the exploit to work
# Tested from 6 to 8 requests, on version 10.50 - all give best results then not ignoring
num_ignored_reqs = 0
def ppp_negotation(self, cb=None, ignore_initial_req=False):
if ignore_initial_req:
print('[*] Waiting for PADI...')
while True:
pkt = self.s.recv()
if pkt and pkt.haslayer(
PPPoED) and pkt[PPPoED].code == PPPOE_CODE_PADI:
break

print('[*] Waiting for PADI...')
while True:
pkt = self.s.recv()
if ignore_initial_reqs and (num_ignored_reqs < num_reqs_to_ignore):
print('[*] Ignoring initial PS4 PPoE request #{}..'.format(num_ignored_reqs+1))
num_ignored_reqs+=1
continue
if pkt and pkt.haslayer(
PPPoED) and pkt[PPPoED].code == PPPOE_CODE_PADI:
break
Expand Down

0 comments on commit 64b9ab2

Please sign in to comment.