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

NullReference Exception if IPv6 is disabled #38

Open
VbScrub opened this issue Nov 19, 2021 · 3 comments
Open

NullReference Exception if IPv6 is disabled #38

VbScrub opened this issue Nov 19, 2021 · 3 comments

Comments

@VbScrub
Copy link

VbScrub commented Nov 19, 2021

Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object. at Inveigh.Arguments.ParseArguments() at Inveigh.Program.Main(String[] arguments)

The error comes from line 295 in the Arguments.cs file because it is trying to insert into a null string:

Program.argMAC = Program.argMAC.Insert(2, ":").Insert(5, ":").Insert(8, ":").Insert(11, ":").Insert(14, ":");

The only solution was to enable IPv6 on my network adapter. Even if I use -IPv6 N I still get the error.

@Kevin-Robertson
Copy link
Owner

Thanks, this will be fixed soon. You can also get around it by feeding it a MAC with -MAC. Basically, it only needs the MAC for DHCPv6 spoofing so it's not needed when IPv6 is disabled. I should have included -MAC in the list of paramters that are not required when IPv6 is disabled.

@T35R6braPwgDJKq
Copy link

thanks - just wrapped the block with if(enabledDHCPv6) - worked

            if (Program.enabledDHCPv6)
            {
                if (string.IsNullOrEmpty(Program.argMAC))
                {

                    if (string.IsNullOrEmpty(Program.argSnifferIPv6))
                    {
                        Program.argMAC = GetLocalMACAddress(GetLocalIPAddress("IPv6"));
                    }
                    else
                    {
                        Program.argMAC = GetLocalMACAddress(Program.argSnifferIPv6);
                    }

                }

                Program.argMAC = Program.argMAC.Insert(2, ":").Insert(5, ":").Insert(8, ":").Insert(11, ":").Insert(14, ":");
            }

@Kevin-Robertson
Copy link
Owner

Thanks! That bug should be fixed in the dev branch version also.

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

3 participants