ksw520 发表于 2019-7-1 16:35:39

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完成!======"
}

已有 98 人购买  本主题需向作者支付 2 铜板 才能浏览 购买主题

guohegong 发表于 2019-7-1 19:18:24

正需要negotiations,谢谢

e_zhangiso 发表于 2019-7-1 20:46:51

这个适用什么场景

9939781 发表于 2019-7-2 10:56:07

:D收藏学习

47771885 发表于 2019-7-3 07:22:59

不错总算有人发点贴了

qwert1388 发表于 2019-7-3 20:37:23

帮你顶;P;P

arai 发表于 2019-7-9 11:08:36

學習了,感謝教學

16951575 发表于 2019-7-11 09:26:40

.... 估计要被好多人骂了

yyh2932 发表于 2019-7-23 13:52:05

不错,总算找到了!!!!

211948 发表于 2019-9-25 13:15:44

不错,总算找到了!!!!

chenchsha 发表于 2019-10-14 14:28:21

这个拿来干啥呢????

yeweisheng 发表于 2019-12-19 22:27:42

不错 总算找到了

KENT 发表于 2019-12-29 19:52:56

虽然还不知道是干用的,但一定要顶

开鲁敖思清 发表于 2020-1-12 21:07:59


虽然还不知道是干用的,但一定要顶

tony1441 发表于 2020-1-27 22:40:12

就是无限试用吧
页: [1] 2
查看完整版本: ros 伪随机修改mac和ssid脚本,所谓的ros试玩脚本