dynmap 0.1.0

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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 8a2c603d4db945bc15420f24a686231126c128bf
4
+ data.tar.gz: c5ca30a1b3e75f54afe674cfb4e8f996c1e5c2b4
5
+ SHA512:
6
+ metadata.gz: 96261f3cdd9f55bf5f6ad3e6500f122d25c9d2c411e3d065140d8b0c885f05c15c0a12c5d63180dcf8280506df967c01c61ed79193907de6fabd9028c7506d64
7
+ data.tar.gz: 9898435265c719ef99db79772b375ea93200078f058e1c686b53775b32e89d287963546ac931027bb5ea0a22553bc26d974fe2172f0659f0a0a3aed495978faa
Binary file
Binary file
@@ -0,0 +1,32 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ # file: dynmap.rb
4
+ # requirements: nmap must be installed first
5
+
6
+ require 'dynarex'
7
+
8
+ class DyNmap
9
+
10
+ def initialize(subnet='192.168.4')
11
+
12
+ r = `nmap -sP #{subnet}.0/24; arp -n | grep "#{subnet}.[0-9]* *ether"`
13
+ s = r[/Nmap scan report for .*Host is up[^\)]+\)/m]
14
+ a = s.scan(/Nmap scan report for (?:([^\s]+)\s\((\d+\.\d+\.\d+\.\d+)\)|(\d+\.\d+\.\d+\.\d+))\nHost is up \((\d+\.\d+)/m)
15
+ a.map! {|x| ([''] + x.compact)[-3..-1] }
16
+
17
+ @dynarex = Dynarex.new('items/item(ip,domain, latency)')
18
+ a.each do |domain, ip, latency|
19
+ @dynarex.create ip: ip, domain: domain, latency: latency
20
+ end
21
+
22
+ end
23
+
24
+ def to_dynarex
25
+ @dynarex
26
+ end
27
+
28
+ def save(filename='dynarex.xml')
29
+ @dynarex.save filename
30
+ end
31
+
32
+ end
metadata ADDED
@@ -0,0 +1,80 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: dynmap
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform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+ GYc1ZfbZsWqD9UuhfnXXy5Q0+LFcXLm9x6CRaLRgOPjsXN8lExUoJ8bwSpDlLHUI
28
+ cwXwq2yTQH9iiFNJQTeVGfpgkgDU0+imzTTKPQLkkOT0/ZkZnYeZ7+mqyoYfUEzE
29
+ EV/Id4IlMjqNVESltpXR/uy3YKr6bCDcQLo8VZEcG6c2L+AqVTzrx79l58veTGKn
30
+ CmuJCdPThj4wIxTkosnU6nfn8KdYtQa+yWzcDOnohJAT50G9gjq5n77tOf35XR6b
31
+ 9nOC4xUSZ0zDFBwz4I/oxWWse181YlID6mOhO0gp0XfJBztZIWmevKRCrPJbWSF8
32
+ wxVDCVl7KyG4HA==
33
+ -----END CERTIFICATE-----
34
+ date: 2013-07-25 00:00:00.000000000 Z
35
+ dependencies:
36
+ - !ruby/object:Gem::Dependency
37
+ name: dynarex
38
+ requirement: !ruby/object:Gem::Requirement
39
+ requirements:
40
+ - - '>='
41
+ - !ruby/object:Gem::Version
42
+ version: '0'
43
+ type: :runtime
44
+ prerelease: false
45
+ version_requirements: !ruby/object:Gem::Requirement
46
+ requirements:
47
+ - - '>='
48
+ - !ruby/object:Gem::Version
49
+ version: '0'
50
+ description:
51
+ email:
52
+ executables: []
53
+ extensions: []
54
+ extra_rdoc_files: []
55
+ files:
56
+ - lib/dynmap.rb
57
+ homepage:
58
+ licenses: []
59
+ metadata: {}
60
+ post_install_message:
61
+ rdoc_options: []
62
+ require_paths:
63
+ - lib
64
+ required_ruby_version: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - '>='
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ required_rubygems_version: !ruby/object:Gem::Requirement
70
+ requirements:
71
+ - - '>='
72
+ - !ruby/object:Gem::Version
73
+ version: '0'
74
+ requirements: []
75
+ rubyforge_project:
76
+ rubygems_version: 2.0.0.rc.2
77
+ signing_key:
78
+ specification_version: 4
79
+ summary: dynmap
80
+ test_files: []
@@ -0,0 +1 @@
1
+ iMZ���ˉ�[~����p�a�=�J�����"�mo.#ܰ��p���D��b;�?mZɐ���;o���t֔o�x�uLeM�����z�o�^��"]��� ���=��uT�B� ��?s�KL��j�v-��l�r!�*��<8l�=�ɭ�˶�>;F�^���s����#�ÅT٢0W���Ͷ��D'�Gx�H ,��;�^�@�lׁ�U�@G�Q�)��8���蚗T ��_ʨ�(.��S�#]�