44672| 26
|
[脚本] ros 伪随机修改mac和ssid脚本,所谓的ros试玩脚本 |
mirktotk routeros 伪随机修改mac和ssid脚本,所谓的试玩脚本就是指这东西?
mac.txt文件为 mac地址前缀,主要目的是尽量模拟IEEE分配的真实mac范围 mac.txt可要可不要,看懂了的稍微改个注释就行了。 ============添加规则 { :for aa from=1 to=10 do={ /interface wireless { add disabled=no keepalive-frames=disabled master-interface=wlan1 multicast-buffering=disabled name=("v-wifi" . $aa) security-profile=profile1 ssid=("v-ssid" . $aa) } /ip address { add address=("192.168." . $aa . ".254/24") interface=("v-wifi" . $aa) network=("192.168." . $aa . ".0") } /ip pool { add name=("v-pool" . $aa) ranges=("192.168." . $aa . ".1-192.168." . $aa . ".253") } /ip dhcp-server { add address-pool=("v-pool" . $aa) disabled=no interface=("v-wifi" . $aa) name=("v-dhcp-server" . $aa) } /ip dhcp-server network { add address=("192.168." .$aa . ".0/24") dns-server=114.114.114.114,8.8.8.8 gateway=("192.168." .$aa . ".254") } /interface pptp-client { add connect-to=test.test.com disabled=no name=("pptp-out" . $aa) password=("passwd" . $aa) user=("username" . $aa) } /ip route { add distance=1 gateway=("pptp-out" . $aa) routing-mark=("vr" . $aa) } /ip firewall mangle { add action=mark-routing chain=prerouting new-routing-mark=("vr" . $aa) passthrough=no src-address=("192.168." .$aa . ".0/24") } } } ===================随机ssid 和mac { :local maclist 0123456789ABCDEF ; :local ssidlist 0123456789ABCDEFGHIGKLMNOPQRSTUVWXYZabcdefghigklmnopqrstuvwxyz ; :local mactable [/file get [/file find name=mac.txt] contents] ; #:local mactable "12ADBD,13ADBD,24ADBD,14ADBD" :set mactable [:toarray $mactable ] ; :local maclen [ :len $mactable ] ; :for i from=1 to=5 do={ :local mac ; :local ssid ; :local x; :for i from=1 to=6 do={ :local v [ip firewall mangle get [find new-routing-mark=("vr" . $i)] packets ] ; :set v ( $v + ( $i * $i ) ); :local t [ :pick [/system clock get time] 6 8 ]; :set v ( $v * $t + $t + $v); :set x ( $v + $x); if ( $v >= 100 ) do={:set v [ :pick $v ( [ :len $v ] - 2 ) [ :len $v ] ];} while ( $v >= 62 ) do={:set v ( $v - 62 );} :set ssid ( [ :pick $ssidlist $v ] . $ssid ); while ( $v >= 16 ) do={:set v ( $v - 16 );} :set mac ( [ :pick $maclist $v ] . $mac ); if ($i = 2 || $i = 4 || $i = 6 ) do={:set mac $mac ;} } while ( $x >= $maclen ) do={ :set x ( $x - $maclen );} :set mac ([:tostr [:pick $mactable $x ]] . [:tostr $mac]) /interface wireless set ("v-wifi".$i) ssid=( $i."-".$ssid) mac-address=$mac ; :delay 1200ms; } :log info "=====修改MAC和SSID完成!======" }
购买主题
已有 109 人购买
本主题需向作者支付 2 铜板 才能浏览
| |
routeros
|
|
发表于 2019-7-1 20:46:51
|
显示全部楼层
| ||
routeros
|
||
发表于 2019-12-19 22:27:42
|
显示全部楼层
| ||
routeros
|
||
|Archiver|手机版|小黑屋|软路由 ( 渝ICP备15001194号-1|渝公网安备 50011602500124号 )
GMT+8, 2024-11-21 17:45 , Processed in 0.229449 second(s), 9 queries , Gzip On, Redis On.
Powered by Discuz! X3.5 Licensed
© 2001-2024 Discuz! Team.