netscan_calife 0.0.5 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9ec978d6b7dede57678ddf5d72fc40cd83dfc58e
4
- data.tar.gz: 188bf4bc4866a21aef09918d665319523d3a7fb6
3
+ metadata.gz: aca2bcd020ad5f3100e98f8db29d039b0445c633
4
+ data.tar.gz: 33ed84b50be9dd327ef10f7ab6de605d1a9fddbe
5
5
  SHA512:
6
- metadata.gz: 08c4edcf45c312e05ec3b7f587e93519c26ad16fa52d2228cbd6179ea46d76b23bda23206f7f3ff6e4fb157d69ba45630cb92dd459c7a76f75286e6c7277a979
7
- data.tar.gz: 012cb3cfbcffe911881b5df9a87bbeebf0e604b1a7dfa1972073918d863e1596f7ea31157f0e14929a7edd56a9398fc5be3920e0eeea1d449cd6af9386eaa12f
6
+ metadata.gz: 4ff5d48abae7e5eb5916208ccf4f6c6d273dd75a70e39a71791018ee13d7820436075b0d98310a4fb028cb151bcc88ce4611b1b4ffb1f9fee39fa693d750cc39
7
+ data.tar.gz: 1d3c8d8ff05b7f77bd2c099d91aa5a97b553cd3ad61d36f9802ab2498140122869e45f4a0d9790f8a2556a424763951731e05b978decfe76029cb6fd367b9c69
data/bin/netscan_calife CHANGED
@@ -1,6 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
- require "netscan_calife/utils"
3
- require "netscan_calife/ip_scan"
2
+ require "netscan_calife"
4
3
  require 'optparse'
5
4
  require 'pp'
6
5
 
@@ -72,7 +71,7 @@ end
72
71
  scan_result=NetscanCalife::IpScan.scan(options[:network].to_s,options[:netmask].to_s)
73
72
 
74
73
  unless(options[:filename].nil?) # Write result to file
75
- NetscanCalife::IpScan.to_yaml(scan_result,options[:filename])
74
+ puts "Result saved to #{options[:filename]}" if NetscanCalife::IpScan.to_yaml(scan_result,options[:filename])
76
75
  else # Output result to console
77
76
  NetscanCalife::IpScan.format_result(scan_result)
78
77
  end
@@ -44,12 +44,16 @@ module NetscanCalife
44
44
  # === Serialize scan result to yaml file
45
45
  # * *Args* :
46
46
  # - ++ -> data
47
+ # * *Returns* :
48
+ # - true on success
47
49
  #
48
50
  def self.to_yaml(data,filename)
49
51
 
50
52
  File.open(filename,"w") { |fileobj|
51
53
  YAML.dump(data,fileobj)
52
54
  }
55
+
56
+ return true
53
57
 
54
58
  end
55
59
 
@@ -80,7 +84,7 @@ module NetscanCalife
80
84
  when 'txt'
81
85
  printf "%s\n","-----------------------------------------"
82
86
  printf "|\t%s\t\t|\t%s\t|\n","HOST","FOUND"
83
- printf "%s\n","-----------------------------------------"
87
+ printf "%s\n","-----------------------------------------"
84
88
  data.each { |host,found|
85
89
  printf "|\t%s\t|\t%s\t|\n","#{host}","#{found}"
86
90
  }
@@ -1,3 +1,3 @@
1
1
  module NetscanCalife
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
@@ -1,6 +1,9 @@
1
1
  require "netscan_calife/version"
2
+ require "netscan_calife/utils"
3
+ require "netscan_calife/ip_scan"
4
+
2
5
 
3
6
  module NetscanCalife
4
7
  # Your code goes here...
5
-
8
+
6
9
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: netscan_calife
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - calife
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-11 00:00:00.000000000 Z
11
+ date: 2015-09-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler