File tree 1 file changed +9
-8
lines changed
1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -259,17 +259,18 @@ def ipcp_negotiation(self):
259
259
id = pkt [PPP_IPCP ].id ,
260
260
options = pkt [PPP_IPCP ].options ))
261
261
262
- def ppp_negotation (self , cb = None , ignore_initial_reqs = False ):
263
- num_reqs_to_ignore = 6 # Ignore initial requests in order to increase the chances of the exploit to work
264
- # Tested from 6 to 8 requests, on version 10.50 - all give best results then not ignoring
265
- num_ignored_reqs = 0
262
+ def ppp_negotation (self , cb = None , ignore_initial_req = False ):
263
+ if ignore_initial_req :
264
+ print ('[*] Waiting for PADI...' )
265
+ while True :
266
+ pkt = self .s .recv ()
267
+ if pkt and pkt .haslayer (
268
+ PPPoED ) and pkt [PPPoED ].code == PPPOE_CODE_PADI :
269
+ break
270
+
266
271
print ('[*] Waiting for PADI...' )
267
272
while True :
268
273
pkt = self .s .recv ()
269
- if ignore_initial_reqs and (num_ignored_reqs < num_reqs_to_ignore ):
270
- print ('[*] Ignoring initial PS4 PPoE request #{}..' .format (num_ignored_reqs + 1 ))
271
- num_ignored_reqs += 1
272
- continue
273
274
if pkt and pkt .haslayer (
274
275
PPPoED ) and pkt [PPPoED ].code == PPPOE_CODE_PADI :
275
276
break
You can’t perform that action at this time.
0 commit comments