mirror of
https://github.com/wifinigel/MikrotikScripting.git
synced 2025-07-02 22:24:29 +02:00
initial commit
This commit is contained in:
commit
c782dde326
61 changed files with 1457 additions and 0 deletions
17
scripts/ch10-01-bad-script.rsc
Normal file
17
scripts/ch10-01-bad-script.rsc
Normal file
|
@ -0,0 +1,17 @@
|
|||
# filename: ch10-01-bad-script.rsc
|
||||
|
||||
:local w {"mikrotik.com"; "www.google.com"; "twitter.com"};
|
||||
|
||||
:foreach s in=$w do={
|
||||
:local i [/resolve $s];
|
||||
:local p [/ping $i count=3 ];
|
||||
:local u [/tool fetch url=("https://$s") mode=https http-method=get \
|
||||
as-value keep-result=no];
|
||||
|
||||
:put "==========================================";
|
||||
:put ("Site: $s");
|
||||
:put ("IP Address = $i");
|
||||
:put ("Ping success = $p/3");
|
||||
:put ("Page d/load duration: " . $u->"duration");
|
||||
:put "===========================================";
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue