{"id":1369,"date":"2017-01-18T16:57:10","date_gmt":"2017-01-18T19:57:10","guid":{"rendered":"http:\/\/www.franklinjr.com\/blog\/?p=1369"},"modified":"2017-01-18T16:57:10","modified_gmt":"2017-01-18T19:57:10","slug":"tipo-nmap-com-o-powershell","status":"publish","type":"post","link":"https:\/\/www.franklinjr.com\/blog\/index.php\/2017\/01\/18\/tipo-nmap-com-o-powershell\/","title":{"rendered":"Tipo nmap com o PowerShell"},"content":{"rendered":"<p>Precisava verificar IPs de um range para saber se estavam em uso, no Linux o servi\u00e7o \u00e9 bem fazer de se fazer, usando nmap -v -sP 192.168.0.0\/24 se descobre f\u00e1cil. No Windows eu dei uma pesquisada e achei o\u00a0System.Net.Networkinformation.Ping que me ajudou bastante. O comando ficou assim<\/p>\n<pre lang=\"powershell\">\r\n$ping = New-Object System.Net.Networkinformation.Ping\r\n1..254 | % { $ping.send(\"192.168.100.$_\") | select address, status | where status -eq 'Success'}\r\n<\/pre>\n<p>Resumindo \u00e9 um foreach de 1 a 254 que vai testando o IP.<\/p>\n<p>Baseado nas informa\u00e7\u00f5es do seguinte link:<br \/>\n<a href=\"http:\/\/www.thomasmaurer.ch\/2011\/11\/powershell-ping-ip-range\/\" target=\"_blank\">http:\/\/www.thomasmaurer.ch\/2011\/11\/powershell-ping-ip-range\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Precisava verificar IPs de um range para saber se estavam em uso, no Linux o servi\u00e7o \u00e9 bem fazer de se fazer, usando nmap -v -sP 192.168.0.0\/24 se descobre f\u00e1cil. No Windows eu dei uma pesquisada e achei o\u00a0System.Net.Networkinformation.Ping que me ajudou bastante. O comando ficou assim $ping = New-Object System.Net.Networkinformation.Ping 1..254 | % { [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[553,51],"tags":[603,262,542],"class_list":["post-1369","post","type-post","status-publish","format-standard","hentry","category-power-shell","category-windows","tag-nmap","tag-ping","tag-rede"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.0 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\r\n<title>Tipo nmap com o PowerShell - Franklin Jr.<\/title>\r\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\r\n<link rel=\"canonical\" href=\"https:\/\/www.franklinjr.com\/blog\/index.php\/2017\/01\/18\/tipo-nmap-com-o-powershell\/\" \/>\r\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.franklinjr.com\\\/blog\\\/index.php\\\/2017\\\/01\\\/18\\\/tipo-nmap-com-o-powershell\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"In\u00edcio\",\"item\":\"https:\\\/\\\/www.franklinjr.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Tipo nmap com o PowerShell\"}]}]}<\/script>\r\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Tipo nmap com o PowerShell - Franklin Jr.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.franklinjr.com\/blog\/index.php\/2017\/01\/18\/tipo-nmap-com-o-powershell\/","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BreadcrumbList","@id":"https:\/\/www.franklinjr.com\/blog\/index.php\/2017\/01\/18\/tipo-nmap-com-o-powershell\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"In\u00edcio","item":"https:\/\/www.franklinjr.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Tipo nmap com o PowerShell"}]}]}},"_links":{"self":[{"href":"https:\/\/www.franklinjr.com\/blog\/index.php\/wp-json\/wp\/v2\/posts\/1369","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.franklinjr.com\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.franklinjr.com\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.franklinjr.com\/blog\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.franklinjr.com\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=1369"}],"version-history":[{"count":4,"href":"https:\/\/www.franklinjr.com\/blog\/index.php\/wp-json\/wp\/v2\/posts\/1369\/revisions"}],"predecessor-version":[{"id":1373,"href":"https:\/\/www.franklinjr.com\/blog\/index.php\/wp-json\/wp\/v2\/posts\/1369\/revisions\/1373"}],"wp:attachment":[{"href":"https:\/\/www.franklinjr.com\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=1369"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.franklinjr.com\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=1369"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.franklinjr.com\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=1369"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}