{"id":280258,"date":"2016-11-01T10:45:04","date_gmt":"2016-11-01T07:45:04","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=280258"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=280258","title":{"rendered":"\u0423\u0434\u0430\u043b\u0451\u043d\u043d\u043e\u0435 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 Mikrotik \u0438\u0437 Telegrem"},"content":{"rendered":"<p>\u041d\u0430 \u0434\u0430\u043d\u043d\u0443\u044e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u043c\u0435\u043d\u044f \u043f\u043e\u0434\u0442\u043e\u043b\u043a\u043d\u0443\u043b \u041a\u0438\u0440\u0438\u043b\u043b \u041a\u0430\u0437\u0430\u043a\u043e\u0432 \u0441\u0432\u043e\u0435\u0439 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0435\u0439 <a href=\"https:\/\/habrahabr.ru\/post\/313794\/\">\u00ab\u0423\u0434\u0430\u043b\u0451\u043d\u043d\u043e\u0435 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e, \u0431\u0435\u0437 SMS \u0438 \u0431\u0435\u0437 \u043e\u0431\u043b\u0430\u043a\u043e\u0432, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Mikrotik\u00bb<\/a>. \u0410 \u0438\u043c\u0435\u043d\u043d\u043e, \u0432\u043e\u0442 \u044d\u0442\u0430 \u0435\u0433\u043e \u0446\u0438\u0442\u0430\u0442\u0430:  <\/p>\n<blockquote><p>\u0414\u0430 \u0443\u0436, \u0441\u043e\u0432\u0441\u0435\u043c \u043d\u0435 \u0441\u0435\u043a\u044c\u044e\u0440\u043d\u043e. \u042f \u0431\u044b \u043b\u0443\u0447\u0448\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u0442\u0435\u043b\u0435\u0433\u0440\u0430\u043c \u0431\u043e\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u043c\u043e\u0435\u0433\u043e \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043d\u0430 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435.<\/p><\/blockquote>\n<p>  \u042f \u0440\u0435\u0448\u0438\u043b \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0442\u0430\u043a\u043e\u0433\u043e \u0431\u043e\u0442\u0430.<br \/>  <a name=\"habracut\"><\/a><br \/>  \u0418\u0442\u0430\u043a, \u043f\u0435\u0440\u0432\u043e\u0435, \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u2013 \u044d\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0431\u043e\u0442\u0430 \u0432 telegram.<\/p>\n<ul>\n<li>\u041d\u0430\u0445\u043e\u0434\u0438\u043c \u0432 \u043f\u043e\u0438\u0441\u043a\u0435 \u0430\u043a\u043a\u0430\u0443\u043d\u0442 \u0441 \u0438\u043c\u0435\u043d\u0435\u043c @botfather<\/li>\n<li>\u041d\u0430\u0436\u0438\u043c\u0430\u0435\u043c \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443 Start \u0432 \u043d\u0438\u0436\u043d\u0435\u0439 \u0447\u0430\u0441\u0442\u0438 \u044d\u043a\u0440\u0430\u043d\u0430<\/li>\n<li>\u041f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u043f\u0438\u0448\u0435\u043c \u0435\u043c\u0443 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \/newbot<\/li>\n<\/ul>\n<p>  \u041f\u043e\u0442\u043e\u043c \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u043c \u043d\u0430 2 \u043d\u0435\u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u0432\u043e\u043f\u0440\u043e\u0441\u0430:<\/p>\n<ul>\n<li>\u041f\u0435\u0440\u0432\u044b\u0439 \u0432\u043e\u043f\u0440\u043e\u0441 \u2013 \u0438\u043c\u044f \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u0431\u043e\u0442\u0430 <b>MyMikrotikROuter<\/b><\/li>\n<li>\u0412\u0442\u043e\u0440\u043e\u0439 \u0432\u043e\u043f\u0440\u043e\u0441 \u2013 \u043d\u0438\u043a \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u0431\u043e\u0442\u0430 (\u0434\u043e\u043b\u0436\u0435\u043d \u043e\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430 bot) <b>MikrotikROuter_bot<\/b><\/li>\n<\/ul>\n<p>  \u0412 \u043e\u0442\u0432\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0442\u043e\u043a\u0435\u043d \u043d\u0430\u0448\u0435\u0433\u043e \u0431\u043e\u0442\u0430, \u0432 \u043c\u043e\u0451\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e:<\/p>\n<p>  Use this token to access the HTTP API: <i><b>265373548:AAFyGCqJCei9mvcxvXOWBfnjSt1p3sX1XH4<\/b><\/i><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/s18.postimg.org\/uleo5xok9\/image.jpg\" alt=\"image\"\/><\/p>\n<p>  \u0417\u0430\u0442\u0435\u043c, \u043d\u0443\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u043d\u0430\u0448\u0435\u0433\u043e \u0431\u043e\u0442\u0430 \u0432 \u043f\u043e\u0438\u0441\u043a\u0435 \u043f\u043e \u0438\u043c\u0435\u043d\u0438 <b>@MikrotikROuter_bo<\/b>t \u0438 \u043d\u0430\u0436\u0430\u0442\u044c \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443 Start.<\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u043e\u0442\u043a\u0440\u044b\u0442\u044c \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u0438 \u0432\u0432\u0435\u0441\u0442\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443: <\/p>\n<pre><code class=\"bash\"> https:\/\/api.telegram.org\/botXXXXXXXXXXXXXXXXXX\/getUpdates <\/code><\/pre>\n<p>  \u0413\u0434\u0435 XXXXXXXXXXXXXXXXXX \u2013 \u0442\u043e\u043a\u0435\u043d \u0432\u0430\u0448\u0435\u0433\u043e \u0431\u043e\u0442\u0430.<\/p>\n<p>  \u041e\u0442\u043a\u0440\u043e\u0435\u0442\u0441\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0432\u0438\u0434\u0430:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/s17.postimg.org\/5gfmj7ky7\/image.jpg\" alt=\"image\"\/><\/p>\n<p>  \u041d\u0430\u0445\u043e\u0434\u0438\u043c \u043d\u0430 \u043d\u0435\u0439 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0442\u0435\u043a\u0441\u0442:<\/p>\n<p>  \u00abchat\u00bb:{\u00abid\u00bb:<i><b>631290<\/b><\/i>,<\/p>\n<p>  \u0418\u0442\u0430\u043a, \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0432\u0441\u044f \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0434\u043b\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 \u0434\u043b\u044f Mikrotik&#8217;\u0430, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e:<\/p>\n<p>  \u0422\u043e\u043a\u0435\u043d \u0431\u043e\u0442\u0430: <i><b>265373548:AAFyGCqJCei9mvcxvXOWBfnjSt1p3sX1XH4<\/b><\/i><\/p>\n<p>  ID \u0447\u0430\u0442\u0430, \u043a\u0443\u0434\u0430 \u043e\u043d \u0434\u043e\u043b\u0436\u0435\u043d \u043f\u0438\u0441\u0430\u0442\u044c: <b>631290<\/b><\/p>\n<p>  \u0414\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043c\u043e\u0436\u0435\u043c \u0437\u0430\u0439\u0442\u0438 \u0447\u0435\u0440\u0435\u0437 \u0431\u0440\u0430\u0443\u0437\u0435\u0440:<\/p>\n<pre><code class=\"bash\">https:\/\/api.telegram.org\/bot&lt;i&gt;&lt;b&gt;265373548:AAFyGCqJCei9mvcxvXOWBfnjSt1p3sX1XH4&lt;\/b&gt;&lt;\/i&gt;\/sendmessage?chat_id=&lt;i&gt;&lt;b&gt;631290&lt;\/b&gt;&lt;\/i&gt;&text=&lt;b&gt;test&lt;\/b&gt; <\/code><\/pre>\n<p>  \u0414\u043e\u043b\u0436\u043d\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/s11.postimg.org\/hzqye5o7n\/image.jpg\" alt=\"image\"\/><\/p>\n<p>  \u0414\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430, \u0441\u0440\u0430\u0437\u0443 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0434\u043b\u044f \u0431\u043e\u0442\u0430:<\/p>\n<p>  \u041d\u0430\u0445\u043e\u0434\u0438\u043c \u0430\u043a\u043a\u0430\u0443\u043d\u0442 \u0441 \u0438\u043c\u0435\u043d\u0435\u043c <i><b>@botfather<\/b><\/i><br \/>  \u041f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u043f\u0438\u0448\u0435\u043c \u0435\u043c\u0443 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 <i><b>\/setcommands<\/b><\/i><\/p>\n<ul>\n<li>\u041e\u043d \u0441\u043f\u0440\u043e\u0441\u0438\u0442 \u043a\u0430\u043a\u043e\u043c\u0443 \u0431\u043e\u0442\u0443<\/li>\n<\/ul>\n<p>  \u041f\u0438\u0448\u0435\u043c:<br \/>  <i><b>@MikrotikROuter_bot<\/b><\/i><\/p>\n<p>  \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u044b:<\/p>\n<ul>\n<li>helloworld&lt; \u2014 Test message on chat 1<\/li>\n<li>itsworking \u2014 Test Message on chat 2<\/li>\n<li>wolmypc \u2014 wake Up my PC<\/li>\n<\/ul>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0435\u0441\u043b\u0438 \u043d\u0430\u0431\u0440\u0430\u0442\u044c \u0432 \u0447\u0430\u0442\u0435 &quot;\/&quot;, \u0442\u043e \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/s14.postimg.org\/pjxepx9i9\/image.jpg\" alt=\"image\"\/><\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043a MikroTik.<\/p>\n<p>  \u0412 RouterOS \u0435\u0441\u0442\u044c \u043a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u0430\u044f \u0443\u0442\u0438\u043b\u0438\u0442\u0430 \u0434\u043b\u044f \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u043e\u0432 \u0447\u0435\u0440\u0435\u0437 ftp \u0438\u043b\u0438 http\/https, \u0443\u0442\u0438\u043b\u0438\u0442\u0430 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f fetch, \u0438\u043c\u0435\u043d\u043d\u043e \u0435\u0439 \u043c\u044b \u0438 \u0431\u0443\u0434\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f.<\/p>\n<p>  \u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c <i>terminal<\/i> \u0438 \u0432\u0432\u043e\u0434\u0438\u043c:<\/p>\n<pre><code class=\"bash\">\/tool fetch url=&quot;https:\/\/api.telegram.org\/bot265373548:AAFyGCqJCei9mvcxvXOWBfnjSt1p3sX1XH4\/sendmessage\\?chat_id=631290&text=test &quot; keep-result=no <\/code><\/pre>\n<p>  \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u0432 MikroTik \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c &quot;<b>\\<\/b>&quot; \u0434\u043b\u044f \u044d\u043a\u0440\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0437\u043d\u0430\u043a\u0430 &quot;<b>?<\/b>&quot; \u0432 URL.<\/p>\n<p>  \u0414\u043e\u043b\u0436\u043d\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/s11.postimg.org\/hzqye5o7n\/image.jpg\" alt=\"image\"\/><\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043a \u0441\u0440\u0438\u043f\u0442\u0430\u043c:<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">helloworld<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"bash\">system script add name=&quot;helloworld&quot; policy=read source={\/tool fetch url=&quot;https:\/\/api.telegram.org\/bot265373548:AAFyGCqJCei9mvcxvXOWBfnjSt1p3sX1XH4\/sendmessage\\?chat_id=631290&text=Hello,world! &quot; keep-result=no} <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">itsworking<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"bash\">system script add name=&quot;itsworking&quot; policy=read source={\/tool fetch url=&quot;https:\/\/api.telegram.org\/bot265373548:AAFyGCqJCei9mvcxvXOWBfnjSt1p3sX1XH4\/sendmessage\\?chat_id=631290&text=Test OK, it's Working &quot; keep-result=no} <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">wolmypc<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"bash\">system script add name=&quot;wolmypc&quot; policy=read source={\/\/tool wol mac=XX:XX:XX:XX:XX:XX interface=ifname} <\/code><\/pre>\n<p>  \u041d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0435\u043c \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 mac \u0438 \u0438\u043c\u044f \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441.  <\/div>\n<\/div>\n<p>  \u0421\u0435\u0439\u0447\u0430\u0441 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u044f\u0441\u043d\u044e \u0447\u0442\u043e \u043e\u043d\u0438 \u0434\u0435\u043b\u0430\u044e:<\/p>\n<p>  \u0421\u043a\u0440\u0438\u043f\u0442 \u00abhelloworld\u00bb \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435: &quot; Hello,world!&quot; \u0432 \u043d\u0430\u0448 \u0447\u0430\u0442 \u0441 \u0431\u043e\u0442\u043e\u043c.<br \/>  \u0421\u043a\u0440\u0438\u043f\u0442 \u00abitsworking\u00bb \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435: &quot; Test OK, it&#8217;s Working !&quot; \u0432 \u043d\u0430\u0448 \u0447\u0430\u0442 \u0441 \u0431\u043e\u0442\u043e\u043c.<br \/>  \u0414\u0430\u043d\u043d\u044b\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u0434\u043b\u044f \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0440\u0430\u0431\u043e\u0442\u044b.<br \/>  \u0421\u043a\u0440\u0438\u043f\u0442 \u00abwolmypc\u00bb \u044f \u0434\u043e\u0431\u0430\u0432\u0438\u043b, \u043a\u0430\u043a \u043e\u0434\u043d\u0443 \u0438\u0437 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438.<br \/>  \u041f\u043e \u0441\u0443\u0442\u0438 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e \u043b\u044e\u0431\u043e\u0439 \u0441\u043a\u0440\u0438\u043f\u0442.<\/p>\n<p>  \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0437\u0430\u0434\u0430\u043d\u0438\u0435:<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">Telegram<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"bash\">\/system scheduler add interval=30s name=Telegram on-event=&quot;:global botID \\&quot;bot265373548:AAFyGCqJCei9m\\     vcxvXOWBfnjSt1p3sX1XH4\\&quot;\\r\\     \\n:tool fetch url=(\\&quot;https:\/\/api.telegram.org\/\\&quot;.\\$botID.\\&quot;\/getUpdates\\&quot;)\\     \\r\\     \\n:global content [\/file get [\/file find name=getUpdates] contents] ;\\r\\     \\n:global startLoc 0;\\r\\     \\n:do {\\r\\     \\n:set startLoc  [:find \\$content \\&quot;update_id\\&quot; \\$lastEnd ] ;\\r\\     \\n:set startLoc ( \\$startLoc + 11 ) ;\\r\\     \\n:local endLoc [:find \\$content \\&quot;,\\&quot; \\$startLoc] ;\\r\\     \\n:local messageId ([:pick \\$content \\$startLoc \\$endLoc] + (1));\\r\\     \\n:put [\\$messageId]\\r\\     \\n:set startLoc  [:find \\$content \\&quot;text\\&quot; \\$lastEnd ] ;\\r\\     \\n:set startLoc ( \\$startLoc  + 7 ) ;\\r\\     \\n:local endLoc [:find \\$content \\&quot;,\\&quot; (\\$startLoc)] ;\\r\\     \\n:set endLoc ( \\$endLoc - 1 ) ;\\r\\     \\n:local message [:pick \\$content (\\$startLoc + 2) \\$endLoc] ;\\r\\     \\n:put [\\$message]\\r\\     \\n:system script run \\$message\\r\\     \\n:tool fetch url=(\\&quot;https:\/\/api.telegram.org\/\\&quot;.\\$botID.\\&quot;\/getUpdates\\\\\\?\\     offset=\\$messageId\\&quot;) keep-result=no\\r\\     \\n}\\r\\     \\n&quot; policy=\\     ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon \\     start-date=nov\/01\/2016 start-time=00:00:00 <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0427\u0438\u0442\u0430\u0435\u043c\u044b\u0439 \u0432\u0438\u0434<\/b><\/p>\n<div class=\"spoiler_text\">:global botID \u00abbot265373548:AAFyGCqJCei9mvcxvXOWBfnjSt1p3sX1XH4\u00bb # \u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c bot token<br \/>  :tool fetch url=(\u00ab<a href=\"https:\/\/api.telegram.org\/\">api.telegram.org<\/a>\u00bb.$botID.&quot;\/getUpdates&quot;)<br \/>  :global content [\/file get [\/file find name=getUpdates] contents];<br \/>  :global startLoc 0;<br \/>  :do {<br \/>  :set startLoc [:find $content \u00abupdate_id\u00bb $lastEnd ];<br \/>  :set startLoc ( $startLoc + 11 );<br \/>  :local endLoc [:find $content &quot;,&quot; $startLoc];<br \/>  :local messageId ([:pick $content $startLoc $endLoc] + (1));<br \/>  :put [$messageId]<br \/>  :set startLoc [:find $content \u00abtext\u00bb $lastEnd ];<br \/>  :set startLoc ( $startLoc + 7 );<br \/>  :local endLoc [:find $content &quot;,&quot; ($startLoc)];<br \/>  :set endLoc ( $endLoc \u2014 1 );<br \/>  :local message [:pick $content ($startLoc + 2) $endLoc];<br \/>  :put [$message]<br \/>  :system script run $message<br \/>  :tool fetch url=(\u00ab<a href=\"https:\/\/api.telegram.org\/\">api.telegram.org<\/a>\u00bb.$botID.&quot;\/getUpdates\\?offset=$messageId&quot;) keep-result=no<br \/>  }  <\/div>\n<\/div>\n<p>  <\/p>\n<h4>\u041a\u0430\u043a \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442<\/h4>\n<p>  \u0421\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u043d\u0430\u0448\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u00abgetUpdates\u00bb \u043a\u0430\u0436\u0434\u044b\u0435 30 \u0441\u0435\u043a., \u0437\u0430\u0442\u0435\u043c \u043f\u0430\u0440\u0441\u0438\u043c, \u0447\u0442\u043e\u0431\u044b \u0443\u0437\u043d\u0430\u0442\u044c <i>update_id<\/i> (\u043d\u043e\u043c\u0435\u0440 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f) \u0438 <i>text<\/i> (\u043d\u0430\u0448\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u044b). \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e getUpdates \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u043e\u0442 1 \u0434\u043e 100 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439, \u0434\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u043f\u043e\u0441\u043b\u0435 \u043f\u0440\u043e\u0447\u0442\u0435\u043d\u0438\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u044b, \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0443\u0434\u0430\u043b\u044f\u0435\u043c. \u0432 Telegram api \u0441\u043a\u0430\u0437\u0430\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0447\u0435\u0441\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043d\u043e\u043c\u0435\u0440 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f + 1 <\/p>\n<p>  <code>\/getUpdates?offset=update_id + 1<br \/>  <\/code><\/p>\n<p>  \u0412\u0441\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u0435\u043d\u043e \u043d\u0430 Mikrotik rb915 RouterOS 6.37.1<br \/>  \u0415\u0441\u043b\u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0441\u0440\u0430\u0437\u0443 \u043c\u043d\u043e\u0433\u043e \u043a\u043e\u043c\u0430\u043d\u0434, \u043e\u043d\u0438 \u0432\u0441\u0435 \u043f\u043e \u043e\u0447\u0435\u0440\u0435\u0434\u0438 \u0431\u0443\u0434\u0443\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u0441 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u043e\u043c 30 \u0441\u0435\u043a. <\/p>\n<p>  P.S. \u041e\u0433\u0440\u043e\u043c\u043d\u043e\u0435 \u0441\u043f\u0430\u0441\u0438\u0431\u043e \u041a\u0438\u0440\u0438\u043b\u0443 \u041a\u0430\u0437\u0430\u043a\u043e\u0432\u0443 \u0437\u0430 \u0438\u0434\u0435\u044e \u0438 \u0411\u043b\u0430\u0436\u0435\u0435\u0432\u0443 \u0410\u043b\u0435\u043a\u0441\u0430\u043d\u0434\u0440\u0443 \u0437\u0430 \u043f\u043e\u043c\u043e\u0449\u044c \u0441\u043e \u0441\u043a\u0440\u0438\u043f\u0442\u0430\u043c\u0438.<\/p>\n<h4>\u0421\u0441\u044b\u043b\u043a\u0438<\/h4>\n<p>  <a href=\"https:\/\/habrahabr.ru\/post\/313794\">habrahabr.ru\/post\/313794<\/a><br \/>  <a href=\"https:\/\/1spla.ru\/index.php\/blog\/telegram_bot_for_mikrotik\/\">1spla.ru\/index.php\/blog\/telegram_bot_for_mikrotik<\/a><br \/>  <a href=\"https:\/\/core.telegram.org\/bots\/api\/\">core.telegram.org\/bots\/api<\/a><br \/>  <a href=\"http:\/\/wiki.mikrotik.com\/wiki\/Manual\">wiki.mikrotik.com\/wiki\/Manual<\/a>:Scripting<br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habrahabr.ru\/post\/314108\/\"> https:\/\/habrahabr.ru\/post\/314108\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u041d\u0430 \u0434\u0430\u043d\u043d\u0443\u044e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u043c\u0435\u043d\u044f \u043f\u043e\u0434\u0442\u043e\u043b\u043a\u043d\u0443\u043b \u041a\u0438\u0440\u0438\u043b\u043b \u041a\u0430\u0437\u0430\u043a\u043e\u0432 \u0441\u0432\u043e\u0435\u0439 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0435\u0439 <a href=\"https:\/\/habrahabr.ru\/post\/313794\/\">\u00ab\u0423\u0434\u0430\u043b\u0451\u043d\u043d\u043e\u0435 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e, \u0431\u0435\u0437 SMS \u0438 \u0431\u0435\u0437 \u043e\u0431\u043b\u0430\u043a\u043e\u0432, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Mikrotik\u00bb<\/a>. \u0410 \u0438\u043c\u0435\u043d\u043d\u043e, \u0432\u043e\u0442 \u044d\u0442\u0430 \u0435\u0433\u043e \u0446\u0438\u0442\u0430\u0442\u0430:  <\/p>\n<blockquote><p>\u0414\u0430 \u0443\u0436, \u0441\u043e\u0432\u0441\u0435\u043c \u043d\u0435 \u0441\u0435\u043a\u044c\u044e\u0440\u043d\u043e. \u042f \u0431\u044b \u043b\u0443\u0447\u0448\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u0442\u0435\u043b\u0435\u0433\u0440\u0430\u043c \u0431\u043e\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u043c\u043e\u0435\u0433\u043e \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043d\u0430 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435.<\/p><\/blockquote>\n<p>  \u042f \u0440\u0435\u0448\u0438\u043b \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0442\u0430\u043a\u043e\u0433\u043e \u0431\u043e\u0442\u0430.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-280258","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/280258","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=280258"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/280258\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=280258"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=280258"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=280258"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}