I am new with LUA so take it easy to me.
I have the following code that should be ran into mikrotik router
.
Could you possibly tell me what it does?
:local content
:local i
#For each mangle in the list
:foreach i in=[/ip firewall mangle find comment !=""] do={
#Pull comment out of queue and divide up accordingly
:set content [/ip firewall mangle get $i comment]
:if ([:find $content "!"] != "") do={
:local pos1 [:find $content "!"]
:local pos4 [:len $content]
:local pos2 ([:find [:pick $content ($pos1+1) $pos4] "!"]+($pos1+1))
:local pos3 ([:find [:pick $content ($pos2+1) $pos4] "!"]+($pos2+1))