The script gets to the point where its adding the IP to the list but it fails.
I reproduced the issue on the command line.
There is a global variable called $Fline that has the first IP
[ssp@Tik] > :put $Fline
1.234.21.73
This works
[ssp@Tik] > /ip firewall address-list add address=1.234.21.73 list=FeodoC2
This fails
[ssp@Tik] > /ip firewall address-list add address=$Fline list=FeodoC2
is not a valid dns name
I have another variable that came from a different list and this one works fine
[ssp@Tik] > :put $Tline
185.242.113.224
[ssp@Tik] > /ip firewall address-list add address=$Tline list=FeodoC2
[ssp@Tik] >
only think I can figure is the source has some strange encoding but not sure how to see that in Mikrotik
any ideas what could cause this?
/system script
add name=test owner=rex source="1.234.21.73**\r**"
[test@matrix] >
Mmm... I just invent a method to convert a string to "RouterOS Escaped code and vice-versa..."
ok. I did open the file in Notepad++ with end of line char turned on. I see it. was not sure if Notepad++ inserted that since I’m on a Windows machine but guess not.
I’ll give that a try.
Thank you!!