Skip to content

Instantly share code, notes, and snippets.

@ruslan-khalitov
Forked from Pliner/import
Created April 6, 2021 01:41
Show Gist options
  • Select an option

  • Save ruslan-khalitov/901bdb8ce19a1c17dd56f6c6d47475e8 to your computer and use it in GitHub Desktop.

Select an option

Save ruslan-khalitov/901bdb8ce19a1c17dd56f6c6d47475e8 to your computer and use it in GitHub Desktop.
Mikrotik antifilter.download update script
: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.";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment