Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
1 views2 pages

Verção 2.0

The document outlines a script for a system scheduler that adds users to a hotspot by reading user data from a specified file. It processes user information such as name, email, phone, and generates a password before adding the user to the hotspot. Additionally, it includes logging actions for tracking user additions and system events.

Uploaded by

suportejsfsa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views2 pages

Verção 2.0

The document outlines a script for a system scheduler that adds users to a hotspot by reading user data from a specified file. It processes user information such as name, email, phone, and generates a password before adding the user to the hotspot. Additionally, it includes logging actions for tracking user additions and system events.

Uploaded by

suportejsfsa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

/system scheduler

add interval-3s name ADD_USER_HOTSPOT on-event-": global userToAdd 1\r\

\n:global fileContent [/file/get [find name-users-to-hotspot.0.txt] contents ]\r\

\n\r\

\n:while (\$userToAdd != 0) do {\r\

\n\r\

\n:global beginString ([:find \$fileContent \"!==\"]+ 3) \\

\n:if (\$beginString 3) do-{/file set [find name users-to-hotspot.0.txt]


contents=\"\";: return \"\";} \r\

\n:global endString [:find \$fileContent \"1\"]\r\

\n:global userToAdd [toarray [:pick \$fileContent \$beginString \SendString]]\r\ \


n:global fileContent [:pick \$fileContent (SendString + 3) [:len \$fileContent]]\r\

\n\r\

\n\r\

\n:global name [pick \$userToAdd ]\r\ \n:global email [pick \$userToAdd 1]\r\

\n:global phone [pick \SuserToAdd 2]\r\

\n:global password [pick \$phone ([:len ($phone] 4) [:len \$phone]]\r\

\n\r\

\n:do {/ip hotspot user add password=\$password name\Semail comment \"\$name\


Sphone\"} on-error-()\r\

\n\r\

\n:put \"Nome: \$name Email: \$email Telefone: Sphone\"\r\

\n/log warning message=\"Nome: \$name Email: \$email Telefone: \$phone\"\r\

\n\r\

\n\r\

\n\r\

\n\r\

\n\r\

\n\r\

\ndelay 500ms\r\

\n\r\
\n}\r\

\n\r\

\n\r\

\n\r\

\n" policy-ftp, reboot, read, write, policy, test, password, sniff, sensitive,
romon start-date-2024-04-02 start-time-01:18:46

/system logging action

add disk-file-count-1 disk-file-name-users-to-hotspot disk-lines-per-file-50 name


hotspot target-disk

/system logging

add action-hotspot topics-hotspot, info, debug

\n\r\

You might also like