Skip to content

Cannot list devices on Linux 20.04 #41

@lordlycastle

Description

@lordlycastle

I do no get any output from this tool when I run spoof list on Linux OS.

I've narrowed down the condition it is failing to pass, it is the regular expression for parsing the output of ifconfig.

spoof/index.js

Line 117 in 58dd7de

const result = /(.*?)HWaddr(.*)/mi.exec(output)

Here is the output of `ifconfig`
br-420df7a1a7ee: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 172.27.0.1  netmask 255.255.0.0  broadcast 172.27.255.255
        inet6 fe80::42:10ff:fe81:e45a  prefixlen 64  scopeid 0x20<link>
        ether 02:42:10:81:e4:5a  txqueuelen 0  (Ethernet)
        RX packets 11438  bytes 2596038 (2.5 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 17119  bytes 2419291 (2.4 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

docker0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 172.17.0.1  netmask 255.255.0.0  broadcast 172.17.255.255
        inet6 fe80::42:efff:fe5b:5ba7  prefixlen 64  scopeid 0x20<link>
        ether 02:42:ef:5b:5b:a7  txqueuelen 0  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 3  bytes 306 (306.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 3953586  bytes 723678103 (723.6 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 3953586  bytes 723678103 (723.6 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlp0s20f3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.178.35  netmask 255.255.255.0  broadcast 192.168.178.255
        inet6 2001:a61:243f:5101:94c1:c4f1:ccb6:5c1c  prefixlen 64  scopeid 0x0<global>
        inet6 2001:a61:243f:5101:5324:51f6:1c7d:6  prefixlen 64  scopeid 0x0<global>
        inet6 fd00::6adc:ffea:e940:a20c  prefixlen 64  scopeid 0x0<global>
        inet6 fe80::702d:52ab:7674:588d  prefixlen 64  scopeid 0x20<link>
        inet6 fd00::4bd6:4c28:c115:4ef6  prefixlen 64  scopeid 0x0<global>
        ether dc:41:a9:9f:a8:d5  txqueuelen 1000  (Ethernet)
        RX packets 20323810  bytes 13583854451 (13.5 GB)
        RX errors 0  dropped 334652  overruns 0  frame 0
        TX packets 13009338  bytes 7201165364 (7.2 GB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Do we know why the pattern of (.*?)HWaddr(.*) is expected? Can we improve this parsing?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions