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 铜板 才能浏览 购买主题
正需要negotiations,谢谢
这个适用什么场景
:D收藏学习
不错总算有人发点贴了
帮你顶;P;P
學習了,感謝教學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完成!======"
}
.... 估计要被好多人骂了 不错,总算找到了!!!! 不错,总算找到了!!!! 这个拿来干啥呢???? 不错 总算找到了 虽然还不知道是干用的,但一定要顶
虽然还不知道是干用的,但一定要顶 就是无限试用吧
页:
[1]
2