0x0XDev / JamWiFi

A GUI, easy to use WiFi network jammer for Mac OS X
413 stars 49 forks source link

Failed Network Scan #1

Closed fbbfnc closed 5 years ago

fbbfnc commented 5 years ago

First of all thank you very much for you work. I'd like to help you if possible.

Is there a way to enable debug mode in the XCode project? By the way, my issue is the following message when i press "Scan": A network scan could not be completed at this time.

anonymouz4 commented 5 years ago

I've just tested it on 3 different devices and it worked on each one.

Make sure this file exists: /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Apple80211

In regards to debugging, it a little more difficult bc it needs to run as root:

Option 1: Launch app as root (sudo su) in Terminal, and debug/print with [@"example" writeToFile:@"/dev/stdout" atomically:NO encoding:NSUTF8StringEncoding error:nil];

Option 2: in xcode select manage schemes -> launch as root, and NSLog() as normal

anonymouz4 commented 5 years ago

If there‘s no further follow-up, I‘ll close this issue

ajkblue commented 4 years ago

I'm getting the same error, (on a 2019 MBP) I do have the Apple80211 file, and I have tried launching it via the Terminal with sudo su, as well as launching through Xcode as root.

All the console printed out was the following:

2020-03-27 11:07:51.107596-0600 JamWiFi[5075:82628] Main.m: Initializing..
JWDelegate: Launch Complete.
2020-03-27 11:07:51.347493-0600 JamWiFi[5075:82628] Metal API Validation Enabled
wifi scan error
wifi scan error
anonymouz4 commented 4 years ago

@ajkblue It should now print a more detailed error

ajkblue commented 4 years ago

Alright, I just updated and now it's giving me this:

2020-03-27 23:48:48.677921-0600 JamWiFi[14268:346021] Main.m: Initializing..
JWDelegate: Launch Complete.
2020-03-27 23:48:48.887797-0600 JamWiFi[14268:346021] Metal API Validation Enabled
wifi scan error: Operation not supported on socket
anonymouz4 commented 4 years ago

@ajkblue Does it never work or just sometimes?

ajkblue commented 4 years ago

It never works. All I can do is deauth from the network and then clicking on “Scan” causes the pop up “ A network scan could not be completed at this time.”

anonymouz4 commented 4 years ago

@ajkblue Try replacing the following:

_ = _open!(&airportHandle)
_ = _bind!(airportHandle, self.interfaceName)
let result = _scan!(airportHandle, &foundNets, scanParams)

with smth like:

var test = _open!(&airportHandle)
print(test)
test= _bind!(airportHandle, self.interfaceName)
print(test)
let result = _scan!(airportHandle, &foundNets, scanParams)

and check if they both print 0

ajkblue commented 4 years ago

Yup, they both return a 0:

2020-03-28 20:09:19.931133-0600 JamWiFi[68755:1199358] Main.m: Initializing..
2020-03-28 20:09:20.097906-0600 JamWiFi[68755:1199358] Metal API Validation Enabled
JWDelegate: Launch Complete.
0
0
wifi scan error: Operation not supported on socket
anonymouz4 commented 4 years ago

@ajkblue Then what preferences did you change/enable?

ajkblue commented 4 years ago

I don't think I've changed anything? This is what my preferences window looks like:

Screen Shot 2020-03-29 at 10 36 17 AM
ajkblue commented 4 years ago

Is there anything else I can try? I've cleared out my Xcode cache and re-cloned the repo and went thought all of the steps listed above again, verified that the Apple80211 file exists and I'm still getting the same error message. Even when changing the schemes in Xcode and launching as root. I also re-added the debug code which printed out 0 as shown below. I've verified that WiFi scanning and entering monitor mode works via Terminal. Sin título But I'm still getting the same error message in Xcode when launching the app, with or without running as root:

2020-05-30 10:35:09.399840-0600 JamWiFi[4313:37377] Main.m: Initializing..
2020-05-30 10:35:09.529450-0600 JamWiFi[4313:37377] Metal API Validation Enabled
JWDelegate: Launch Complete.
0
0
wifi scan error: Operation not supported on socket
0
0
wifi scan error: Operation not supported on socket

Now my JamWifi Preferences window looks like this: Sin título2

ScryptedFn commented 9 months ago

Apple released a document that states WiFi scanning applications are not allowed on Mac OS. Does this interfere with this app? The file does not appear in my library, the private frameworks file.