Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No IPv4 address found for interfaces on Mac OS #2098

Closed
mikeassel opened this issue Jun 18, 2019 · 11 comments
Closed

No IPv4 address found for interfaces on Mac OS #2098

mikeassel opened this issue Jun 18, 2019 · 11 comments

Comments

@mikeassel
Copy link

When running scapy in interactive mode on MacOS 10.14.5 I get the warnings below.
scapy 2.4.3rc1 and python 3.7.3

MacBook-Pro-4:~ mike$ sudo scapy
INFO: Can't import matplotlib. Won't be able to plot.
INFO: Can't import PyX. Won't be able to use psdump() or pdfdump().
ifconfig: invalid arguments
WARNING: No IPv4 address found on en0 !
ifconfig: invalid arguments
WARNING: No IPv4 address found on lo0 !
ifconfig: invalid arguments
WARNING: more No IPv4 address found on lo0 !
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
INFO: No IPv6 support in kernel
WARNING: No route found for IPv6 destination :: (no default route?)
INFO: Can't import python-cryptography v1.7+. Disabled WEP decryption/encryption. (Dot11)
INFO: Can't import python-cryptography v1.7+. Disabled IPsec encryption/authentication.
                                      
                     aSPY//YASa       
             apyyyyCY//////////YCa       |
            sY//////YSpcs  scpCY//Pp     | Welcome to Scapy
 ayp ayyyyyyySCP//Pp           syY//C    | Version 2.4.3rc1
 AYAsAYYYYYYYY///Ps              cY//S   |
         pCCCCY//p          cSSps y//Y   | https://github.com/secdev/scapy
         SPPPP///a          pP///AC//Y   |
              A//A            cyP////C   | Have fun!
              p///Ac            sC///a   |
              P////YCpc           A//A   | Craft packets like it is your last
       scccccp///pSP///p          p//Y   | day on earth.
      sY/////////y  caa           S//P   |                      -- Lao-Tze
       cayCyayP//Ya              pY/Ya   |
        sY/PsY////YCc          aC//Yp 
         sc  sccaCY//PCypaapyCP//YSs  
                  spCPY//////YPSps    
                       ccaacs         
                                       using IPython 7.5.0
>>>                                                                                                                                                 

If I try to do something simple such as sending an ICMP packet, scapy says WARNING: Could not get the source MAC: No MAC address found on en0 !

en0 does have an IP address

MacBook-Pro-4:~ mike$ ifconfig -i en0
en0 (8):
  inet address  172.16.0.133
  netmask       255.255.252.0
  broadcast     172.16.3.255
  flags         UP BROADCAST NOTRAILERS RUNNING SIMPLEX MULTICAST
  mtu           1500
@guedou
Copy link
Member

guedou commented Jun 18, 2019 via email

@mikeassel
Copy link
Author

Similar result, but the warnings are a bit different.

MacBook-Pro-4:scapytest mike$ git clone https://github.com/secdev/scapy
Cloning into 'scapy'...
remote: Enumerating objects: 24774, done.
remote: Total 24774 (delta 0), reused 0 (delta 0), pack-reused 24774
Receiving objects: 100% (24774/24774), 73.39 MiB | 6.70 MiB/s, done.
Resolving deltas: 100% (15865/15865), done.
MacBook-Pro-4:scapytest mike$ cd scapy/
MacBook-Pro-4:scapy mike$ sudo ./run_scapy
Password:
INFO: Can't import matplotlib. Won't be able to plot.
INFO: Can't import PyX. Won't be able to use psdump() or pdfdump().
WARNING: Failed to execute ifconfig: (ifconfig: invalid arguments
)
WARNING: Failed to execute ifconfig: (ifconfig: invalid arguments
)
WARNING: more Failed to execute ifconfig: (ifconfig: invalid arguments
)
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
ifconfig: invalid arguments
INFO: No IPv6 support in kernel
WARNING: No route found for IPv6 destination :: (no default route?)
INFO: Can't import python-cryptography v1.7+. Disabled WEP decryption/encryption. (Dot11)
INFO: Can't import python-cryptography v1.7+. Disabled IPsec encryption/authentication.
                                      
                     aSPY//YASa       
             apyyyyCY//////////YCa       |
            sY//////YSpcs  scpCY//Pp     | Welcome to Scapy
 ayp ayyyyyyySCP//Pp           syY//C    | Version 2.4.3rc1.dev256
 AYAsAYYYYYYYY///Ps              cY//S   |
         pCCCCY//p          cSSps y//Y   | https://github.com/secdev/scapy
         SPPPP///a          pP///AC//Y   |
              A//A            cyP////C   | Have fun!
              p///Ac            sC///a   |
              P////YCpc           A//A   | Craft packets like it is your last
       scccccp///pSP///p          p//Y   | day on earth.
      sY/////////y  caa           S//P   |                      -- Lao-Tze
       cayCyayP//Ya              pY/Ya   |
        sY/PsY////YCc          aC//Yp 
         sc  sccaCY//PCypaapyCP//YSs  
                  spCPY//////YPSps    
                       ccaacs         
                                       using IPython 7.5.0
>>>                                                           

@guedou
Copy link
Member

guedou commented Jun 18, 2019 via email

@mikeassel
Copy link
Author

MacBook-Pro-4:scapy mike$ ifconfig

awdl0 (10):
  flags         UP BROADCAST RUNNING PROMISC SIMPLEX MULTICAST
  mtu           1484

bridge0 (15):
  flags         UP BROADCAST NOTRAILERS RUNNING SIMPLEX MULTICAST
  mtu           1500

en0 (8):
  inet address  172.16.0.133
  netmask       255.255.252.0
  broadcast     172.16.3.255
  flags         UP BROADCAST NOTRAILERS RUNNING SIMPLEX MULTICAST
  mtu           1500

en1 (11):
  flags         UP BROADCAST NOTRAILERS RUNNING PROMISC SIMPLEX MULTICAST
  mtu           1500

en10 (23):
  flags         UP BROADCAST NOTRAILERS RUNNING SIMPLEX MULTICAST
  mtu           1500

en2 (13):
  flags         UP BROADCAST NOTRAILERS RUNNING PROMISC SIMPLEX MULTICAST
  mtu           1500

en3 (12):
  flags         UP BROADCAST NOTRAILERS RUNNING PROMISC SIMPLEX MULTICAST
  mtu           1500

en4 (14):
  flags         UP BROADCAST NOTRAILERS RUNNING PROMISC SIMPLEX MULTICAST
  mtu           1500

en6 (7):
  flags         UP BROADCAST NOTRAILERS RUNNING SIMPLEX MULTICAST
  mtu           1500

lo0 (1):
  inet address  127.0.0.1
  netmask       255.0.0.0
  flags         UP LOOPBACK RUNNING MULTICAST
  mtu           16384

p2p0 (9):
  flags         UP BROADCAST RUNNING SIMPLEX MULTICAST
  mtu           2304

utun0 (16):
  flags         UP POINTOPOINT RUNNING MULTICAST
  mtu           2000

utun1 (18):
  flags         UP POINTOPOINT RUNNING MULTICAST
  mtu           1380

utun2 (19):
  flags         UP POINTOPOINT RUNNING MULTICAST
  mtu           1380

vmnet1 (21):
  inet address  172.16.169.1
  netmask       255.255.255.0
  broadcast     172.16.169.255
  flags         UP BROADCAST NOTRAILERS RUNNING SIMPLEX MULTICAST
  mtu           1500

vmnet8 (22):
  inet address  192.168.166.1
  netmask       255.255.255.0
  broadcast     192.168.166.255
  flags         UP BROADCAST NOTRAILERS RUNNING SIMPLEX MULTICAST
  mtu           1500

Thanks for the help :)

@guedou
Copy link
Member

guedou commented Jun 19, 2019

Thanks. Is it the regular ifconfig command for 10.14? The output is different from previous version of the OS.

@guedou
Copy link
Member

guedou commented Jun 19, 2019

I just confirmed on two different installations that this it not the regular output of the ifconfig command on 10.14.

@mikeassel
Copy link
Author

Ah, a light bulb just went off. A while back I was experimenting with installing GNU coreutils on my Mac. The man file for ifconfig on my Mac does say GNU inetutils 1.9.3-dirty, so that must be the reason for the discrepancy. Now I need to figure out how to restore the original ifconfig command. I'm assuming this will clear up the issue.

@guedou
Copy link
Member

guedou commented Jun 19, 2019

That's it =)

@guedou guedou closed this as completed Jun 19, 2019
@TamaSiru
Copy link

N

@221910312031
Copy link

Hi, I've faced a similar issue, but, I already tried the:

akki@Macbookair: git clone https://github.com/secdev/scapy
Cloning into 'scapy'...
remote: Enumerating objects: 35922, done.
remote: Counting objects: 100% (36/36), done.
remote: Compressing objects: 100% (28/28), done.
remote: Total 35922 (delta 14), reused 24 (delta 8), pack-reused 35886
Receiving objects: 100% (35922/35922), 84.48 MiB | 10.64 MiB/s, done.
Resolving deltas: 100% (24216/24216), done.

cd  scapy/
 sudo ./run_scapy

and I've faced this as the output:

INFO: Can't import PyX. Won't be able to use psdump() or pdfdump().
WARNING: No IPv4 address found on en1 !
WARNING: No IPv4 address found on bridge0 !
WARNING: more No IPv4 address found on p2p0 !
INFO: Can't import python-cryptography v1.7+. Disabled WEP decryption/encryption. (Dot11)
INFO: Can't import python-cryptography v1.7+. Disabled IPsec encryption/authentication.

WARNING: IPython not available. Using standard Python shell instead.
AutoCompletion, History are disabled. `


                     aSPY//YASa
             apyyyyCY//////////YCa       |
            sY//////YSpcs  scpCY//Pp     | Welcome to Scapy
 ayp ayyyyyyySCP//Pp           syY//C    | Version 2.4.5rc1.dev245
 AYAsAYYYYYYYY///Ps              cY//S   |
         pCCCCY//p          cSSps y//Y   | https://github.com/secdev/scapy
         SPPPP///a          pP///AC//Y   |
              A//A            cyP////C   | Have fun!
              p///Ac            sC///a   |
              P////YCpc           A//A   | Wanna support scapy? Star us on
       scccccp///pSP///p          p//Y   | GitHub!
      sY/////////y  caa           S//P   |             -- Satoshi Nakamoto
       cayCyayP//Ya              pY/Ya   |
        sY/PsY////YCc          aC//Yp
         sc  sccaCY//PCypaapyCP//YSs
                  spCPY//////YPSps
                       ccaacs


@p-l-
Copy link
Member

p-l- commented May 23, 2022

@221910312031 you probably have ifconfig from GNU coreutils, see @mikeassel comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants