i have this script
but i need help to change it for my needs
:foreach i in=[/ip dns cache find] do={
:local bNew “true”;
:local cacheName [/ip dns cache all get $i name] ;
:if (([:find $cacheName “google”] != 0) || ([:find $cacheName “porn”] != 0)) do={
:local tmpAddress [/ip dns cache get $i address] ;
:if ( [/ip firewall address-list find ] = “”) do={
:log info (“added entry: $[/ip dns cache get $i name] IP $tmpAddress”);
/ip firewall address-list add address=$tmpAddress list=restricted disabled=no comment=$cacheName;
} else={
:foreach j in=[/ip firewall address-list find ] do={
:if ( [/ip firewall address-list get $j address] = $tmpAddress ) do={
:set bNew “false”;
}
}
:if ( $bNew = “true” ) do={
:log info (“added entry: $[/ip dns cache get $i name] IP $tmpAddress”);
/ip firewall address-list add address=$tmpAddress list=restricted disabled=no comment=$cacheName;
}
}
}
}
so thats the script i want to change reading part
basic works google,porn,torrents,googleearth etc
i want it to read from a addresslist.txt file
so in the file ill have test like this google,torrents,porn,xxx,gay,sex,lover,+18
etc
so my script will read the text file and add it like the scrip is doing can anyone help me with this as i cant get the reading txt file right thanks for the support