Last active
November 6, 2024 20:09
-
-
Save Pliner/eb368a0836a11a49ae99bc29c195ad0d to your computer and use it in GitHub Desktop.
Mikrotik antifilter.download update script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:do { | |
:do { | |
/file remove "/ipsum.rsc"; | |
/file remove "/subnet.rsc"; | |
} on-error={} | |
:put "Downloading ipsum.rsc..."; | |
:do { | |
/tool fetch url="https://antifilter.download/list/ipsum.rsc" dst-path="/ipsum.rsc" | |
} on-error={ | |
:put "Error. Download failed"; | |
} | |
:put "Downloading subnet.rsc..."; | |
:do { | |
/tool fetch url="https://antifilter.download/list/subnet.rsc" dst-path="/subnet.rsc" | |
} on-error={ | |
:put "Error. Download failed"; | |
} | |
/ip firewall address-list remove [/ip firewall address-list find list=rkn] | |
:put "Importing ipsum.rsc..."; | |
:do { | |
/import "/ipsum.rsc"; | |
} on-error={ | |
:put "import failed. unknown error."; | |
} | |
:put "Importing subnet.rsc..."; | |
:do { | |
/import "/subnet.rsc"; | |
} on-error={ | |
:put "import failed. unknown error."; | |
} | |
:put "Update Complete."; | |
} |
:foreach address in=[/ip firewall address-list find list=($listname."-updated")] do={
Don't you miss a WHERE argument here?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@KPEBETKA, не плохо.