找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 26249|回复: 24

[脚本] ros 伪随机修改mac和ssid脚本,所谓的ros试玩脚本

[复制链接]
发表于 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 铜板 才能浏览
routeros
发表于 2019-7-1 19:18:24 | 显示全部楼层
正需要negotiations,谢谢
routeros
回复

使用道具 举报

发表于 2019-7-1 20:46:51 | 显示全部楼层
这个适用什么场景
routeros
回复

使用道具 举报

发表于 2019-7-3 07:22:59 | 显示全部楼层
不错总算有人发点贴了
routeros
回复

使用道具 举报

发表于 2019-7-9 11:08:36 | 显示全部楼层
學習了,感謝教學
routeros
回复

使用道具 举报

发表于 2019-7-11 09:26:40 | 显示全部楼层
.... 估计要被好多人骂了
routeros
回复

使用道具 举报

发表于 2019-7-23 13:52:05 | 显示全部楼层
不错,总算找到了!!!!
routeros
回复

使用道具 举报

发表于 2019-9-25 13:15:44 | 显示全部楼层
不错,总算找到了!!!!
routeros
回复

使用道具 举报

发表于 2019-10-14 14:28:21 | 显示全部楼层
这个拿来干啥呢????
routeros
回复

使用道具 举报

发表于 2019-12-19 22:27:42 | 显示全部楼层
不错 总算找到了
routeros
回复

使用道具 举报

发表于 2019-12-29 19:52:56 | 显示全部楼层
虽然还不知道是干用的,但一定要顶
routeros
回复

使用道具 举报

发表于 2020-1-12 21:07:59 | 显示全部楼层

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

使用道具 举报

发表于 2020-1-27 22:40:12 | 显示全部楼层
就是无限试用吧
routeros
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|手机版|小黑屋|软路由 ( 渝ICP备15001194号-1|渝公网安备 50011602500124号 )

GMT+8, 2024-3-29 16:02 , Processed in 0.190371 second(s), 8 queries , Gzip On, Redis On.

Powered by Discuz! X3.5 Licensed

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表