mirror of
https://github.com/furaihan/simple-mikrotik-script.git
synced 2025-08-01 16:44:29 +02:00
create script to secure your router and add a get mac vendor function
This commit is contained in:
parent
ebd51c2de8
commit
0d994f2232
4 changed files with 131 additions and 48 deletions
10
first-setup
10
first-setup
|
@ -3,3 +3,13 @@
|
|||
:global CHATID ("-4936xxx")
|
||||
#Change telegram bot id below with your own
|
||||
:global BOTID ("62xxxxxxxx:AAExxxx")
|
||||
:global GetMacVendor
|
||||
:set GetMacVendor do={
|
||||
local MacAddress [:tostr $1]
|
||||
:do {
|
||||
local result ([/tool fetch mode=https http-method=get url=("https://api.macvendors.com/".[:pick [:tostr $MacAddress] 0 8 ]) as-value output=user ]->"data")
|
||||
return $result
|
||||
} on-error={
|
||||
return "Error! this probably cause from unknown vendor or a connection problem"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue