Block TOR list with script

Hy. I want to block TOR with script, but it don`t add addresses

:local getIps do={
:local resp [/tool fetch http-method=get url=“https://check.torproject.org/torbulkexitlist” as-value output=user];
:if ($resp->“status” = “finished”) do={
:log info “TOR : getIps : Finished!”;
:return ($resp->“data”)
} else {
:log info “TOR : getIps : Failure”;
}
}
:local clearOldIps do={
:local listName $1;
:log info “$listName”;
:local IpsOld [:ip firewall address-list find where list=$listName];
:log info “TOR : clearOldIps : $[len $IpsOld]”;
:ip firewall address-list remove $IpsOld;
:log info “TOR : clearOldIps : Finished!”;
}
:local addNewIps do={
:local iocs [:toarray $1];
:log info “TOR : addNewIps : $[len $iocs]”;
:foreach ipp in $iocs do={
:ip firewall address-list add address=$ipp list=“TOR”;
};
:log info “TOR : addNewIps : Finished!”;
}
:do {
:log info “TOR : IOC (IP) : Start”;
:local iocs [$getIps];
:log info “TOR : IOC (IP) : clearOldIps”;
$clearOldIps “TOR”;
:log info “TOR : IOC (IP) : addNewIps”;
$addNewIps $iocs;
:log info “TOR : IOC (IP) : Stop”;
} on-error={
:log info “TOR : IOC (IP) : Error: $ErrVar”;
}

What would be the request?

Do you expect any correct result by writing random things in the script?

Who is convinced that just using :toarray will convert that file into an array?
Ask whoever made that awful script.

just open that file, copy the addresses, make them into an address list.