bitwise operator works, whats missing is :toipv6
Missing from being implemented or missing in my command?
:put ([:toip6 2003:cf:2f1e:5c00:d250:99ff:fec0:d180 ] & [:toip6 ffff:ffff:ffff:ff00::])
… does not give an error, but does not give output neither.
I mailed support and they told me “to be aware of the issue, perhaps it will be fixed in the upcoming versions” (see Ticket#2018061222006824).
mrz, can you give advise?
BTW, this looks borked, no?
:put [:typeof [:toip6 ffff::/64]]
nil
Yes it is not implemented.
url_encode();
+1 to this, my implementation is limited and awful
simulate a runtime command and send it to a running command in a script like in these commands
I’d like to have a debug function that helped with basic syntax. When writing code I spend most of my time getting the basics in place. I write my logic then comment most of it out then uncomment line by line to make sure each line is working. With ros code, if it doesn’t work, you get nothing to say where the error is
Also,
- log dates in YYYYMMDD HHMMSS format.
- log dates that work around midnight when not in GMT.
- Ability to add items to end of arrays
Charles
I’d like to have a debug function that helped with basic syntax. When writing code I spend most of my time getting the basics in place. I write my logic then comment most of it out then uncomment line by line to make sure each line is working. With ros code, if it doesn’t work, you get nothing to say where the error is
You may paste the script into Terminal after “{” - that will prevent it from running line by line. Then “}” and Enter to execute.
- Ability to add items to end of arrays
Looks like “+” works just fine:
{
:local a {1;2;3};
:set a ($a + 5);
:foreach v in=$a do={
:put $v
};
}
Thanks. I’ll try those. Are they mentioned in the wiki?
Any thoughts on the dates?
Are they mentioned in the wiki?
Not sure
Any thoughts on the dates?
I didn’t get what’s wrong with dates, sorry
- Ability to add items to end of arrays
Looks like “+” works just fine:
No, the documentation says using a comma is the correct way:
:set a ($a, 5);
https://wiki.mikrotik.com/wiki/Manual:Scripting#Concatenation_Operators
Thanks. Commas it will be!
The date challenge is twofold:
- Dates in the log file are not consistent. The date is excluded from entries for today and the year is missed out for entries this year. Ideally there would be a switch to set all log date/times to YYYYMMDDHHMMSS format. Machine readable and sortable.
- If the router is set to anything else apart from GMT (ie there is a time offset), the log entries date/times go mad around midnight (GMT). Look at your log files when time is 00.00 GMT. I can only think it is a bug in ros. I’m on 6.43.2
Charles
Well, I believe log format has nothing to do with built-in scripting functions…
About 00:00 bug (unfortunately, I don’t have a log at 00:00, so I don’t know what are you talking about) - have you contacted support@mikrotik.com?
Chupaka
You are correct about log entries not directly being about functions but the flip side is that you need lots of other functions to be built to manipulate the inconsistent log date formats.
I’ll try support@.
Thanks
Charles
Secure DNS implementation would be welcome in the future
Secure DNS implementation would be welcome in the future
What scripting functions do you mean?..
Hallo Chupaka, something like that.
In the same way the SSL turns HTTP web traffic into HTTPS encrypted Web traffic, DNSCrypt turns regular DNS traffic into encrypted DNS traffic that is secure from eavesdropping and man-in-the-middle attacks.
Grt
You mean, some function like “:resolve”, but using DNSCrypt protocol?
Yes indeed that’s what i mean Chupaka.
Completely unrelated to original topic.