

{"id":1878,"date":"2013-01-17T15:21:36","date_gmt":"2013-01-17T20:21:36","guid":{"rendered":"http:\/\/rud.is\/b\/?p=1878"},"modified":"2017-04-02T22:51:38","modified_gmt":"2017-04-03T03:51:38","slug":"shodan-api-in-r-with-examples","status":"publish","type":"post","link":"https:\/\/rud.is\/b\/2013\/01\/17\/shodan-api-in-r-with-examples\/","title":{"rendered":"SHODAN API in R (With Examples)"},"content":{"rendered":"<p>Folks may debate the merits of the <a href=\"https:\/\/www.shodan.io\/\">SHODAN<\/a> tool, but in my opinion it&#8217;s a valuable resource, especially if used for &#8220;good&#8221;. What is SHODAN? I think ThreatPost <a href=\"https:\/\/threatpost.com\/\">summed it up nicely<\/a>:<\/p>\n<blockquote><p><i>&#8220;Shodan is a Web based search engine that discovers Internet facing computers, including desktops, servers and routers. The engine, created by programmer John Matherly, allows users to filter searches for systems running a specific type of application (say, Apache Web servers or FTP) and filter results by geographic region. The search engine indexes host \u2019banners,\u2019 which include meta-data sent between a server and client and includes information such as the type of software run, what services are available and so on.&#8221;<\/i><\/p><\/blockquote>\n<p>I&#8217;m in R quite a bit these days and thought it would be useful to have access to the <a href=\"ttp: \/\/www.shodanhq.com\/api_doc\">SHODAN API<\/a> in R. I have a very rudimentary version of the API (<code>search<\/code> only) <span class=\"removed_link\" title=\"https:\/\/github.com\/hrbrmstr\/Rshodan\">up on github<\/span> which can be integrated into your R environment thus:<\/p>\n<pre lang=\"rsplus\">library(devtools)\r\ninstall_github(\"Rshodan\",\"hrbrmstr\")\r\nlibrary(shodan)\r\nhelp(shodan) # you don't really need to do this cmd<\/pre>\n<p>It&#8217;ll eventually be in CRAN, but I have some cleanup work to do before the maintainers will accept the submission. If you are new to R, there are a slew of dependencies you&#8217;ll need to add to the base R installation. Here&#8217;s a <span class=\"removed_link\" title=\"http:\/\/rwiki.sciviews.org\/doku.php?id=getting-started:installation:packages\">good description of how to do that<\/span> on pretty much every platform.<\/p>\n<p>After I tweeted the above reference, @shawnmer asked the following:<\/p>\n<p>https:\/\/twitter.com\/shawnmer\/status\/290904140782137344<\/p>\n<p>That is not an unreasonable request, especially if one is new to R (or SHODAN). I had been working on this post and a more extended example and finally able to get enough code done to warrant publishing it. You can do far more in R than these simple charts &#038; graphs. Imagine taking data from multiple searches\u2013either across time or across ports\u2013and doing a statistical comparison. Or, use some the image processing &#038; recognition libraries within R as well as a package such as <code>RCurl<\/code> to fetch images from open webcams and attempt to identify people or objects. The following should be enough for most folks to get started.<\/p>\n<p>You can cut\/paste the source code here or <a href=\"\/dl\/shodan-ex.R\">download the whole source file<\/a>.<\/p>\n<p>The fundamental shortcut this library provides over just trying to code it yourself is taking the JSON response from SHODAN and turning it into an R data frame. That is not as overtly trivial as you might think and you may want to look at the source code for the library to see where I grabbed some of that code from. I&#8217;m also not 100% convinced it&#8217;s going to work under all circumstances (hence part of the 0.1 status).<\/p>\n<pre lang=\"rsplus\">library(shodan)\r\nlibrary(ggplot2)\r\nlibrary(xtable)\r\nlibrary(maps)\r\nlibrary(rworldmap)\r\nlibrary(ggthemes)\r\n\r\n\r\n# if you're behind a proxy, setting this will help\r\n# but it's strongly suggested\/encouraged that you stick the values in a file and \r\n# read them in vs paste them in a script\r\n# options(RCurlOptions = list(proxy=\"proxyhost\", proxyuserpwd=\"user:pass\"))\r\n\r\nsetSHODANKey(\"~\/.shodankey\")\r\n\r\n# query example taken from Michael \u201ctheprez98\u201d Schearer's DEFCON 18 presentation\r\n# https:\/\/www.defcon.org\/images\/defcon-18\/dc-18-presentations\/Schearer\/DEFCON-18-Schearer-SHODAN.pdf\r\n\r\n# find all Cisco IOS devies that may have an unauthenticated admin login\r\n# setting trace to be TRUE to see the progress of the query\r\nresult = SHODANQuery(query=\"cisco last-modified www-authenticate\",trace=TRUE)\r\n\r\n#find the first 100 found memcached instances\r\n#result = SHODANQuery(query='port:11211',limit=100,trace=TRUE)\r\n\r\ndf = result$matches\r\n\r\n# aggregate result by operating system\r\n# you can use this one if you want to filter out NA's completely\r\n#df.summary.by.os = ddply(df, .(os), summarise, N=sum(as.numeric(factor(os))))\r\n#this one provides count of NA's (i.e. unidentified systems)\r\ndf.summary.by.os = ddply(df, .(os), summarise, N=length(os))\r\n\r\n# sort & see the results in a text table\r\ndf.summary.by.os = transform(df.summary.by.os, os = reorder(os, -N))\r\ndf.summary.by.os<\/pre>\n<p>That will yield:<\/p>\n<pre>FALSE                 os   N\r\nFALSE 1      Linux 2.4.x  60\r\nFALSE 2      Linux 2.6.x   6\r\nFALSE 3 Linux recent 2.4   2\r\nFALSE 4     Windows 2000   2\r\nFALSE 5   Windows 7 or 8  10\r\nFALSE 6       Windows XP   8\r\nFALSE 7             &lt;NA&gt; 112\r\n<\/pre>\n<p>You can plot it with:<\/p>\n<pre lang=\"rsplus\"># plot a bar chart of them\r\n(ggplot(df.summary.by.os,aes(x=os,y=N,fill=os)) + \r\n   geom_bar(stat=\"identity\") + \r\n   theme_few() +\r\n   labs(y=\"Count\",title=\"SHODAN Search Results by OS\"))<\/pre>\n<p>to yield:<\/p>\n<p><center><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1912\" data-permalink=\"https:\/\/rud.is\/b\/2013\/01\/17\/shodan-api-in-r-with-examples\/png\/\" data-orig-file=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2013\/01\/png.png?fit=576%2C360&amp;ssl=1\" data-orig-size=\"576,360\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"png\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2013\/01\/png.png?fit=510%2C319&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2013\/01\/png.png?resize=510%2C319&#038;ssl=1\" alt=\"png\" width=\"510\" height=\"319\" class=\"aligncenter size-full wp-image-1912\" srcset=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2013\/01\/png.png?w=576&amp;ssl=1 576w, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2013\/01\/png.png?resize=300%2C187&amp;ssl=1 300w\" sizes=\"auto, (max-width: 510px) 100vw, 510px\" \/><\/center><\/p>\n<p>and:<\/p>\n<pre lang=\"rsplus\">world = map_data(\"world\")\r\n(ggplot() +\r\n   geom_polygon(data=world, aes(x=long, y=lat, group=group)) +\r\n   geom_point(data=df, aes(x=longitude, y=latitude), colour=\"#EE760033\",size=1.75) +\r\n   labs(x=\"\",y=\"\") +\r\n   theme_few())<\/pre>\n<p><center><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1911\" data-permalink=\"https:\/\/rud.is\/b\/2013\/01\/17\/shodan-api-in-r-with-examples\/png-1\/\" data-orig-file=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2013\/01\/png-1.png?fit=576%2C360&amp;ssl=1\" data-orig-size=\"576,360\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"png-1\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2013\/01\/png-1.png?fit=510%2C319&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2013\/01\/png-1.png?resize=510%2C319&#038;ssl=1\" alt=\"png-1\" width=\"510\" height=\"319\" class=\"aligncenter size-full wp-image-1911\" srcset=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2013\/01\/png-1.png?w=576&amp;ssl=1 576w, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2013\/01\/png-1.png?resize=300%2C187&amp;ssl=1 300w\" sizes=\"auto, (max-width: 510px) 100vw, 510px\" \/><\/center><\/p>\n<p>You can easily do the same by country:<\/p>\n<pre lang=\"rsplus\"># sort & view the results by country\r\n# see above if you don't want to filter out NA's\r\ndf.summary.by.country_code = ddply(df, .(country_code, country_name), summarise, N=sum(!is.na(country_code)))\r\ndf.summary.by.country_code = transform(df.summary.by.country_code, country_code = reorder(country_code, -N))\r\n\r\ndf.summary.by.country_code<\/pre>\n<pre>##    country_code              country_name  N\r\n## 1            AR                 Argentina  2\r\n## 2            AT                   Austria  2\r\n## 3            AU                 Australia  2\r\n## 4            BE                   Belgium  2\r\n## 5            BN         Brunei Darussalam  2\r\n## 6            BR                    Brazil 14\r\n## 7            CA                    Canada 16\r\n## 8            CN                     China  6\r\n## 9            CO                  Colombia  4\r\n## 10           CZ            Czech Republic  2\r\n## 11           DE                   Germany 12\r\n## 12           EE                   Estonia  4\r\n## 13           ES                     Spain  4\r\n## 14           FR                    France 10\r\n## 15           HK                 Hong Kong  2\r\n## 16           HU                   Hungary  2\r\n## 17           IN                     India 10\r\n## 18           IR Iran, Islamic Republic of  4\r\n## 19           IT                     Italy  4\r\n## 20           LV                    Latvia  4\r\n## 21           MX                    Mexico  2\r\n## 22           PK                  Pakistan  4\r\n## 23           PL                    Poland 16\r\n## 24           RU        Russian Federation 14\r\n## 25           SG                 Singapore  2\r\n## 26           SK                  Slovakia  2\r\n## 27           TW                    Taiwan  6\r\n## 28           UA                   Ukraine  2\r\n## 29           US             United States 28\r\n## 30           VE                 Venezuela  2\r\n## 31         &lt;NA&gt;                      &lt;NA&gt;  0\r\n<\/pre>\n<p><\/p>\n<pre lang=\"rsplus\">(ggplot(df.summary.by.country_code,aes(x=country_code,y=N)) + \r\n  geom_bar(stat=\"identity\") +\r\n  theme_few() +\r\n  labs(y=\"Count\",x=\"Country\",title=\"SHODAN Search Results by Country\"))<\/pre>\n<p><center><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1910\" data-permalink=\"https:\/\/rud.is\/b\/2013\/01\/17\/shodan-api-in-r-with-examples\/png-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2013\/01\/png-2.png?fit=576%2C360&amp;ssl=1\" data-orig-size=\"576,360\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"png-2\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2013\/01\/png-2.png?fit=510%2C319&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2013\/01\/png-2.png?resize=510%2C319&#038;ssl=1\" alt=\"png-2\" width=\"510\" height=\"319\" class=\"aligncenter size-full wp-image-1910\" srcset=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2013\/01\/png-2.png?w=576&amp;ssl=1 576w, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2013\/01\/png-2.png?resize=300%2C187&amp;ssl=1 300w\" sizes=\"auto, (max-width: 510px) 100vw, 510px\" \/><\/center><\/p>\n<p>And, easily generate the must-have choropleth:<\/p>\n<pre lang=\"rsplus\"># except make a choropleth\r\n# using the very simple rworldmap process\r\nshodanChoropleth = joinCountryData2Map( df.summary.by.country_code, joinCode = \"ISO2\", nameJoinColumn = \"country_code\")\r\npar(mai=c(0,0,0.2,0),xaxs=\"i\",yaxs=\"i\")\r\nmapCountryData(shodanChoropleth, nameColumnToPlot=\"N\",colourPalette=\"terrain\",catMethod=\"fixedWidth\")<\/pre>\n<p><center><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1909\" data-permalink=\"https:\/\/rud.is\/b\/2013\/01\/17\/shodan-api-in-r-with-examples\/png-3\/\" data-orig-file=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2013\/01\/png-3.png?fit=576%2C360&amp;ssl=1\" data-orig-size=\"576,360\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"png-3\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2013\/01\/png-3.png?fit=510%2C319&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2013\/01\/png-3.png?resize=510%2C319&#038;ssl=1\" alt=\"png-3\" width=\"510\" height=\"319\" class=\"aligncenter size-full wp-image-1909\" srcset=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2013\/01\/png-3.png?w=576&amp;ssl=1 576w, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2013\/01\/png-3.png?resize=300%2C187&amp;ssl=1 300w\" sizes=\"auto, (max-width: 510px) 100vw, 510px\" \/><\/center><\/p>\n<p>Again, producing pretty pictures is all well-and-good, but it&#8217;s best to start with some good questions you need answering to make any visualization worthwhile. In the coming weeks, I&#8217;ll do some posts that show what types of questions you may want to ask\/answer with R &#038; SHODAN.<\/p>\n<p>I encourage folks that have issues, concerns or requests to use <span class=\"removed_link\" title=\"https:\/\/github.com\/hrbrmstr\/Rshodan\">github<\/span> vs post in the comments, but I&#8217;ll try to respond to either as quickly as possible.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Folks may debate the merits of the SHODAN tool, but in my opinion it&#8217;s a valuable resource, especially if used for &#8220;good&#8221;. What is SHODAN? I think ThreatPost summed it up nicely: &#8220;Shodan is a Web based search engine that discovers Internet facing computers, including desktops, servers and routers. The engine, created by programmer John [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":true,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":3,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"","footnotes":""},"categories":[24,673,674,3,7,91,26],"tags":[],"class_list":["post-1878","post","type-post","status-publish","format-standard","hentry","category-charts-graphs","category-datavis-2","category-dataviz","category-information-security","category-programming","category-r","category-vulnerabilities"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>SHODAN API in R (With Examples) - rud.is<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/rud.is\/b\/2013\/01\/17\/shodan-api-in-r-with-examples\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"SHODAN API in R (With Examples) - rud.is\" \/>\n<meta property=\"og:description\" content=\"Folks may debate the merits of the SHODAN tool, but in my opinion it&#8217;s a valuable resource, especially if used for &#8220;good&#8221;. What is SHODAN? I think ThreatPost summed it up nicely: &#8220;Shodan is a Web based search engine that discovers Internet facing computers, including desktops, servers and routers. The engine, created by programmer John [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/rud.is\/b\/2013\/01\/17\/shodan-api-in-r-with-examples\/\" \/>\n<meta property=\"og:site_name\" content=\"rud.is\" \/>\n<meta property=\"article:published_time\" content=\"2013-01-17T20:21:36+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2017-04-03T03:51:38+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/rud.is\/b\/wp-content\/uploads\/2013\/01\/png.png\" \/>\n<meta name=\"author\" content=\"hrbrmstr\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"hrbrmstr\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2013\\\/01\\\/17\\\/shodan-api-in-r-with-examples\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2013\\\/01\\\/17\\\/shodan-api-in-r-with-examples\\\/\"},\"author\":{\"name\":\"hrbrmstr\",\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/#\\\/schema\\\/person\\\/d7cb7487ab0527447f7fda5c423ff886\"},\"headline\":\"SHODAN API in R (With Examples)\",\"datePublished\":\"2013-01-17T20:21:36+00:00\",\"dateModified\":\"2017-04-03T03:51:38+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2013\\\/01\\\/17\\\/shodan-api-in-r-with-examples\\\/\"},\"wordCount\":544,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/#\\\/schema\\\/person\\\/d7cb7487ab0527447f7fda5c423ff886\"},\"image\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2013\\\/01\\\/17\\\/shodan-api-in-r-with-examples\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/rud.is\\\/b\\\/wp-content\\\/uploads\\\/2013\\\/01\\\/png.png\",\"articleSection\":[\"Charts &amp; Graphs\",\"DataVis\",\"DataViz\",\"Information Security\",\"Programming\",\"R\",\"Vulnerabilities\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/rud.is\\\/b\\\/2013\\\/01\\\/17\\\/shodan-api-in-r-with-examples\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2013\\\/01\\\/17\\\/shodan-api-in-r-with-examples\\\/\",\"url\":\"https:\\\/\\\/rud.is\\\/b\\\/2013\\\/01\\\/17\\\/shodan-api-in-r-with-examples\\\/\",\"name\":\"SHODAN API in R (With Examples) - rud.is\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2013\\\/01\\\/17\\\/shodan-api-in-r-with-examples\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2013\\\/01\\\/17\\\/shodan-api-in-r-with-examples\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/rud.is\\\/b\\\/wp-content\\\/uploads\\\/2013\\\/01\\\/png.png\",\"datePublished\":\"2013-01-17T20:21:36+00:00\",\"dateModified\":\"2017-04-03T03:51:38+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2013\\\/01\\\/17\\\/shodan-api-in-r-with-examples\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/rud.is\\\/b\\\/2013\\\/01\\\/17\\\/shodan-api-in-r-with-examples\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2013\\\/01\\\/17\\\/shodan-api-in-r-with-examples\\\/#primaryimage\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/rud.is\\\/b\\\/wp-content\\\/uploads\\\/2013\\\/01\\\/png.png?fit=576%2C360&ssl=1\",\"contentUrl\":\"https:\\\/\\\/i0.wp.com\\\/rud.is\\\/b\\\/wp-content\\\/uploads\\\/2013\\\/01\\\/png.png?fit=576%2C360&ssl=1\",\"width\":576,\"height\":360},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2013\\\/01\\\/17\\\/shodan-api-in-r-with-examples\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/rud.is\\\/b\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"SHODAN API in R (With Examples)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/#website\",\"url\":\"https:\\\/\\\/rud.is\\\/b\\\/\",\"name\":\"rud.is\",\"description\":\"&quot;In God we trust. All others must bring data&quot;\",\"publisher\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/#\\\/schema\\\/person\\\/d7cb7487ab0527447f7fda5c423ff886\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/rud.is\\\/b\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/#\\\/schema\\\/person\\\/d7cb7487ab0527447f7fda5c423ff886\",\"name\":\"hrbrmstr\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/i0.wp.com\\\/rud.is\\\/b\\\/wp-content\\\/uploads\\\/2023\\\/10\\\/ukr-shield.png?fit=460%2C460&ssl=1\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/rud.is\\\/b\\\/wp-content\\\/uploads\\\/2023\\\/10\\\/ukr-shield.png?fit=460%2C460&ssl=1\",\"contentUrl\":\"https:\\\/\\\/i0.wp.com\\\/rud.is\\\/b\\\/wp-content\\\/uploads\\\/2023\\\/10\\\/ukr-shield.png?fit=460%2C460&ssl=1\",\"width\":460,\"height\":460,\"caption\":\"hrbrmstr\"},\"logo\":{\"@id\":\"https:\\\/\\\/i0.wp.com\\\/rud.is\\\/b\\\/wp-content\\\/uploads\\\/2023\\\/10\\\/ukr-shield.png?fit=460%2C460&ssl=1\"},\"description\":\"Don't look at me\u2026I do what he does \u2014 just slower. #rstats avuncular \u2022 ?Resistance Fighter \u2022 Cook \u2022 Christian \u2022 [Master] Chef des Donn\u00e9es de S\u00e9curit\u00e9 @ @rapid7\",\"sameAs\":[\"http:\\\/\\\/rud.is\"],\"url\":\"https:\\\/\\\/rud.is\\\/b\\\/author\\\/hrbrmstr\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"SHODAN API in R (With Examples) - rud.is","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:\/\/rud.is\/b\/2013\/01\/17\/shodan-api-in-r-with-examples\/","og_locale":"en_US","og_type":"article","og_title":"SHODAN API in R (With Examples) - rud.is","og_description":"Folks may debate the merits of the SHODAN tool, but in my opinion it&#8217;s a valuable resource, especially if used for &#8220;good&#8221;. What is SHODAN? I think ThreatPost summed it up nicely: &#8220;Shodan is a Web based search engine that discovers Internet facing computers, including desktops, servers and routers. The engine, created by programmer John [&hellip;]","og_url":"https:\/\/rud.is\/b\/2013\/01\/17\/shodan-api-in-r-with-examples\/","og_site_name":"rud.is","article_published_time":"2013-01-17T20:21:36+00:00","article_modified_time":"2017-04-03T03:51:38+00:00","og_image":[{"url":"https:\/\/rud.is\/b\/wp-content\/uploads\/2013\/01\/png.png","type":"","width":"","height":""}],"author":"hrbrmstr","twitter_card":"summary_large_image","twitter_misc":{"Written by":"hrbrmstr","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/rud.is\/b\/2013\/01\/17\/shodan-api-in-r-with-examples\/#article","isPartOf":{"@id":"https:\/\/rud.is\/b\/2013\/01\/17\/shodan-api-in-r-with-examples\/"},"author":{"name":"hrbrmstr","@id":"https:\/\/rud.is\/b\/#\/schema\/person\/d7cb7487ab0527447f7fda5c423ff886"},"headline":"SHODAN API in R (With Examples)","datePublished":"2013-01-17T20:21:36+00:00","dateModified":"2017-04-03T03:51:38+00:00","mainEntityOfPage":{"@id":"https:\/\/rud.is\/b\/2013\/01\/17\/shodan-api-in-r-with-examples\/"},"wordCount":544,"commentCount":0,"publisher":{"@id":"https:\/\/rud.is\/b\/#\/schema\/person\/d7cb7487ab0527447f7fda5c423ff886"},"image":{"@id":"https:\/\/rud.is\/b\/2013\/01\/17\/shodan-api-in-r-with-examples\/#primaryimage"},"thumbnailUrl":"https:\/\/rud.is\/b\/wp-content\/uploads\/2013\/01\/png.png","articleSection":["Charts &amp; Graphs","DataVis","DataViz","Information Security","Programming","R","Vulnerabilities"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/rud.is\/b\/2013\/01\/17\/shodan-api-in-r-with-examples\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/rud.is\/b\/2013\/01\/17\/shodan-api-in-r-with-examples\/","url":"https:\/\/rud.is\/b\/2013\/01\/17\/shodan-api-in-r-with-examples\/","name":"SHODAN API in R (With Examples) - rud.is","isPartOf":{"@id":"https:\/\/rud.is\/b\/#website"},"primaryImageOfPage":{"@id":"https:\/\/rud.is\/b\/2013\/01\/17\/shodan-api-in-r-with-examples\/#primaryimage"},"image":{"@id":"https:\/\/rud.is\/b\/2013\/01\/17\/shodan-api-in-r-with-examples\/#primaryimage"},"thumbnailUrl":"https:\/\/rud.is\/b\/wp-content\/uploads\/2013\/01\/png.png","datePublished":"2013-01-17T20:21:36+00:00","dateModified":"2017-04-03T03:51:38+00:00","breadcrumb":{"@id":"https:\/\/rud.is\/b\/2013\/01\/17\/shodan-api-in-r-with-examples\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/rud.is\/b\/2013\/01\/17\/shodan-api-in-r-with-examples\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/rud.is\/b\/2013\/01\/17\/shodan-api-in-r-with-examples\/#primaryimage","url":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2013\/01\/png.png?fit=576%2C360&ssl=1","contentUrl":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2013\/01\/png.png?fit=576%2C360&ssl=1","width":576,"height":360},{"@type":"BreadcrumbList","@id":"https:\/\/rud.is\/b\/2013\/01\/17\/shodan-api-in-r-with-examples\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/rud.is\/b\/"},{"@type":"ListItem","position":2,"name":"SHODAN API in R (With Examples)"}]},{"@type":"WebSite","@id":"https:\/\/rud.is\/b\/#website","url":"https:\/\/rud.is\/b\/","name":"rud.is","description":"&quot;In God we trust. All others must bring data&quot;","publisher":{"@id":"https:\/\/rud.is\/b\/#\/schema\/person\/d7cb7487ab0527447f7fda5c423ff886"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/rud.is\/b\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/rud.is\/b\/#\/schema\/person\/d7cb7487ab0527447f7fda5c423ff886","name":"hrbrmstr","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2023\/10\/ukr-shield.png?fit=460%2C460&ssl=1","url":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2023\/10\/ukr-shield.png?fit=460%2C460&ssl=1","contentUrl":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2023\/10\/ukr-shield.png?fit=460%2C460&ssl=1","width":460,"height":460,"caption":"hrbrmstr"},"logo":{"@id":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2023\/10\/ukr-shield.png?fit=460%2C460&ssl=1"},"description":"Don't look at me\u2026I do what he does \u2014 just slower. #rstats avuncular \u2022 ?Resistance Fighter \u2022 Cook \u2022 Christian \u2022 [Master] Chef des Donn\u00e9es de S\u00e9curit\u00e9 @ @rapid7","sameAs":["http:\/\/rud.is"],"url":"https:\/\/rud.is\/b\/author\/hrbrmstr\/"}]}},"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p23idr-ui","jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":3605,"url":"https:\/\/rud.is\/b\/2015\/08\/07\/adding-a-cran-search-engine-to-chrome\/","url_meta":{"origin":1878,"position":0},"title":"Adding a CRAN Search Engine to Chrome","author":"hrbrmstr","date":"2015-08-07","format":false,"excerpt":"Riffing off of [the previous post](http:\/\/rud.is\/b\/2015\/08\/05\/speeding-up-your-quests-for-r-stuff\/), here's a way to quickly search CRAN (the @RStudio flavor) from the Chrome search bar. - Paste `chrome:\/\/settings\/searchEngines` into your location bar and hit return\/enter - Scroll down until the input boxes show, enabling you to add a search engine - For _\"Add a\u2026","rel":"","context":"In &quot;Chrome&quot;","block_context":{"text":"Chrome","link":"https:\/\/rud.is\/b\/category\/chrome\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":4490,"url":"https:\/\/rud.is\/b\/2016\/07\/05\/a-simple-prediction-web-service-using-the-new-firery-package\/","url_meta":{"origin":1878,"position":1},"title":"A Simple Prediction Web Service Using the New fiery Package","author":"hrbrmstr","date":"2016-07-05","format":false,"excerpt":"[`fiery`](https:\/\/github.com\/thomasp85\/fiery) is a new `Rook`\/`httuv`-based R web server in town created by @thomasp85 that aims to fill the gap between raw http & websockets and Shiny with a flexible framework for handling requests and serving up responses. The intent of this post is to provide a quick-start to using it\u2026","rel":"","context":"In &quot;R&quot;","block_context":{"text":"R","link":"https:\/\/rud.is\/b\/category\/r\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3569,"url":"https:\/\/rud.is\/b\/2015\/07\/29\/introducing-the-nominatim-geocoding-package\/","url_meta":{"origin":1878,"position":2},"title":"Introducing the nominatim geocoding package","author":"hrbrmstr","date":"2015-07-29","format":false,"excerpt":"In the never-ending battle for truth, justice and publishing more R packages than [Oliver](http:\/\/twitter.com\/quominus), I whipped out an R package for the [OpenStreetMap Nominatim API](http:\/\/wiki.openstreetmap.org\/wiki\/Nominatim). It actually hits the [MapQuest Nominatim Servers](http:\/\/open.mapquestapi.com\/nominatim\/) for most of the calls, but the functionality is the same. The R package lets you: - `address_lookup`:\u2026","rel":"","context":"In &quot;cartography&quot;","block_context":{"text":"cartography","link":"https:\/\/rud.is\/b\/category\/cartography\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":6496,"url":"https:\/\/rud.is\/b\/2017\/09\/30\/identify-analyze-web-site-tech-stacks-with-rappalyzer\/","url_meta":{"origin":1878,"position":3},"title":"Identify &#038; Analyze Web Site Tech Stacks With rappalyzer","author":"hrbrmstr","date":"2017-09-30","format":false,"excerpt":"Modern websites are complex beasts. They house photo galleries, interactive visualizations, web fonts, analytics code and other diverse types of content. Despite the potential for diversity, many web sites share similar \"tech stacks\" --- the components that come together to make them what they are. These stacks consist of web\u2026","rel":"","context":"In &quot;R&quot;","block_context":{"text":"R","link":"https:\/\/rud.is\/b\/category\/r\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/09\/Viewer_Zoom.png?fit=1198%2C1200&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/09\/Viewer_Zoom.png?fit=1198%2C1200&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/09\/Viewer_Zoom.png?fit=1198%2C1200&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/09\/Viewer_Zoom.png?fit=1198%2C1200&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2017\/09\/Viewer_Zoom.png?fit=1198%2C1200&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":12016,"url":"https:\/\/rud.is\/b\/2019\/03\/03\/cran-mirror-security\/","url_meta":{"origin":1878,"position":4},"title":"CRAN Mirror &#8220;Security&#8221;","author":"hrbrmstr","date":"2019-03-03","format":false,"excerpt":"In the \"Changes on CRAN\" section of the latest version of the The R Journal (Vol. 10\/2, December 2018) had this short blurb entitled \"CRAN mirror security\": Currently, there are 100 official CRAN mirrors, 68 of which provide both secure downloads via \u2018https\u2019 and use secure mirroring from the CRAN\u2026","rel":"","context":"In &quot;Cybersecurity&quot;","block_context":{"text":"Cybersecurity","link":"https:\/\/rud.is\/b\/category\/cybersecurity\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3,"url":"https:\/\/rud.is\/b\/2011\/02\/07\/quick-hits-2011-01-07\/","url_meta":{"origin":1878,"position":5},"title":"Quick Hits :: 2011-01-07","author":"hrbrmstr","date":"2011-02-07","format":false,"excerpt":"Security Smart Servers spot & block botnet attacks [NewScientist] Passwords are *so* 2010 - Building the ultimate bad arse CUDA cracking server\u2026 [SecManiac] Programming Interesting points\/counterpoints on the efficacy of Node.js being tied so closely to the V8 javascript engine: NodeJS: To V8 or not to V8 [bruno fernandez-ruiz] On\u2026","rel":"","context":"In &quot;HTML5&quot;","block_context":{"text":"HTML5","link":"https:\/\/rud.is\/b\/category\/html5\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/posts\/1878","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/comments?post=1878"}],"version-history":[{"count":0,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/posts\/1878\/revisions"}],"wp:attachment":[{"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/media?parent=1878"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/categories?post=1878"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/tags?post=1878"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}