Community discussions

MikroTik App
 
User avatar
rextended
Forum Guru
Forum Guru
Topic Author
Posts: 8014
Joined: Tue Feb 25, 2014 12:49 pm
Location: 🇮🇹, my 💔 is in 🇺🇦

✂ Rextended Fragments of Snippets

Thu Aug 12, 2021 3:44 pm

Over the years I have published dozens of scripts,
most need to be updated and are hard to find with standard search.
And they also need to be checked if they are still valid for the new stable v7 version.

I'm slowly re-reading all of my 7000 posts
and I'll add here all the useful Snippets I found,
with a description and the link to the topic where they are present.

In the future, when I'm done, I'll index everything for better search.
Last edited by rextended on Tue May 24, 2022 10:52 pm, edited 2 times in total.
Reason: New Snippets
✂ Rextended Fragments of Snippets

Vld4UmVHUkdhelJUTTJzOQ==
 
User avatar
rextended
Forum Guru
Forum Guru
Topic Author
Posts: 8014
Joined: Tue Feb 25, 2014 12:49 pm
Location: 🇮🇹, my 💔 is in 🇺🇦

Re: ✂ Rextended Fragments of Snippets

Wed Sep 15, 2021 10:29 am

wireless on off with mode button
viewtopic.php?f=7&t=115078&p=857648#p857648

create directory and subdirectory
viewtopic.php?f=9&t=151644&p=878316#p878368

mac ping results saved on variable
viewtopic.php?f=2&t=69773&p=876970#p876970

Put snmp-get value on variable
viewtopic.php?f=9&t=136809&p=876969#p876969

Convert character to uppercase or lowercase
viewtopic.php?f=9&t=75555&p=876693#p876693

UNIX time Epoch, day of the week, ISO:8601 date
viewtopic.php?f=9&t=75555#p876568

Import IP or IP prefix from file
viewtopic.php?f=9&t=166293#p872049

How to download only one piece of file at a time with /tool fetch and put it inside a variable
viewtopic.php?f=9&t=177530

Decode USSD hexstr2chrstr hexadecimal string to char string
viewtopic.php?f=9&t=129693&p=871742#p871742

hex2chr hexadecimal to char
viewtopic.php?f=9&t=108127&p=871741#p871741

definitive ip or ip-prefix posix regex
viewtopic.php?f=9&t=152632&p=871284#p871284

auto add (starlink) classless route
viewtopic.php?f=2&t=175272&p=871239#p871239

int2hex num2hex integer number to hexadecimal convert function
viewtopic.php?f=2&t=57665&p=868898#p868898

check host status
viewtopic.php?f=9&t=177005&p=868482#p868482

dual wan A-B-C failover
viewtopic.php?f=2&t=176574&p=865665#p865665

dual dhcp wan failover
viewtopic.php?f=13&t=176956&p=868082#p868082

How to ***really*** block invalid ICMP, TCP, UDP packets and others (ver. 2021)
viewtopic.php?f=9&t=83387&p=867386

comma separated value of interface list
viewtopic.php?f=9&t=176428&p=865545#p865545

num2month mon2MON mon2num number month
viewtopic.php?f=9&t=176408&p=864690#p864688

short address list ip address aggregator (to do)
viewtopic.php?f=23&t=148187&p=864415#p864415

send whatsapp notification
viewtopic.php?f=9&t=124157&p=862628#p860703

asynchronous script execution
viewtopic.php?f=9&t=87589&p=861988#p861988

enable x64 mode on RouterOS x86 installed on x64 (virtual or not) machine
viewtopic.php?f=2&t=116621&p=861102#p861102

random number generator (without OTP frills)
viewtopic.php?f=9&t=175453&p=858629

default firewall rules
viewtopic.php?f=13&t=175129&p=856824#p856824

convert string to ip-prefix
viewtopic.php?f=9&t=127039&p=854216#p854216

dynamic variables
viewtopic.php?f=9&t=178435&p=879152#p879152

manage fetch errors
viewtopic.php?f=2&t=178355&p=878643#p878643

sort array, sort file by date, date2ymd
viewtopic.php?f=9&t=178532#p879931
✂ Rextended Fragments of Snippets

Vld4UmVHUkdhelJUTTJzOQ==
 
User avatar
rextended
Forum Guru
Forum Guru
Topic Author
Posts: 8014
Joined: Tue Feb 25, 2014 12:49 pm
Location: 🇮🇹, my 💔 is in 🇺🇦

Re: ✂ Rextended Fragments of Snippets

Fri Sep 17, 2021 2:42 am

✂ Rextended Fragments of Snippets

Vld4UmVHUkdhelJUTTJzOQ==
 
User avatar
rextended
Forum Guru
Forum Guru
Topic Author
Posts: 8014
Joined: Tue Feb 25, 2014 12:49 pm
Location: 🇮🇹, my 💔 is in 🇺🇦

Re: ✂ Rextended Fragments of Snippets

Fri Sep 17, 2021 11:50 am

DHCPv6 option 39 fqdn2encdns FQDN to DNS encoding DNS encoder

viewtopic.php?f=1&t=178607&p=880429#p880424
✂ Rextended Fragments of Snippets

Vld4UmVHUkdhelJUTTJzOQ==
 
User avatar
rextended
Forum Guru
Forum Guru
Topic Author
Posts: 8014
Joined: Tue Feb 25, 2014 12:49 pm
Location: 🇮🇹, my 💔 is in 🇺🇦

Re: ✂ Rextended Fragments of Snippets

Sat Oct 02, 2021 1:53 pm

Save and Restore global variables on reboot

viewtopic.php?f=9&t=170591&p=883422#p883422
✂ Rextended Fragments of Snippets

Vld4UmVHUkdhelJUTTJzOQ==
 
User avatar
rextended
Forum Guru
Forum Guru
Topic Author
Posts: 8014
Joined: Tue Feb 25, 2014 12:49 pm
Location: 🇮🇹, my 💔 is in 🇺🇦

Re: ✂ Rextended Fragments of Snippets

Sat Feb 26, 2022 11:25 am

Save RouterBOARD full backup of everything [configuration, certificates, host key, router users (no passwords), licence, user-manager, dude, other files]
viewtopic.php?f=1&t=175360&p=858564#p858564
✂ Rextended Fragments of Snippets

Vld4UmVHUkdhelJUTTJzOQ==
 
User avatar
rextended
Forum Guru
Forum Guru
Topic Author
Posts: 8014
Joined: Tue Feb 25, 2014 12:49 pm
Location: 🇮🇹, my 💔 is in 🇺🇦

Re: ✂ Rextended Fragments of Snippets

Mon May 02, 2022 5:23 am

Online function to obtain the start date and time of the RouterBOARD.
It takes into account the time zone set in the RouterBOARD.
viewtopic.php?t=185616#p930465
✂ Rextended Fragments of Snippets

Vld4UmVHUkdhelJUTTJzOQ==
 
User avatar
rextended
Forum Guru
Forum Guru
Topic Author
Posts: 8014
Joined: Tue Feb 25, 2014 12:49 pm
Location: 🇮🇹, my 💔 is in 🇺🇦

Re: ✂ Rextended Fragments of Snippets

Thu May 19, 2022 7:17 pm

Convert float to Celsius for TG-BT5-OUT
viewtopic.php?p=934123#p934123
✂ Rextended Fragments of Snippets

Vld4UmVHUkdhelJUTTJzOQ==
 
User avatar
rextended
Forum Guru
Forum Guru
Topic Author
Posts: 8014
Joined: Tue Feb 25, 2014 12:49 pm
Location: 🇮🇹, my 💔 is in 🇺🇦

Re: ✂ Rextended Fragments of Snippets

Mon May 23, 2022 2:39 pm

Convert the date string (May|may)/23/2022 to number 20220523
(the "date" type on RouterOS do not exist)
viewtopic.php?p=934798#p934798
✂ Rextended Fragments of Snippets

Vld4UmVHUkdhelJUTTJzOQ==
 
User avatar
rextended
Forum Guru
Forum Guru
Topic Author
Posts: 8014
Joined: Tue Feb 25, 2014 12:49 pm
Location: 🇮🇹, my 💔 is in 🇺🇦

Re: ✂ Rextended Fragments of Snippets

Tue May 24, 2022 5:12 pm

Fomr 2014: I forgot that on print and on find is possible to do some operations insde search string...
like (just an example)
/ip address print where (network + 1) = 192.168.88.1

viewtopic.php?p=411411#p411411
✂ Rextended Fragments of Snippets

Vld4UmVHUkdhelJUTTJzOQ==
 
User avatar
rextended
Forum Guru
Forum Guru
Topic Author
Posts: 8014
Joined: Tue Feb 25, 2014 12:49 pm
Location: 🇮🇹, my 💔 is in 🇺🇦

Re: ✂ Rextended Fragments of Snippets

Tue May 24, 2022 5:23 pm

✂ Rextended Fragments of Snippets

Vld4UmVHUkdhelJUTTJzOQ==
 
User avatar
rextended
Forum Guru
Forum Guru
Topic Author
Posts: 8014
Joined: Tue Feb 25, 2014 12:49 pm
Location: 🇮🇹, my 💔 is in 🇺🇦

Re: ✂ Rextended Fragments of Snippets

Tue May 24, 2022 7:09 pm

Code: Select all

# TAG # lastcheck (25 Mar 2014, 13:34)
viewtopic.php?p=417214#p417214
✂ Rextended Fragments of Snippets

Vld4UmVHUkdhelJUTTJzOQ==
 
User avatar
rextended
Forum Guru
Forum Guru
Topic Author
Posts: 8014
Joined: Tue Feb 25, 2014 12:49 pm
Location: 🇮🇹, my 💔 is in 🇺🇦

Re: ✂ Rextended Fragments of Snippets

Fri Jun 03, 2022 7:31 pm

Check if the URL is valid and read server response and redirects:
viewtopic.php?p=937034#p937124
✂ Rextended Fragments of Snippets

Vld4UmVHUkdhelJUTTJzOQ==

Who is online

Users browsing this forum: gotsprings and 12 guests