{ #www.routeros.cn 20220323 :local nyr :local Year :local Month :local Day :local stime [/system clock get time] :local Date [/system clock get date] ##7.10 >v=7 v< 7.10 =6 :local rosver 7 :if ($rosver = 6) do={ :set Year ([:pick $Date 7 11]) :set Month ([:find jan,feb,mar,apr,may,jun,jul,aug,sep,oct,nov,dec [:pick $Date 0 3]]+1) :if ($Month < 10) do={ :set Month ("0" . $Month) } :set Day ([:pick $Date 4 6]) :set nyr ($Year . $Month . $Day) } else={ :set Year ([:pick $Date 0 4]) :set Month ([:pick $Date 5 7]) :set Day ([:pick $Date 8 10]) :set nyr ($Year . $Month . $Day) } :local ii "0"; /ppp secret; :foreach puse in [find disabled=no comment!="" comment!="admin"] do={ :local pcom [get $puse comment]; :local pnam [get $puse name]; :set ii ($ii + 1) :if ([:len $pcom] >= 8) do={ :local pcom8 [:tonum [:pick $pcom 0 8]]; :if ($pcom8>1) do={ :if ($nyr>=$pcom8) do={ /ppp secret disable [/ppp secret find name=$pnam];:set ii ($ii-1); /ppp active remove [/ppp active find name=$pnam]; :log error ("\BD\FB\D3\C3\D3\C3\BB\A7 [" . $pnam . "]"); }} else={:log error ("\B4\ED\CE\F3\B5\C4\B1\B8\D7\A2\B8\F1\CA\BD [" . $pnam . "] [" . $pcom . "]");} } else={:log error ("\C8\D5\C6\DA\B1\B8\D7\A2\B2\BB\D7\E38\CE\BB [" . $pnam . "] [" . $pcom . "]")}} :log warning ("\D3\D0\D0\A7\D3\C3\BB\A7\CA\FD [" . $ii . "]"); }