ecklf / ac2100-openwrt-guide

Install OpenWrt on the AC2100 (black cylinder)
https://forum.openwrt.org/t/new-xiaomi-router-ac2100/48101
116 stars 17 forks source link

please add this fix to pppoe-simulator.py #7

Open WiredLife opened 4 years ago

WiredLife commented 4 years ago

i was unable to exploit the black cylinder with this error: Waiting for packets Client->Server | Discovery Initiation Server->Client | Discovery Offer Traceback (most recent call last): File "pppoe-simulator.py", line 183, in sniff(prn=packet_callback, filter="pppoed or pppoes", lfilter=isNotOutgoing) File "/usr/lib/python3/dist-packages/scapy/sendrecv.py", line 972, in sniff sniffer._run(*args, **kwargs) File "/usr/lib/python3/dist-packages/scapy/sendrecv.py", line 925, in _run session.on_packet_received(p) File "/usr/lib/python3/dist-packages/scapy/sessions.py", line 47, in on_packet_received result = self.prn(pkt) File "pppoe-simulator.py", line 68, in packet_callback sendp(eth_discovery / File "/usr/lib/python3/dist-packages/scapy/sendrecv.py", line 336, in sendp results = gen_send(socket, x, inter=inter, loop=loop, File "/usr/lib/python3/dist-packages/scapy/sendrecv.py", line 291, in __gen_send s.send(p) File "/usr/lib/python3/dist-packages/scapy/arch/linux.py", line 559, in send return SuperSocket.send(self, x) File "/usr/lib/python3/dist-packages/scapy/supersocket.py", line 48, in send sx = raw(x) File "/usr/lib/python3/dist-packages/scapy/compat.py", line 52, in raw return bytes(x) File "/usr/lib/python3/dist-packages/scapy/packet.py", line 487, in bytes__ return self.build() File "/usr/lib/python3/dist-packages/scapy/packet.py", line 607, in build p = self.do_build() File "/usr/lib/python3/dist-packages/scapy/packet.py", line 592, in do_build pay = self.do_build_payload() File "/usr/lib/python3/dist-packages/scapy/packet.py", line 579, in do_build_payload return self.payload.do_build() File "/usr/lib/python3/dist-packages/scapy/packet.py", line 592, in do_build pay = self.do_build_payload() File "/usr/lib/python3/dist-packages/scapy/packet.py", line 579, in do_build_payload return self.payload.do_build() File "/usr/lib/python3/dist-packages/scapy/packet.py", line 592, in do_build pay = self.do_build_payload() File "/usr/lib/python3/dist-packages/scapy/packet.py", line 579, in do_build_payload return self.payload.do_build() File "/usr/lib/python3/dist-packages/scapy/packet.py", line 592, in do_build pay = self.do_build_payload() File "/usr/lib/python3/dist-packages/scapy/packet.py", line 579, in do_build_payload return self.payload.do_build() File "/usr/lib/python3/dist-packages/scapy/packet.py", line 592, in do_build pay = self.do_build_payload() File "/usr/lib/python3/dist-packages/scapy/packet.py", line 579, in do_build_payload return self.payload.do_build() File "/usr/lib/python3/dist-packages/scapy/packet.py", line 589, in do_build pkt = self.self_build() File "/usr/lib/python3/dist-packages/scapy/packet.py", line 570, in self_build p = f.addfield(self, p, val) File "/usr/lib/python3/dist-packages/scapy/fields.py", line 140, in addfield return s + struct.pack(self.fmt, self.i2m(pkt, val)) File "/usr/lib/python3/dist-packages/scapy/fields.py", line 1380, in i2m f = fld.i2len(pkt, fval) File "/usr/lib/python3/dist-packages/scapy/fields.py", line 938, in i2len return len(x) TypeError: object of type 'NoneType' has no len()

so i found this https://github.com/Percy233/PPPoE_Simulator-for-RM2100-exploit/issues/2

please add this fix, it works perfectly

set5una commented 4 years ago

Thank you

Lenart12 commented 4 years ago

Bump

Zakspeed commented 3 years ago

My error: pppoe-simulator.py

root@raspberrypi:/home/pi/ac2100-openwrt-guide# python3 pppoe-simulator.py
Waiting for packets
Traceback (most recent call last):
  File "pppoe-simulator.py", line 183, in <module>
    sniff(prn=packet_callback, filter="pppoed or pppoes", lfilter=isNotOutgoing)
  File "/usr/lib/python3/dist-packages/scapy/sendrecv.py", line 780, in sniff
    r = prn(p)
  File "pppoe-simulator.py", line 63, in packet_callback
    for tag in pkt[PPPoED][PPPoED_Tags].tag_list:
NameError: name 'PPPoED_Tags' is not defined
Couta7 commented 3 years ago

My error: pppoe-simulator.py

root@raspberrypi:/home/pi/ac2100-openwrt-guide# python3 pppoe-simulator.py
Waiting for packets
Traceback (most recent call last):
  File "pppoe-simulator.py", line 183, in <module>
    sniff(prn=packet_callback, filter="pppoed or pppoes", lfilter=isNotOutgoing)
  File "/usr/lib/python3/dist-packages/scapy/sendrecv.py", line 780, in sniff
    r = prn(p)
  File "pppoe-simulator.py", line 63, in packet_callback
    for tag in pkt[PPPoED][PPPoED_Tags].tag_list:
NameError: name 'PPPoED_Tags' is not defined

Did you fixed it? I'm having the same issue