{"id":253771,"date":"2015-03-25T17:13:18","date_gmt":"2015-03-25T13:13:18","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=253771"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=253771","title":{"rendered":"\u041c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 AD \u043d\u0430 \u043a\u043e\u043b\u0435\u043d\u043a\u0435 \u0438 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e"},"content":{"rendered":"<p>     \t\u041f\u043e \u043c\u0435\u0440\u0435 \u0440\u043e\u0441\u0442\u0430 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u0438 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u043e\u0432\u0435\u043d\u0438\u044f \u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u043a\u043e\u043b-\u0432\u0430 \u0440\u0430\u0431\u043e\u0447\u0438\u0445 \u043c\u0435\u0441\u0442 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0430 \u0438\u0434\u0435\u044f \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0440\u0435\u0441\u0443\u0440\u0441, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u043e \u043d\u0430\u0439\u0442\u0438 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043f\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e, \u041f\u041a \u0438 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043a\u0430\u043a\u0438\u0435-\u043d\u0438\u0431\u0443\u0434\u044c \u043e\u0442\u0447\u0435\u0442\u044b. <\/p>\n<p>  \u041f\u041e \u0442\u0430\u043a\u043e\u0435 \u0435\u0441\u0442\u044c, \u043e\u043d\u043e \u0441\u043b\u043e\u0436\u043d\u043e\u0435 \u0438 \u043e\u0431\u044b\u0447\u043d\u043e \u0441\u0442\u043e\u0438\u0442 \u0434\u0435\u043d\u0435\u0433. \u0411\u0443\u0434\u0435\u043c \u043a\u043b\u0435\u043f\u0430\u0442\u044c \u0441\u0432\u043e\u0435 \u0438 \u043d\u0430 \u043a\u043e\u043b\u0435\u043d\u043a\u0435.<\/p>\n<p>  \u0422\u0430\u043a\u0436\u0435 \u043d\u0430\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0440\u044f\u0434 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439 \u0438\u0437-\u0437\u0430:  <\/p>\n<ul>\n<li>\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0435\u0440\u043e\u0432 \u0434\u043e\u043c\u0435\u043d\u0430 <\/li>\n<li>\u041f\u041e \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u0438\u043a\u043e\u0432 (\u043d\u0435\u0444\u0438\u0433 \u0442\u0443\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043b\u0435\u0432\u044b\u0435 exe \u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u044b), \u0432 \u0441\u0432\u043e\u0435 \u041f\u041e \u043d\u0435 \u043f\u0443\u0441\u0442\u0438\u043c.<\/li>\n<li>\u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u0441\u0435\u0442\u0435\u0432\u0438\u043a\u043e\u0432 (\u0441\u043b\u043e\u0436\u043d\u0430\u044f \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 VLAN, ACL \u0438 \u0437\u0430\u043f\u0440\u0435\u0442\u043e\u0432 \u0432\u0441\u0435\u0433\u043e, \u0447\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u043a\u0443\u0434\u0430-\u0442\u043e \u043a\u043e\u043d\u043d\u0435\u043a\u0442\u0438\u0442\u044c\u0441\u044f)<\/li>\n<li>\u043d\u0435 \u043f\u0440\u043e\u0434 \u0440\u0435\u0441\u0443\u0440\u0441 \u043d\u0430 \u043f\u0440\u043e\u0434 \u0441\u0438\u0441\u0442\u0435\u043c\u0435<\/li>\n<li>\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u0438\u043a\u043e\u0432 \u0438 \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c<\/li>\n<\/ul>\n<p>  <img decoding=\"async\" src=\"\/\/habrastorage.org\/files\/de1\/0a6\/06c\/de10a606cbce4e6ab3c0b155e16e01bc.jpg\"\/><\/p>\n<p>  \u041f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0446\u0435\u043b\u0438:<br \/>  1. \u041a\u0443\u0434\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u0445\u043e\u0434\u044f\u0442<br \/>  2. \u0413\u0434\u0435 \u043e\u043d\u0438 \u0437\u0430\u0431\u044b\u0432\u0430\u044e\u0442 \u0432\u044b\u0445\u043e\u0434\u0438\u0442\u044c<br \/>  3. \u041a\u0442\u043e \u043b\u043e\u0433\u0438\u043d\u0438\u0442\u044c\u0441\u044f \u043f\u043e\u0434 \u0441\u0432\u043e\u0438\u043c\/\u043d\u0435 \u0441\u0432\u043e\u0438\u043c \u043b\u043e\u0433\u0438\u043d\u043e\u043c \u043d\u0430 \u043e\u0434\u043d\u043e\u043c\/\u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u041f\u041a<br \/>  4. \u0420\u0430\u0441\u0441\u0430\u0434\u043a\u0430 \u043f\u043e \u043c\u0435\u0441\u0442\u0430\u043c<br \/>  5. \u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 \u0441\u0445\u0435\u043c\u0435 \u044d\u0442\u0430\u0436\u0430<br \/>  6. \u041e\u0442\u0447\u0435\u0442 \u043e \u0440\u0430\u0431\u043e\u0447\u0435\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438 (\u0432 \u0442.\u0447. \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0431\u044b\u043b \u00ab\u0430\u043a\u0442\u0438\u0432\u0435\u043d\u00bb \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435)<br \/>  7. \u0414\u0435\u043b\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u0430\u0432 \u0434\u043b\u044f \u0438\u043d\u0436\u0435\u043d\u0435\u0440\u043e\u0432 \u0441 \u0446\u0435\u043b\u044c\u044e \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0438.<\/p>\n<p>  <a name=\"habracut\"><\/a><\/p>\n<p>  \u041d\u0435\u043c\u043d\u043e\u0433\u043e \u043e \u0441\u0435\u0442\u0438:<br \/>  \u0412 \u0441\u0435\u0442\u0438 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 VLAN \u0441 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0435\u0439 \u0432 AD, \u0441\u0432\u044f\u0437\u043a\u0430 Computer + User. \u041f\u0440\u0438 \u043f\u0440\u043e\u0432\u0430\u043b\u0435 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043f\u043e\u043f\u0430\u0434\u0430\u044e\u0442 \u0432 \u0433\u043e\u0441\u0442\u0435\u0432\u044b\u0435 VLANs, \u0433\u0434\u0435 \u0443 \u043d\u0438\u0445 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u043a\u0430\u043a\u0438\u0435-\u043b\u0438\u0431\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u044b, \u043a\u0440\u043e\u043c\u0435 \u043a\u0430\u043a \u0432\u044b\u0439\u0442\u0438 \u0438\u0437 \u0441\u0438\u0441\u0442\u0435\u043c\u044b. <br \/>  VLAN \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \/23<\/p>\n<p>  \u041d\u0435\u043c\u043d\u043e\u0433\u043e \u043e DNS: <br \/>  DNS AD integrated. DNS scavenging \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d. \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0432\u0432\u0438\u0434\u0443 \u043f\u0443\u043d\u043a\u0442\u0430 \u0432\u044b\u0448\u0435, \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u043e\u0447\u0435\u043d\u044c \u043c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0441 \u043f\u043e\u0438\u0441\u043a\u043e\u043c \u041f\u041a \u043f\u043e DNS, \u0434\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 A, PTR \u0437\u0430\u043f\u0438\u0441\u0435\u0439. <\/p>\n<p>  \u041d\u0435\u043c\u043d\u043e\u0433\u043e \u043e\u0431 GPO:<br \/>  \u0412\u043a\u043b\u044e\u0447\u0435\u043d\u0430 \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0430 \u0441\u0442\u0430\u043d\u0446\u0438\u0438 \u043f\u043e \u043d\u0435 \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438 = 5 \u043c\u0438\u043d\u0443\u0442.<br \/>  \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0440\u0430\u0437\u0434\u0435\u043b logon\/logoff scripts.<\/p>\n<p>  \u041d\u0435\u043c\u043d\u043e\u0433\u043e \u043e\u0431 AD:<br \/>  \u0414\u043e\u0441\u0442\u0443\u043f\u044b \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0433\u0440\u0443\u043f\u043f \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438. \u0428\u0430\u0433 \u0432 \u0441\u0442\u043e\u0440\u043e\u043d\u0443 \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0431\u0435\u0433\u043e\u043c.<br \/>  2 \u0434\u043e\u043c\u0435\u043d\u0430 + Domain Trust<\/p>\n<p>  \u0412 \u043c\u043e\u0435\u043c \u0440\u0430\u0441\u043f\u043e\u0440\u044f\u0436\u0435\u043d\u0438\u0438 \u0435\u0441\u0442\u044c:  <\/p>\n<ul>\n<li>\u0428\u0430\u0440\u0430, \u043a\u0443\u0434\u0430 \u043c\u043e\u0433\u0443\u0442 \u0432\u0441\u0435 \u043f\u0438\u0441\u0430\u0442\u044c (\u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435, \u0437\u0430\u043f\u0438\u0441\u044c)<\/li>\n<li>\u0412\u0438\u0440\u0442\u0443\u0430\u043b\u043a\u0430 \u043d\u0430 \u0431\u0430\u0437\u0435 Windows Server 2012R2<\/li>\n<\/ul>\n<p>  \u0421\u043f\u0438\u0441\u043e\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u0433\u043e \u041f\u041e:<br \/>  Windows Server 2012R2 (IIS)<br \/>  Visual Studio 2012 (\u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u041f\u041e \u0434\u043b\u044f \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u0435\u0439 \u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439)<br \/>  Mysql 5.6 (\u0411\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u044f \u0445\u0440\u0430\u043d\u044e \u0434\u0430\u043d\u043d\u044b\u0435)<br \/>  Mysql Work Bench (\u041f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u0411\u0414 \u043d\u0430 \u043a\u043e\u043b\u0435\u043d\u043a\u0435)<br \/>  Perl for Windows (\u041f\u043e\u0440\u0442\u0430\u043b + \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0438\u0441)<\/p>\n<p>  \u0418 \u044f\u0437\u044b\u043a\u043e\u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f:<br \/>  Perl <br \/>  C#<br \/>  Powershell<\/p>\n<p>  \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u0430 \u0411\u0414:  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0412\u044b\u0440\u0432\u0438 \u0433\u043b\u0430\u0437<\/b><\/p>\n<div class=\"spoiler_text\"><img decoding=\"async\" src=\"\/\/habrastorage.org\/files\/a6a\/69b\/9d3\/a6a69b9d36924a45a4faa038f89ea87d.jpg\"\/>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">SQL<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"sql\">-- -- Database: `logon` --  -- --------------------------------------------------------  -- -- Table structure for table `bcs` --  CREATE TABLE IF NOT EXISTS `bcs` (   `id` int(11) NOT NULL,   `bc` text NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8;  -- --------------------------------------------------------  -- -- Table structure for table `computers` --  CREATE TABLE IF NOT EXISTS `computers` (   `id` int(11) NOT NULL,   `domain_id` int(11) DEFAULT NULL,   `samaccountname` varchar(15) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8;  -- --------------------------------------------------------  -- -- Table structure for table `domains` --  CREATE TABLE IF NOT EXISTS `domains` (   `id` int(11) NOT NULL,   `name` varchar(15) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8;  -- --------------------------------------------------------  -- -- Table structure for table `events` --  CREATE TABLE IF NOT EXISTS `events` (   `id` int(11) NOT NULL,   `event` varchar(8) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8;  -- --------------------------------------------------------  -- -- Table structure for table `groups` --  CREATE TABLE IF NOT EXISTS `groups` (   `id` int(11) NOT NULL,   `name` varchar(64) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8;  -- --------------------------------------------------------  -- -- Table structure for table `ipnets` --  CREATE TABLE IF NOT EXISTS `ipnets` (   `id` int(11) NOT NULL,   `bc_id` int(11) NOT NULL,   `ipnet1` varchar(3) NOT NULL DEFAULT '172',   `ipnet2` varchar(3) NOT NULL DEFAULT '16',   `ipnet3` varchar(3) NOT NULL,   `mask` int(11) NOT NULL DEFAULT '24',   `vid` mediumint(4) DEFAULT NULL,   `name` varchar(20) DEFAULT NULL,   `description` varchar(50) DEFAULT NULL,   `tplname` varchar(20) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8;  -- --------------------------------------------------------  -- -- Table structure for table `ips` --  CREATE TABLE IF NOT EXISTS `ips` (   `id` int(11) NOT NULL,   `ip` varchar(15) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8;  -- --------------------------------------------------------  -- -- Table structure for table `latestdata` --  CREATE TABLE IF NOT EXISTS `latestdata` (   `domain_id` int(11) NOT NULL,   `computer_id` int(11) NOT NULL,   `computer_event_id` int(11) DEFAULT NULL,   `computer_dt` datetime DEFAULT NULL,   `ip_id` int(11) DEFAULT NULL,   `user_id` int(11) DEFAULT NULL,   `user_event_id` int(11) DEFAULT NULL,   `user_dt` datetime DEFAULT NULL,   `logonid` tinyint(4) DEFAULT NULL,   `logon_dt` datetime DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8;  -- --------------------------------------------------------  -- -- Table structure for table `latestlogons` --  CREATE TABLE IF NOT EXISTS `latestlogons` (   `domain_id` int(11) NOT NULL,   `computer_id` int(11) NOT NULL,   `ip_id` int(11) DEFAULT NULL,   `user_id` int(11) NOT NULL,   `user_event_id` int(11) DEFAULT NULL,   `user_dt` datetime DEFAULT NULL,   `processlogoff` tinyint(4) DEFAULT '0' ) ENGINE=InnoDB DEFAULT CHARSET=utf8;  -- --------------------------------------------------------  -- -- Table structure for table `logoncomputers` --  CREATE TABLE IF NOT EXISTS `logoncomputers` (   `id` int(11) NOT NULL,   `domain_id` int(11) NOT NULL,   `computer_id` int(11) NOT NULL,   `event_id` int(11) NOT NULL,   `ip_id` int(11) NOT NULL,   `dt` datetime DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8;  -- --------------------------------------------------------  -- -- Table structure for table `logonusers` --  CREATE TABLE IF NOT EXISTS `logonusers` (   `id` int(11) NOT NULL,   `domain_id` int(11) NOT NULL,   `user_id` int(11) NOT NULL,   `computer_id` int(11) NOT NULL,   `event_id` int(11) NOT NULL,   `ip_id` int(11) NOT NULL,   `dt` datetime DEFAULT '0000-00-00 00:00:00',   `dtnow` datetime DEFAULT CURRENT_TIMESTAMP ) ENGINE=InnoDB DEFAULT CHARSET=utf8;  -- --------------------------------------------------------  -- -- Table structure for table `membership` --  CREATE TABLE IF NOT EXISTS `membership` (   `uid` int(11) NOT NULL,   `gid` int(11) NOT NULL,   `used` tinyint(4) NOT NULL,   `user_dt` datetime NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8;   -- --------------------------------------------------------  -- -- Table structure for table `users` --  CREATE TABLE IF NOT EXISTS `users` (   `id` int(11) NOT NULL,   `domain_id` int(11) NOT NULL,   `samaccountname` varchar(20) NOT NULL,   `name` varchar(50) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8;  -- -- Indexes for dumped tables --  -- -- Indexes for table `bcs` -- ALTER TABLE `bcs`   ADD PRIMARY KEY (`id`);  -- -- Indexes for table `computers` -- ALTER TABLE `computers`   ADD PRIMARY KEY (`id`),   ADD UNIQUE KEY `samaccountname` (`samaccountname`);  -- -- Indexes for table `domains` -- ALTER TABLE `domains`   ADD PRIMARY KEY (`id`),   ADD UNIQUE KEY `name` (`name`);  -- -- Indexes for table `events` -- ALTER TABLE `events`   ADD PRIMARY KEY (`id`),   ADD UNIQUE KEY `event` (`event`);  -- -- Indexes for table `groups` -- ALTER TABLE `groups`   ADD PRIMARY KEY (`id`,`name`),   ADD UNIQUE KEY `name` (`name`);  -- -- Indexes for table `ipnets` -- ALTER TABLE `ipnets`   ADD PRIMARY KEY (`id`);  -- -- Indexes for table `ips` -- ALTER TABLE `ips`   ADD PRIMARY KEY (`id`),   ADD UNIQUE KEY `ip` (`ip`);  -- -- Indexes for table `latestdata` -- ALTER TABLE `latestdata`   ADD PRIMARY KEY (`computer_id`);  -- -- Indexes for table `latestlogons` -- ALTER TABLE `latestlogons`   ADD PRIMARY KEY (`computer_id`,`user_id`);  -- -- Indexes for table `logoncomputers` -- ALTER TABLE `logoncomputers`   ADD PRIMARY KEY (`id`);  -- -- Indexes for table `logonusers` -- ALTER TABLE `logonusers`   ADD PRIMARY KEY (`id`);  -- -- Indexes for table `membership` -- ALTER TABLE `membership`   ADD PRIMARY KEY (`uid`,`gid`);  -- -- Indexes for table `templatedata` -- ALTER TABLE `templatedata`   ADD PRIMARY KEY (`template_id`,`row_id`);  -- -- Indexes for table `templates` -- ALTER TABLE `templates`   ADD PRIMARY KEY (`id`);  -- -- Indexes for table `users` -- ALTER TABLE `users`   ADD PRIMARY KEY (`id`);  -- -- AUTO_INCREMENT for dumped tables --  -- -- AUTO_INCREMENT for table `bcs` -- ALTER TABLE `bcs`   MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `computers` -- ALTER TABLE `computers`   MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `domains` -- ALTER TABLE `domains`   MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `events` -- ALTER TABLE `events`   MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `groups` -- ALTER TABLE `groups`   MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `ipnets` -- ALTER TABLE `ipnets`   MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `ips` -- ALTER TABLE `ips`   MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `logoncomputers` -- ALTER TABLE `logoncomputers`   MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `logonusers` -- ALTER TABLE `logonusers`   MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `templates` -- ALTER TABLE `templates`   MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `users` -- ALTER TABLE `users`   MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/div>\n<\/div>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043e \u0432\u0445\u043e\u0434\u0430\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439.<br \/>  \u0421\u0434\u0435\u043b\u0430\u0435\u043c 2 \u0441\u043a\u0440\u0438\u043f\u0442\u0430 (\u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u0434\u043e\u043c\u0435\u043d\u0435)<\/p>\n<p>  \u0414\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f:  <\/p>\n<blockquote><p>set t=%1<br \/>  ipconfig | find \u00abIPv4\u00bb &gt; %temp%\\tempip.txt<br \/>  for \/f \u00abtokens=1* delims=.: \u00bb %%a in (%temp%\\tempip.txt) do (echo %USERNAME%;%COMPUTERNAME%;%%b;%t%;%DATE%;%TIME% &gt;&gt; \\\\nas\\log$\\users\\%USERNAME%.domain1.ru.txt)<br \/>  del %temp%\\tempip.txt<\/p><\/blockquote>\n<p>  usage \\\\domain\\netlogon\\logon.cmd logon\/logoff<\/p>\n<p>  \u0414\u043b\u044f \u041f\u041a:  <\/p>\n<blockquote><p>set t=%1<br \/>  ipconfig | find \u00abIPv4\u00bb &gt; %temp%\\tempip.txt<br \/>  for \/f \u00abtokens=1* delims=.: \u00bb %%a in (%temp%\\tempip.txt) do (echo %COMPUTERNAME%;%%b;%t%;%DATE%;%TIME% &gt;&gt; \\\\nas\\log$\\computers\\%COMPUTERNAME%.domain1.ru.txt)<br \/>   del %temp%\\tempip.txt<\/p><\/blockquote>\n<p>  \u041e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u0440\u0430\u0441\u043f\u0430\u0440\u0441\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438 \u043a\u0443\u0434\u0430-\u043d\u0438\u0431\u0443\u0434\u044c \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c.<br \/>  (2 \u043c\u043e\u0434\u0443\u043b\u044f: \u043f\u043a \u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438. \u041a\u043e\u0434 \u0431\u0435\u0437 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u0432.)  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0418 \u043f\u0438\u0441\u0430\u0442\u044c \u0432 \u0431\u0430\u0437\u0443 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e powershell<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cs\">import-module activedirectory [void][system.reflection.Assembly]::LoadWithPartialName(&quot;MySql.Data&quot;)  $server= &quot;localhost&quot; $username= &quot;logon&quot; $password= &quot;&quot; $database= &quot;logon&quot;  Set-Variable SqlConnection (New-Object MySql.Data.MySqlClient.MySqlConnection) -Scope Global -Option AllScope -Description &quot;Personal variable for Sql Query functions&quot; $SqlConnection.ConnectionString = &quot;server=$server;user id=$username;password=$password;database=$database;pooling=false;Allow Zero Datetime=True;&quot;  if (-not ($SqlConnection.State -like &quot;Open&quot;)) { $SqlConnection.Open() }  function global:Get-SqlDataTable( $Query = $(if (-not ($Query -gt $null)) {Read-Host &quot;Query to run&quot;}) ) { #\tif (-not ($SqlConnection.State -like &quot;Open&quot;)) { $SqlConnection.Open() } \t$SqlCmd = New-Object MySql.Data.MySqlClient.MySqlCommand $Query, $SqlConnection \t$SqlAdapter = New-Object MySql.Data.MySqlClient.MySqlDataAdapter \t$SqlAdapter.SelectCommand = $SqlCmd \t$DataSet = New-Object System.Data.DataSet \t$SqlAdapter.Fill($DataSet) | Out-Null \treturn $DataSet.Tables[0] }  function global:Insert-SqlDataTable( $Query = $(if (-not ($Query -gt $null)) {Read-Host &quot;Query to run&quot;}) ) { #\tif (-not ($SqlConnection.State -like &quot;Open&quot;)) { $SqlConnection.Open() } \t$SqlCmd = New-Object MySql.Data.MySqlClient.MySqlCommand $Query, $SqlConnection \t$SqlAdapter = New-Object MySql.Data.MySqlClient.MySqlDataAdapter         $SqlAdapter.InsertCommand = $SqlCmd          $SqlAdapter.InsertCommand.ExecuteNonQuery() }   $events = Get-SqlDataTable 'select * from events'  $domain = 1;  $fusers = $null  if ((get-childitem \\\\nas\\log$\\users | measure).count -gt 0){   $fusers += get-childitem \\\\nas\\log$\\users }  if ((get-childitem \\\\nas.d2.local\\auth_log$\\users | measure).count -gt 0){   $fusers += get-childitem \\\\nas.d2.local\\auth_log$\\users }   foreach ($fuser in $fusers){    if ($fuser.name -match &quot;domain1&quot;){     $domain = 1   }   if ($fuser.name -match &quot;domain2&quot;){     $domain = 2   }   write-host domain $domain -foregroundcolor blue     write-host &quot;\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c:&quot; $fuser.BaseName -foregroundcolor green   if (!(test-path $fuser.fullname)){continue}    $ustr = get-content $fuser.fullname      $error_code = $null   $res_sql_user = $null   $res_sql_latestdata = $null   $res_sql_latestlogons = $null    foreach ($line in $ustr){     $line1 = $line -replace &quot;['|()]&quot;     $arr = $line1.split(&quot;;&quot;)      if ($arr[0]){       if ($domain -eq 1){         $uname = (get-aduser $arr[0]).name       }       if ($domain -eq 2){         $uname = (get-aduser $arr[0] -server dc.domain2).name       }         $sql_str = &quot;select id from users where lower(samaccountname) = lower('&quot; + $arr[0] + &quot;') and domain_id = $domain order by id limit 1;&quot;;        $userid = (Get-SqlDataTable $sql_str).id        if (!$userid){         $sql_str = &quot;insert into users (domain_id, samaccountname, name) values ($domain, '&quot; + $arr[0] + &quot;', '$uname'); select id from users where lower(samaccountname) = lower('&quot; + $arr[0] + &quot;') and domain_id = $domain order by id limit 1;&quot;;          $userid = (Get-SqlDataTable $sql_str).id       }     }      if ($arr[1]){       $compname = $arr[1]       $cdomain = 1       if ($compname -match &quot;cn1&quot;){         $cdomain = 1       }       if ($compname -match &quot;cn2&quot;){         $cdomain = 2       }        $sql_str = &quot;select id from computers where lower(samaccountname) = lower('&quot; + $arr[1] + &quot;') order by id limit 1;&quot;;        $computerid = (Get-SqlDataTable $sql_str).id       if (!$computerid){         $sql_str = &quot;insert into computers (domain_id, samaccountname) values ($cdomain, '&quot; + $arr[1] + &quot;'); select id from computers where lower(samaccountname) = lower('&quot; + $arr[1] + &quot;') order by id limit 1;&quot;;          $computerid = (Get-SqlDataTable $sql_str).id         write-host $sql_str -foregroundcolor yellow       }     }      $ev = $events | ?{$_.event -eq $arr[3]}     switch(($ev | measure).count){       0 { \twrite-host $arr[3] &quot;error&quot; -foregroundcolor red \texit \t         write-host $arr[3] &quot;will be added&quot; -foregroundcolor yellow         $sql_str = &quot;insert into events (event) values ('&quot; + $arr[3] + &quot;')&quot;         Insert-SqlDataTable $sql_str         $events = Get-SqlDataTable 'select * from events' \t$sql_str  | out-file sql.txt -append       }       1 {         #write-host $arr[3] &quot;select as current&quot; -foregroundcolor white       }       default: {$error_code = 3; write-host $arr[3] &quot;error&quot; -foregroundcolor red; exit}     }                   $curip = $arr[2] -replace &quot;Address. . . . . . . . . . . :&quot;,&quot;&quot; -replace &quot;IPv4 Address. . : &quot;,&quot;&quot; -replace &quot;IPv4-\u00a0\u00a4\u0430\u0490\u0431\u00a0 . . . . : &quot;,&quot;&quot;     if ($curip){       $sql_str = &quot;select id from ips where lower(ip) = lower('$curip') order by id limit 1;&quot;        $ipid = (Get-SqlDataTable $sql_str).id       if (!$ipid){         $sql_str = &quot;insert into ips (ip) values ('$curip'); select id from ips where lower(ip) = lower('$curip') order by id limit 1;&quot;;          write-host $sql_str -foregroundcolor yellow         $ipid = (Get-SqlDataTable $sql_str).id       }     }      if (!$userid){write-host u userid null; exit;}     if (!$computerid){write-host u computerid null; exit;}     if (!$ipid){write-host u ipid null; exit;}     $eventid = ($events | ?{$_.event -eq $arr[3]}).id | select -first 1        #$ip = $arr[2] -replace &quot;Address. . . . . . . . . . . :&quot;,&quot;&quot; -replace &quot;IPv4 Address. . : &quot;,&quot;&quot;       #$dt = &quot;{0:yyyy-MM-dd HH:mm:ss}&quot; -f [datetime](($arr[4] + &quot; &quot; + $arr[5]) -replace '^(.*),.*$','$1')        #$dt = get-date(($arr[4] + &quot; &quot; + $arr[5]) -replace '^(.*),.*$','$1') -format &quot;yyyy-MM-dd hh:mm:ss zzz&quot;       #$dt = get-date(($arr[4] + &quot; &quot; + $arr[5])) -format &quot;yyyy-MM-dd hh:mm:ss zzz&quot;            $t = ($arr[5] -replace '^(.*),.*$','$1').split(&quot;:&quot;)     $dt = get-date((get-date($arr[4])).Addhours($t[0]).AddMinutes($t[1]).Addseconds($t[2])) -format &quot;yyyy-MM-dd HH:mm:ss&quot;          if ($arr[0]){       if ($domain -eq 1){         $groups = ((Get-ADuser $arr[0] -Property memberof).memberof | %{Get-ADGroup -Identity $_} | sort name).name       }       if ($domain -eq 2){         $groups = ((Get-ADuser $arr[0] -server dc.domain2 -Property memberof).memberof | %{Get-ADGroup -Identity $_ -server dc.domain2 } | sort name).name       }       #$groups = ((Get-ADuser $arr[0] -Property memberof).memberof | %{Get-ADGroup -Identity $_} | sort name).name       $val1 = &quot;&quot;       $val2 = &quot;&quot;       $groupscnt = ($groups | measure).count       #write-host $groupscnt -foregroundcolor red       for ($i = 0; $i -lt $groupscnt; $i++){         $gr = $groups[$i] -replace &quot;'&quot;,&quot;\\'&quot;          $sql_str = &quot;select id from groups where name = '$gr'&quot;         $groupid = (Get-SqlDataTable $sql_str).id         if (!$groupid){           $sql_str = &quot;insert into groups (name) values ('$gr');&quot;           $res = Get-SqlDataTable $sql_str         }          $val2 = $val2 + &quot;'&quot; + $gr  + &quot;'&quot;         if ($i -lt $groupscnt - 1){$val2 = $val2 + &quot;,&quot;}       }       $sql_str = &quot;select id from groups where name in ($val2);&quot;       $groupsid = (Get-SqlDataTable $sql_str).id        $groupscnt = ($groupsid | measure).count       $val3 = &quot;&quot;       for ($i = 0; $i -lt $groupscnt; $i++){         $val3 = $val3 + &quot;($userid, &quot; + $groupsid[$i] + &quot;, 1, '$dt')&quot;         if ($i -lt $groupscnt - 1){$val3 = $val3 + &quot;,&quot;}       }       $sql_str = &quot;insert into membership (uid, gid, used, user_dt) values $val3 on duplicate key update used=values(used), user_dt=values(user_dt); update membership SET used=0 WHERE uid = $userid and user_dt != '$dt'&quot;       #$sql_str       $res = Get-SqlDataTable $sql_str       #$res     }   #      $datetime = &quot;{0:yyyy-MM-dd hh:mm:ss}&quot; -f [datetime]$dt #::ParseExact($dt, &quot;dd.MM.yyyy hh:mm:ss&quot;,$null)       #$datetime = get-date($dt)  #      $datetime     $res_sql_user += &quot;insert into logonusers (domain_id, user_id, computer_id, event_id, ip_id, dt) values ($domain, $userid, $computerid, $eventid, $ipid, '$dt');&quot;     $res_sql_latestdata += &quot;insert into latestdata (domain_id, computer_id, user_id, user_event_id, ip_id, user_dt) values ($domain, $computerid, $userid, $eventid, $ipid, '$dt') on duplicate key update computer_id=values(computer_id), user_id=values(user_id), user_event_id=values(user_event_id), user_dt=values(user_dt), ip_id=values(ip_id);&quot;     if ($eventid -eq 2){       $res_sql_latestlogons += &quot;insert into latestlogons (domain_id, computer_id, user_id, user_event_id, ip_id, user_dt, processlogoff) values ($domain, $computerid, $userid, $eventid, $ipid, '$dt', 0) on duplicate key update computer_id=values(computer_id), user_id=values(user_id), user_event_id=values(user_event_id), user_dt=values(user_dt), ip_id=values(ip_id), processlogoff=values(processlogoff);&quot;     }     if ($eventid -eq 1){       $res_sql_latestlogons += &quot;delete from latestlogons where computer_id = $computerid and user_id = $userid limit 1;&quot;     }       #    $sql = &quot;insert into logon () values&quot;;   }   if (!$error_code){     $out = Insert-SqlDataTable $res_sql_user     $res_sql_user     $out = Insert-SqlDataTable $res_sql_latestdata     $res_sql_latestdata     $out = Insert-SqlDataTable $res_sql_latestlogons     $res_sql_latestlogons     remove-item $fuser.fullname -force   } } ###################################################################### ###################################################################### ###################################################################### ###################################################################### ######################################################################  $fcomputers = $null  if ((get-childitem \\\\nas\\log$\\computers | measure).count -gt 0){   $fcomputers += get-childitem \\\\nas\\log$\\computers }  if ((get-childitem \\\\nas.d2.local\\auth_log$\\computers | measure).count -gt 0){   $fcomputers += get-childitem \\\\nas.d2.local\\auth_log$\\computers }   foreach ($fcomputer in $fcomputers){    if ($fcomputer.name -match &quot;domain1&quot;){     $domain = 1   }   if ($fcomputer.name -match &quot;domain2&quot;){     $domain = 2   } write-host domain $domain -foregroundcolor blue    write-host &quot;\u041f\u041a:&quot; $fcomputer.BaseName -foregroundcolor green   $cstr = get-content $fcomputer.fullname     $error_code = $null   $res_sql_computer = $null   $res_sql_latestdata = $null    foreach ($line in $cstr){     $arr = $line.split(&quot;;&quot;)      if ($arr[0]){       $sql_str = &quot;select id from computers where lower(samaccountname) = lower('&quot; + $arr[0] + &quot;') order by id limit 1;&quot;;        $computerid = (Get-SqlDataTable $sql_str).id       if (!$computerid){         $sql_str = &quot;insert into computers (domain_id, samaccountname) values ($domain, '&quot; + $arr[0] + &quot;'); select id from computers where lower(samaccountname) = lower('&quot; + $arr[0] + &quot;') order by id limit 1;&quot;;          $computerid = (Get-SqlDataTable $sql_str).id        }     }      $ev = $events | ?{$_.event -eq $arr[2]}     switch(($ev | measure).count){       0 {         write-host $arr[2] &quot;will be added&quot; -foregroundcolor yellow         #$sql_str = &quot;insert into events (event) values ('&quot; + $arr[2] + &quot;')&quot;         Insert-SqlDataTable $sql_str         $events = Get-SqlDataTable 'select * from events'         $sql_str | out-file sql.txt -append       }       1 {         #write-host $arr[3] &quot;select as current&quot; -foregroundcolor white       }       default: {$error_code = 3; write-host $arr[2] &quot;error&quot; -foregroundcolor red}     }                   $curip = $arr[1] -replace &quot;Address. . . . . . . . . . . :&quot;,&quot;&quot; -replace &quot;IPv4 Address. . : &quot;,&quot;&quot; -replace &quot;IPv4-\u00a0\u00a4\u0430\u0490\u0431\u00a0 . . . . : &quot;,&quot;&quot;     #write-host $arr[1] $curip      #$error_code = 4      if ($curip){       $sql_str = &quot;select id from ips where lower(ip) = lower('$curip') order by id limit 1;&quot;        $ipid = (Get-SqlDataTable $sql_str).id       if (!$ipid){         $sql_str = &quot;insert into ips (ip) values ('$curip'); select id from ips where lower(ip) = lower('$curip') order by id limit 1;&quot;;          $ipid = (Get-SqlDataTable $sql_str).id       }     }       if (!$error_code){       $eventid = ($events | ?{$_.event -eq $arr[2]}).id | select -first 1       if (!$computerid){write-host c computerid null; exit;}       if (!$ipid){write-host c ipid null; exit;}        $t = ($arr[4] -replace '^(.*),.*$','$1').split(&quot;:&quot;)       $dt = get-date((get-date($arr[3])).Addhours($t[0]).AddMinutes($t[1]).Addseconds($t[2])) -format &quot;yyyy-MM-dd HH:mm:ss&quot;        $res_sql_computer += &quot;insert into logoncomputers (domain_id, computer_id, event_id, ip_id, dt) values ($domain, $computerid, $eventid, $ipid, '$dt');&quot;       $res_sql_latestdata += &quot;insert into latestdata (domain_id, computer_id, computer_event_id, computer_dt, ip_id) values ($domain, $computerid, $eventid, '$dt', $ipid) on duplicate key update computer_id=values(computer_id), computer_event_id=values(computer_event_id), computer_dt=values(computer_dt), ip_id=values(ip_id);&quot;     }   }   if (!$error_code){     $res_sql_computer     $out = Insert-SqlDataTable $res_sql_computer     $res_sql_latestdata     $out = Insert-SqlDataTable $res_sql_latestdata     remove-item $fcomputer.fullname -force   } }  $SqlConnection.Close() <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0443 \u043d\u0430\u0441 \u0434\u0430\u043d\u043d\u044b\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044e\u0442\u0441\u044f \u0432 \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445. \u0414\u0430\u043b\u0435\u0435 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0434\u0435\u043b\u0430\u0442\u044c \u0441 \u043d\u0438\u043c\u0438 \u0432\u0441\u0435 \u0447\u0442\u043e \u0443\u0433\u043e\u0434\u043d\u043e:  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043d\u0430\u0440\u0438\u0441\u043e\u0432\u0430\u0442\u044c \u043f\u043b\u0430\u043d \u044d\u0442\u0430\u0436\u0430 \u0438 \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443<\/b><\/p>\n<div class=\"spoiler_text\"><img decoding=\"async\" src=\"\/\/habrastorage.org\/files\/4fe\/c6f\/24c\/4fec6f24cf5e471a8a3b220b865dfed3.jpg\"\/><br \/>  \u0414\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438 \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0438\u0445 Excel \u0444\u0430\u0439\u043b\u043e\u0432 \u043d\u0430 \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0439 \u0448\u0430\u0440\u0435.<br \/>  \u041f\u043e\u0438\u0441\u043a \u0432\u043e\u0437\u043c\u043e\u0436\u0435\u043d \u043f\u043e:  <\/p>\n<ul>\n<li>\u0418\u043c\u0435\u043d\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f<\/li>\n<li>IP<\/li>\n<li>\u0418\u043c\u0435\u043d\u0438 \u041f\u041a<\/li>\n<li>\u0413\u0440\u0443\u043f\u043f\u0435<\/li>\n<\/ul>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041f\u0440\u0438\u043c\u0435\u0440 \u043f\u043e\u0440\u0442\u0430\u043b\u0430<\/b><\/p>\n<div class=\"spoiler_text\"><img decoding=\"async\" src=\"\/\/habrastorage.org\/files\/581\/09a\/90b\/58109a90bad74f8287749705cc082563.jpg\"\/>  <\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041e\u0442\u0447\u0435\u0442\u044b \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c<\/b><\/p>\n<div class=\"spoiler_text\">\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0421\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a\u0438, \u0438\u043c\u0435\u044e\u0449\u0438\u0435 \u0432\u0445\u043e\u0434\u044b \u043d\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u041f\u041a \u0437\u0430 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u043e\u0432<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"sql\">SELECT      (SELECT              COUNT(*)         FROM             latestlogons t         WHERE             t.user_id = ll.user_id) AS cnt,     u.samaccountname,     ll.user_id,     u.name,     c.samaccountname,     ll.computer_id,     i.ip,     ll.user_dt,     bc.bc,     ipn.tplname FROM     latestlogons ll         JOIN     (SELECT          *     FROM         users     WHERE         id NOT IN (SELECT DISTINCT                 u.id             FROM                 users u             JOIN membership m ON m.uid = u.id             JOIN groups gr ON gr.id = m.gid             WHERE                 gr.name IN ('Domain Admins'))) u ON u.id = ll.user_id         JOIN     computers c ON c.id = ll.computer_id         JOIN     ips i ON i.id = ll.ip_id ORDER BY cnt DESC , u.samaccountname <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0438\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u0443\u043c\u043c\u0430\u0440\u043d\u043e \u043f\u043e \u0430\u043a\u0442\u0438\u0432\u043d\u044b\u043c \u0441\u0435\u0430\u043d\u0441\u0430\u043c<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"sql\">SELECT      COUNT(*) AS cnt,     u.samaccountname,     ll.user_id,     u.name,     c.samaccountname,     ll.computer_id,     i.ip FROM     latestlogons ll         JOIN     users u ON u.id = ll.user_id         JOIN     computers c ON c.id = ll.computer_id         JOIN     ips i ON i.id = ll.ip_id GROUP BY user_id ORDER BY cnt DESC <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0412\u0445\u043e\u0434\/\u0412\u044b\u0445\u043e\u0434 \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a\u043e\u0432 \u0437\u0430 \u043f\u0440\u043e\u0448\u043b\u044b\u0435 \u0441\u0443\u0442\u043a\u0438 (\u0441 00:00:00 \u043f\u043e 23:59:59)<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"sql\">SELECT      d.name,     u.samaccountname,     u.name,     c.samaccountname,     e.event,     lu.dt FROM     logonusers lu         JOIN     users u ON u.id = lu.user_id         JOIN     computers c ON c.id = lu.computer_id         JOIN     ips i ON i.id = lu.ip_id         JOIN     events e ON e.id = lu.event_id         JOIN     domains d ON d.id = lu.domain_id WHERE     (i.ip LIKE '172.16.16.%'         OR i.ip LIKE '172.16.32%'         OR i.ip LIKE '172.16.33%'         OR i.ip LIKE '172.16.34%'         OR i.ip LIKE '172.16.35%')         AND lu.dt &gt;= CURDATE() - INTERVAL 1 DAY         AND lu.dt &lt;= CURDATE() ORDER BY lu.dt <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041d\u0430\u0439\u0442\u0438 \u0432\u0441\u0435\u0445 \u0441 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u043e\u0439<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"sql\">SELECT DISTINCT     c.samaccountname, u.samaccountname, u.name, i.ip FROM     `latestdata` ld         LEFT JOIN     computers c ON c.id = ld.computer_id         LEFT JOIN     users u ON u.id = ld.user_id         LEFT JOIN     `events` e ON e.id = ld.computer_event_id         LEFT JOIN     `events` e2 ON e2.id = ld.user_event_id         LEFT JOIN     `ips` i ON ld.ip_id = i.id         LEFT JOIN     membership m ON m.uid = u.id         LEFT JOIN     groups g ON g.id = m.gid WHERE     LOWER(g.name) = LOWER('$key') <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/div>\n<\/div>\n<p>  \u041a\u0430\u043a \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0437\u0430\u043b\u043e\u0447\u0435\u043d\u043d\u044b\u0439 \u044d\u043a\u0440\u0430\u043d \u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f<br \/>  \u0411\u0435\u0437 \u0430\u0443\u0434\u0438\u0442\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0438 \u044d\u043a\u0440\u0430\u043d\u0430 \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c (\u043f\u0438\u0448\u0435\u043c \u0432 \u0444\u0430\u0439\u043b \u0438\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0432\u0435\u0431\u0441\u0435\u0440\u0432\u0438\u0441)  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">C#<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cs\">         void SystemEvents_SessionSwitch(object sender, SessionSwitchEventArgs e)         {             switch (e.Reason)             {                 \/\/ ...                 case SessionSwitchReason.SessionLock:                     \/\/ Do whatever you need to do for a lock                     \/\/ ...                     write_event(&quot;locked&quot;);                     \/\/MessageBox.Show(&quot;Locked&quot; + DateTime.Now);                     break;                 case SessionSwitchReason.SessionUnlock:                     \/\/ Do whatever you need to do for an unlock                     \/\/ ...                     write_event(&quot;unlocked&quot;);                     \/\/MessageBox.Show(&quot;UnLocked&quot; + DateTime.Now);                     break;                     \/\/case SessionSwitchReason.                 \/\/ ...             }         }          void write_event (string e){             string computer = System.Environment.MachineName;             string user = Environment.UserName;              try              {                 StreamWriter w = File.AppendText(@&quot;\\\\nas\\log$\\events\\&quot; + user + @&quot;.domain1.ru.txt&quot;);                 w.WriteLine(computer + &quot;;&quot; + user + &quot;;&quot; + e + &quot;;&quot; + DateTime.Now);                 w.Close();             }             catch {}          }          private void Form1_Load(object sender, EventArgs e)         {             this.Opacity = 0;             this.ShowInTaskbar = false;             SystemEvents.SessionSwitch += new SessionSwitchEventHandler(SystemEvents_SessionSwitch);         } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0414\u0430\u043d\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432\u0441\u0435-\u0442\u0430\u043a\u0438 \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u0430\u0442\u044c \u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0430\u043f\u0434\u0435\u0439\u0442\u0438\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 \u043b\u0435\u0442\u0443:  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">C#<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cs\">            string source = @&quot;\\\\nas\\userstat$\\Data\\active_ws.exe&quot;;             string tempdir = System.IO.Path.GetTempPath();             string destFile = System.IO.Path.Combine(tempdir, &quot;active_ws.exe&quot;);             if (File.Exists(source))              {                 try                 {                     System.IO.File.Copy(source, destFile, true);                     Process.Start(destFile);                 }                 catch (Exception e)                 {                  }             } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0414\u0430\u0434\u0438\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435, \u0447\u0442\u043e \u043e\u043d \u0437\u0430\u043b\u043e\u0433\u0438\u043d\u0435\u043d \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043c\u0430\u0448\u0438\u043d\u0430\u0445 \u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0432\u044b\u0445\u043e\u0434<\/b><\/p>\n<div class=\"spoiler_text\"><img decoding=\"async\" src=\"\/\/habrastorage.org\/files\/d4b\/b46\/7f2\/d4bb467f2b3d4d3c98dcf8c1f6239dca.jpg\"\/><\/p>\n<p>  res = GET(\u00ab<a href=\"http:\/\/api\/\">api\/<\/a>?\u00bb, \u00abs=status\u00bb);  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0420\u0438\u0441\u0443\u0435\u043c \u043a\u043d\u043e\u043f\u043a\u0438 \u0438 \u043d\u0430\u0432\u0435\u0448\u044b\u0432\u0430\u0435\u043c \u0441\u043e\u0431\u044b\u0442\u0438\u0435<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cs\">System.Windows.Forms.Label label = new System.Windows.Forms.Label();  label.Text = reader.Value.ToString(); label.Name = &quot;c_&quot; + label.Text; label.Width = 200; label.Height = 50; label.Top = 2 + (label.Height * label_cnt); label.Left = 2; label.Font = new System.Drawing.Font(&quot;Calibri&quot;, 24, System.Drawing.FontStyle.Underline, System.Drawing.GraphicsUnit.Point, ((byte)(0))); label.ForeColor = Color.Red; panel1.Controls.Add(label);  System.Windows.Forms.Button button = new System.Windows.Forms.Button(); button.Name = reader.Value.ToString(); button.Text = &quot;\u0412\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0432\u044b\u0445\u043e\u0434 \u043d\u0430 \u0434\u0430\u043d\u043d\u043e\u043c \u041f\u041a&quot;; button.Left = 210; button.Top = label.Top; button.Font = new System.Drawing.Font(&quot;Calibri&quot;, 12, System.Drawing.FontStyle.Underline, System.Drawing.GraphicsUnit.Point, ((byte)(0))); button.Width = 250; button.Height = 50; if (button.Name == System.Environment.MachineName) {     button.Enabled = false;     button.Text = &quot;\u0422\u0435\u043a\u0443\u0449\u0438\u0439 \u041f\u041a&quot;; } button.Click += new EventHandler(btn_Click); panel1.Controls.Add(button); <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043a\u043d\u043e\u043f\u043a\u0438<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cs\">        private void btn_Click(object sender, EventArgs e)         {             string res = null;             foreach (Control item in panel1.Controls.OfType&lt;Control&gt;())             {                 if (item.Tag == sender || item == sender)                 {                     item.Enabled = false;                     item.Text = &quot;\u0412\u044b\u0445\u043e\u0434 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 2-\u0445 \u043c\u0438\u043d\u0443\u0442&quot;;                     try                     {                         res = POST(&quot;http:\/\/api\/?&quot;, &quot;s=logout&c=&quot; + item.Name); \/\/item.Name - \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0438\u043c\u044f \u041f\u041a                     }                     catch (Exception exception)                     {                                             }                  }             }         } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0418 \u043d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0435\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u0439\u0442\u0438<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cs\">                        if (c_logoff == System.Environment.MachineName)                         {                             Process.Start(&quot;shutdown&quot;, &quot;-l -f&quot;);                         } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/div>\n<\/div>\n<p>  \u0421\u0442\u0430\u0440\u0442 \u0434\u0430\u043d, \u0434\u0430\u043b\u044c\u0448\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043b\u0435\u0442 \u0444\u0430\u043d\u0442\u0430\u0437\u0438\u0438.      \t<\/p>\n<div class=\"clear\"><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/253937\/\"> http:\/\/habrahabr.ru\/post\/253937\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>     \t\u041f\u043e \u043c\u0435\u0440\u0435 \u0440\u043e\u0441\u0442\u0430 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u0438 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u043e\u0432\u0435\u043d\u0438\u044f \u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u043a\u043e\u043b-\u0432\u0430 \u0440\u0430\u0431\u043e\u0447\u0438\u0445 \u043c\u0435\u0441\u0442 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0430 \u0438\u0434\u0435\u044f \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0440\u0435\u0441\u0443\u0440\u0441, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u043e \u043d\u0430\u0439\u0442\u0438 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043f\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e, \u041f\u041a \u0438 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043a\u0430\u043a\u0438\u0435-\u043d\u0438\u0431\u0443\u0434\u044c \u043e\u0442\u0447\u0435\u0442\u044b. <\/p>\n<p>  \u041f\u041e \u0442\u0430\u043a\u043e\u0435 \u0435\u0441\u0442\u044c, \u043e\u043d\u043e \u0441\u043b\u043e\u0436\u043d\u043e\u0435 \u0438 \u043e\u0431\u044b\u0447\u043d\u043e \u0441\u0442\u043e\u0438\u0442 \u0434\u0435\u043d\u0435\u0433. \u0411\u0443\u0434\u0435\u043c \u043a\u043b\u0435\u043f\u0430\u0442\u044c \u0441\u0432\u043e\u0435 \u0438 \u043d\u0430 \u043a\u043e\u043b\u0435\u043d\u043a\u0435.<\/p>\n<p>  \u0422\u0430\u043a\u0436\u0435 \u043d\u0430\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0440\u044f\u0434 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439 \u0438\u0437-\u0437\u0430:  <\/p>\n<ul>\n<li>\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0435\u0440\u043e\u0432 \u0434\u043e\u043c\u0435\u043d\u0430 <\/li>\n<li>\u041f\u041e \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u0438\u043a\u043e\u0432 (\u043d\u0435\u0444\u0438\u0433 \u0442\u0443\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043b\u0435\u0432\u044b\u0435 exe \u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u044b), \u0432 \u0441\u0432\u043e\u0435 \u041f\u041e \u043d\u0435 \u043f\u0443\u0441\u0442\u0438\u043c.<\/li>\n<li>\u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u0441\u0435\u0442\u0435\u0432\u0438\u043a\u043e\u0432 (\u0441\u043b\u043e\u0436\u043d\u0430\u044f \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 VLAN, ACL \u0438 \u0437\u0430\u043f\u0440\u0435\u0442\u043e\u0432 \u0432\u0441\u0435\u0433\u043e, \u0447\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u043a\u0443\u0434\u0430-\u0442\u043e \u043a\u043e\u043d\u043d\u0435\u043a\u0442\u0438\u0442\u044c\u0441\u044f)<\/li>\n<li>\u043d\u0435 \u043f\u0440\u043e\u0434 \u0440\u0435\u0441\u0443\u0440\u0441 \u043d\u0430 \u043f\u0440\u043e\u0434 \u0441\u0438\u0441\u0442\u0435\u043c\u0435<\/li>\n<li>\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u0438\u043a\u043e\u0432 \u0438 \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c<\/li>\n<\/ul>\n<p>  <img decoding=\"async\" src=\"\/\/habrastorage.org\/files\/de1\/0a6\/06c\/de10a606cbce4e6ab3c0b155e16e01bc.jpg\"\/><\/p>\n<p>  \u041f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0446\u0435\u043b\u0438:<br \/>  1. \u041a\u0443\u0434\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u0445\u043e\u0434\u044f\u0442<br \/>  2. \u0413\u0434\u0435 \u043e\u043d\u0438 \u0437\u0430\u0431\u044b\u0432\u0430\u044e\u0442 \u0432\u044b\u0445\u043e\u0434\u0438\u0442\u044c<br \/>  3. \u041a\u0442\u043e \u043b\u043e\u0433\u0438\u043d\u0438\u0442\u044c\u0441\u044f \u043f\u043e\u0434 \u0441\u0432\u043e\u0438\u043c\/\u043d\u0435 \u0441\u0432\u043e\u0438\u043c \u043b\u043e\u0433\u0438\u043d\u043e\u043c \u043d\u0430 \u043e\u0434\u043d\u043e\u043c\/\u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u041f\u041a<br \/>  4. \u0420\u0430\u0441\u0441\u0430\u0434\u043a\u0430 \u043f\u043e \u043c\u0435\u0441\u0442\u0430\u043c<br \/>  5. \u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 \u0441\u0445\u0435\u043c\u0435 \u044d\u0442\u0430\u0436\u0430<br \/>  6. \u041e\u0442\u0447\u0435\u0442 \u043e \u0440\u0430\u0431\u043e\u0447\u0435\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438 (\u0432 \u0442.\u0447. \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0431\u044b\u043b \u00ab\u0430\u043a\u0442\u0438\u0432\u0435\u043d\u00bb \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435)<br \/>  7. \u0414\u0435\u043b\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u0430\u0432 \u0434\u043b\u044f \u0438\u043d\u0436\u0435\u043d\u0435\u0440\u043e\u0432 \u0441 \u0446\u0435\u043b\u044c\u044e \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0438.<\/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-253771","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/253771","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=253771"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/253771\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=253771"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=253771"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=253771"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}