适合黑苹果的主板

tonymacx86推荐的几块主板:
Gigabyte GA-Z77-DS3H
Gigabyte GA-H77-DS3H
Gigabyte GA-B75M-D3P
Gigabyte GA-Q77M-D2H
Gigabyte GA-Z77X-UD5H
Gigabyte GA-Z77X-UP5-TH

QQ黑白名单L7脚本(测试RoS5可用)

#定义qqarray为需要控制的QQ号码 zaitianhu(在天虎)制作
global qqarray 12000060,6300008,500007000

#定义qqcon用于控制列出的QQ号为黑名单(hei)还是白名单(bai)
global qqcon “bai”

#定义qqarraylen为要控制的QQ号码的个数
global qqarraylen [len $qqarray]

#定义qqnum用于在循环中从qqarray中获取每一个QQ号码
global qqnum

#定义qqtemp用于在把每一个QQ号码转化为16进制时存放 QQ/16 的整除结果
global qqtemp

#定义orihex用于和把QQ生成16进制后的字符作比较,如果16进制字符含有orihex中包含的字符,则需要转换为和变量chghex中相对应的字符
global orihex (“41″,”42″,”43″,”44″,”45″,”46″,”47″,”48″,”49″,”4a”,”4b”,”4c”,”4d”,”4e”,”4f”,”50″,”51″,”52″,”53″,”54″,”55″,”56″,”57″,”58″,”59″,”5a”,”24″,”28″,”29″,”2a”,”2b”,”2e”,”3f”,”5b”,”5c”,”5d”,”5e”,”7b”,”7c”,”7d”,”00″)
global chghex ((“\\x61”),(“\\x62”),(“\\x63”),(“\\x64”),(“\\x65”),(“\\x66”),(“\\x67”),(“\\x68”),(“\\x69”),(“\\x6a”),(“\\x6b”),(“\\x6c”),(“\\x6d”),(“\\x6e”),(“\\x6f”),(“\\x70”),(“\\x71”),(“\\x72”),(“\\x73”),(“\\x74”),(“\\x75”),(“\\x76”),(“\\x77”),(“\\x78”),(“\\x79”),(“\\x7a”),(“\\\$”),(“\\(“),(“\\)”),(“\\*”),(“\\+”),(“\\.”),(“\\?”),(“\\[“),(“\\\\”),(“\\]”),(“\\^”),(“\\{“),(“\\|”),(“\\}”),(“.\?”))

#定义MyResult用于在将一个QQ转换为16进制字符的程序循环过程中及结束后存放这个QQ号码的16进制字符(此16进制不可直接被ros利用)。
global MyResult “”

#定义qqhex用于存放将MyResult处理之后的可直接供ros利用的16进制字符
global qqhex “”

/ip firewall layer7-protocol remove [ find comment=”QQControl”]
/ip firewall filter remove [find comment=”QQControl”]
/ip firewall filter remove [find comment=”QQControl-all”]
/ip firewall layer7-protocol add name=”qq-all” regexp=”^.\?.\?\\x02.+\\x03\$” comment=”QQControl”

#循环程序开头:此循环程序用于将每一个QQ号转换为相应的ros 的正则表达式。
foreach i in=$qqarray do={
set qqnum [tonum $i]
set qqtemp [tonum $i]
set MyResult “”
set qqhex “”

while ($qqtemp>=16) do={
local zhengchu ($qqtemp/16)
local myMod ($qqtemp-($zhengchu*16))
set qqtemp $zhengchu
set myMod [pick “0123456789abcdef” $myMod]
set MyResult ($myMod.$MyResult)}

set qqtemp [pick “0123456789abcdef” $qqtemp]
set MyResult ($qqtemp.$MyResult)

global zerofilllen (8-[len $MyResult])
global zerofill “”
if ($zerofilllen=1) do={set zerofill “0”}
if ($zerofilllen=2) do={set zerofill “00”}
if ($zerofilllen=3) do={set zerofill “000”}
if ($zerofilllen=4) do={set zerofill “0000”}
if ($zerofilllen=5) do={set zerofill “00000”}
if ($zerofilllen=6) do={set zerofill “000000”}
if ($zerofilllen=7) do={set zerofill “0000000”}
if ($zerofilllen=8) do={set zerofill “00000000”}
set MyResult ($zerofill.$MyResult)
local qqhexarray ([tostr [pick $MyResult 0 2]],[tostr [pick $MyResult 2 4]],[tostr [pick $MyResult 4 6]],[tostr [pick $MyResult 6 8]])

foreach ii in=$qqhexarray do={
global qqbyte $ii
global n 0
foreach j in=$orihex do={
if ($ii=$j) do={set qqbyte [pick $chghex $n]}
set n ($n+1)
}

if ($qqbyte!=$ii) do={set qqhex ($qqhex.$qqbyte)} else={set qqhex ($qqhex.”\\x”.$qqbyte)}
}

/ip firewall layer7-protocol add name=(“qq-“.$qqnum) regexp=(“^.\?.\?\\x02.+”.$qqhex.”.+\\x03\$”) comment=”QQControl”

if ($qqcon=”bai”) do={
/ip firewall filter add action=accept chain=forward layer7-protocol=(“qq-“.$qqnum) comment=(“QQControl”)
}
if ($qqcon=”hei”) do={
/ip firewall filter add action=drop chain=forward layer7-protocol=(“qq-“.$qqnum) comment=(“QQControl”)
}
}
#循环程序结尾:此循环程序用于将每一个QQ号转换为相应的ros 的正则表达式。在结尾的几行(8行)把生成的正则表达式循环添加入L7,并在filter中加入accept或drop以控制是禁止还是通过。

if ($qqcon=”bai”) do={
/ip firewall filter add action=drop chain=forward layer7=(“qq-all”) comment=”QQControl-all”
}
if ($qqcon=”hei”) do={
/ip firewall filter add action=accept chain=forward layer7=(“qq-all”) comment=”QQControl-all”
}