Protect Your Script against kiddies!

Hi Guys

For a while I was looking for protecting my own scripts
against kiddies .So here we go may be it’s simple
but your script will be useless to most of them
:global cont [/system script get “Your Script Name” value-name=source] ;
:global contentLen [ :len $cont ] ;
:if ([:len $cont] = “Your script length”) do={
:if ([sy ro g s] = “Mikrotik Router Serial Number converted to HEX (e.g \32\39\33\39\30\31\37\30\45\39\37\36)” do={

Your Script Goes Here

} else={:log error “kiddie!”
}
} else={:log error “Not even kiddie!”
}First it will check for your script length then check for Mikrotik Router Serial Number
which is unique for every router in Encrypted format (HEX)
If the above conditions Applied then your script will executed
else it will give log warning

I’m not sure I get it.

Can you give a concrete sample scenario (with pseudo data of course) where without this, a script kiddie would succeed, and with this, they would fail and/or give up halfway or whatever.

That would work for very stupid kiddies :smiley:

But anyway nice idea.

can anyone revive the script? it does not work.. where to convert hex? can you give example? thanks im new to mikrotik

Run

:put [/sy ro g s]

and see what it outputs.

Whatever that is, place it there at the if.



But, as pointed out already, this so called script… or should I say “script enclosure”… would only protect you from really stupid script kiddies. If someone can view this script’s source, they can always just remove the serial number and length checks, and be on their way, as if this enclosure was never there at all. They have to be completely unaware of how scripting works (AND be unwilling to learn) to give up without doing that. And if they have their eye on your script, chances are they’re already aware of scripting at least enough to remove such an enclosure.

:put [/sy ro g s]

i tried and nothing happened :open_mouth:

Do you have a RouterBoard, or a PC? The above command outputs the serial number of a RouterBOARD. It doesn’t work on x86.