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

技术资料 分享,软路由
0 828
admin
admin 自由达人 2022-11-27 19:39:33
用户等级:5级
原文:http://bbs.routerclub.com/forum.php?mod=viewthread&tid=104819&extra=page%3D2&page=1
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完成!======"
}

mac.txt内容示例:
308BB2,C463FB,E4CC9D,001D29,205F3D,8C0FFA,082697,E00084,5CE883,3C9D56,D46BA6,24526A,44D5F2,087190,90272B,A020A6,2CF432,840D8E,84F3EB,7CB27D,04819B,5846E1,00D0BD,F08261,D084B0,00FEC8,047863,24BA13,24DA11,70CA4D,DCC0EB,001735,9CDFB1,0CC731,00142F,2CDDA3,24FD5B,2876CD,F4F5D8,F4F5E8,F88FCA,BCD1D3,BC4434,0041D2,4CFB45,A4BA76,78E3B5,984BE1,68B599,DCD321,CC4EEC,0080E1,58DC6D,00092D,F8DB7F,E899C4,7CB15D,18686A,0C0535,8851FB,AC162D,A0B3CC,E4115B,C8CBB8,9457A5,0001E7,080009,0080A0,D48564,3C4A92,780AC7,001D73,001601,106F3F,8857EE,009C02,78E7D1,001B78,001E0B,2C6E85,00D0B7,0002B3,001111,001320,0012F0,9049FA,C8348E,00508B,784859,1458D0,5065F3,A0481C,A01D48,94B2CC,887F03,0019E0,0023CD,002719,40169F,940C6D,74EA3A,90F652,10FEED,C46E1F,50FA84,F483CD,882593,808917,5C899A,1C994C,F02765,20A783,005053,00500F,D842AC,34CDBE,D46AA8,5439DF,4846FB,200BC7,104780,88308A,44A7CF,0013E0,344B50,FCC897,9CD24B,C864C7,D0154A,88E3AB,00664B,68A0F6,5CF96A,B43052,88CEFA,582AF7,F48E92,40CBA8,087A4C,D46E5C,2469A5,C8D15E,F83DFF,308730,002568,30D17E,9C28EF,7C6097,60DE44,3400A3,643E8C,B05947,00E04F,001011,0010F6,80E01D,80E86F,E4AA5D,B0AA77,78BAF9,0016B6,0018F8,00252E,A4A24A,602AD0,00E08F,203A07,34A84E,E4D3F1,1CE6C7,E02F6D,8478AC,4403A7,6886A7,B4E9B0,000832,B0FAEB,500604,70105C,14DAE9,3C08F6,D072DC,28C7CE,6CFA89,58F39C,346288,881DFC,C067AF,64E950,189C5D,000EA6,0013D4,002618,00248C,0050A2,0050F0,00905F,00902B,00100B,00100D,001014,D4B8FF,AC6462,C08488,68E8EB,20C3A4,780541,C02DEE,54A3FA,9023EC,3891D5,90DFFB,3C831E,381C23,E03676,3CB72B,243184,24DA9B,3052CB,B8B2EB,C40049,50A9DE,E8DED6,8C10D4,089B4B,3C7873,C8F9C8,3C5CC3,A8741D,A4C138,D8EFCD,EC0133,1C56FE,7CA23E,501AA5,F09A51,9870E8,50DF95,584925,94F278,E8BDD1,3481F4,F4B8A7,58F102,B869C2,2CC548,307CB2,90D8F3,444CA8,FCE33C,BC6A2F,E4907E,48066A,1CF03E,DCDB70,68EDA4,B899B0,80C5E6,D85DEF,10DF8B,00A784,800184,44C69B,C02567,B46D35,B89ACD,241C04,F8CFC5,BCF811,A8827F,900A39,C4693E,1C8341,4011DC,249EAB,DC56E6,5CA178,702A7D,B8B3DC,6C1E70,C8E130,8833BE,34CC28,144146,F41563,C4EA1D,20E407,887384,584704,B856BD,107873,D45556,F01E34,74A063,A89008,183864,08D34B,C808E9,78ACBF,206274,5CCCFF,844BB7,148F21,3C6A9D,14893E,60F189,74A34A,D89341,F4645D,30D587,1436C6,04C09C,844464,589B0B,A48CDB,4062B6,3C2C94,78312B,C035C5,F8B2F3,1C7D22,7C11CD,0492EE,F02A23,8C9109,307350,B09137,3C1E13,B4A828,A41242,404EEB,50BD5F,147590,ECB907,5CF9F0,FCDBB3,B8186F,1C9C26,9C3583,C456FE,B89BE4,C0EEFB,108A1B,8CF813,B8F317,2442BC,C401CE,D01242,50F43C,B43934,DCC622,D062A0,CC10A3,2CA30E,4CF5A0,084656,4488CB,5014B5,CC3080,F82441,6CBFB5,489D18,8CB094,6C6EFE,E4C62B,80F8EB,4C2C83,E89606,CC3F1D,902181,600417,A44AD3,2497ED,104E07,FCD5D9,007532,907EBA,488244,A8F7E0,D87EB1,4045DA,98BE94,D4B43E,A8E539,98F170,04C991,581F67,BC25F0,7CE524,D85DFB,7CC4EF,94AEE3,44666E,705B2E,0C8C8F,F4FD2B,FCAA14,50FEF2,3CD9CE,C80210,702DD1,F4F646,ECD9D1,748F4D,A47E39,0C63FC,ACA9A0,A8A668,60E327,E4D332,A0DA92,6828BA,48D18E,A49F85,3481C4,085700,888914,D8150D,A06518,748F1B,F03A4B,D82A15,C4291D,704E01,848433,D4319D,DC052F,CC398C,6C5F1C,B42C92,FC1349,8C41F2,FC07A0,AC02CA,F490CA,2C534A,CC856C,60FFDD,FCBBA1,50B695,B48547,3C25D7,1889DF,CC9F35,407875,0C4F5A,B4B542,54CDEE

楼主签名:唱跳rap和篮球
回帖
回复列表