soul_catcher 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +14 -0
- data/.ruby-version +1 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +31 -0
- data/Rakefile +2 -0
- data/bin/soul_catcher +59 -0
- data/lib/soul_catcher.rb +69 -0
- data/lib/soul_catcher/version.rb +3 -0
- data/soul_catcher.gemspec +29 -0
- metadata +169 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: ec6d6af51ec4192b7a64221f926a4176158db5b8
|
4
|
+
data.tar.gz: aa27b5baea99123033e12388de9ce251c3d46a61
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: ebc29aa8c7b9eac5513564817ddb7a208bff1edd67d2163dba782ecdd3e319f0d586d8d9e437b27a503007b16949e6c9d781c53b09e8306c967e4ae86245dbe0
|
7
|
+
data.tar.gz: 431381d2ccdcbff7f2729a6e22fd7719d61db95d20d65ec1bdf7d3a78fadaadeb80ffe733da5a35cc88f1c95a32335d37505603fa3eaac0b82638ee6df745c0e
|
data/.gitignore
ADDED
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.1.5
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2015 sidney
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
# SoulCatcher
|
2
|
+
|
3
|
+
TODO: Write a gem description
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
gem 'soul_catcher'
|
11
|
+
```
|
12
|
+
|
13
|
+
And then execute:
|
14
|
+
|
15
|
+
$ bundle
|
16
|
+
|
17
|
+
Or install it yourself as:
|
18
|
+
|
19
|
+
$ gem install soul_catcher
|
20
|
+
|
21
|
+
## Usage
|
22
|
+
|
23
|
+
TODO: Write usage instructions here
|
24
|
+
|
25
|
+
## Contributing
|
26
|
+
|
27
|
+
1. Fork it ( https://github.com/[my-github-username]/soul_catcher/fork )
|
28
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
29
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
30
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
31
|
+
5. Create a new Pull Request
|
data/Rakefile
ADDED
data/bin/soul_catcher
ADDED
@@ -0,0 +1,59 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
require 'soul_catcher'
|
3
|
+
require 'choice'
|
4
|
+
|
5
|
+
Choice.options do
|
6
|
+
header ''
|
7
|
+
header 'Specific options:'
|
8
|
+
|
9
|
+
option :ssid do
|
10
|
+
short '-s'
|
11
|
+
long '--ssid *SSID'
|
12
|
+
desc 'Set one of severals SSID of the targeted access point'
|
13
|
+
end
|
14
|
+
|
15
|
+
option :length do
|
16
|
+
short '-l'
|
17
|
+
long '--length=[length]'
|
18
|
+
desc 'Set one of severals SSID of the targeted access point (default: normal)'
|
19
|
+
valid %w[quick normal long]
|
20
|
+
default "normal"
|
21
|
+
end
|
22
|
+
|
23
|
+
option :interface do
|
24
|
+
short '-i'
|
25
|
+
long '--interface=[interface]'
|
26
|
+
desc 'Set the interface of the targeted access point which will be used (default: wlan0)'
|
27
|
+
default "wlan0"
|
28
|
+
end
|
29
|
+
|
30
|
+
separator ''
|
31
|
+
separator 'Common options: '
|
32
|
+
|
33
|
+
option :help do
|
34
|
+
long '--help'
|
35
|
+
desc 'Show this message'
|
36
|
+
end
|
37
|
+
|
38
|
+
option :version do
|
39
|
+
short '-v'
|
40
|
+
long '--version'
|
41
|
+
desc 'Show version'
|
42
|
+
action do
|
43
|
+
puts "Soul Catcher v0.1"
|
44
|
+
exit
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
Choice.choices[:ssid] ||= []
|
50
|
+
Choice.choices[:length] = case Choice.choices[:length]
|
51
|
+
when "quick"
|
52
|
+
0.07
|
53
|
+
when "normal"
|
54
|
+
0.15
|
55
|
+
when "long"
|
56
|
+
0.3
|
57
|
+
end
|
58
|
+
|
59
|
+
SoulCatcher.load(Choice.choices)
|
data/lib/soul_catcher.rb
ADDED
@@ -0,0 +1,69 @@
|
|
1
|
+
require 'soul_catcher/version'
|
2
|
+
require 'tempfile'
|
3
|
+
require 'csv'
|
4
|
+
require 'digest'
|
5
|
+
require 'highline/import'
|
6
|
+
require 'thread'
|
7
|
+
require 'ruby-progressbar'
|
8
|
+
require 'choice'
|
9
|
+
require 'formatador'
|
10
|
+
|
11
|
+
module SoulCatcher
|
12
|
+
|
13
|
+
def self.load(options)
|
14
|
+
Application.new(options).process_souls
|
15
|
+
end
|
16
|
+
|
17
|
+
class Application
|
18
|
+
|
19
|
+
attr_accessor :ssid, :length, :interface
|
20
|
+
|
21
|
+
def initialize(options)
|
22
|
+
options.each do |option, value|
|
23
|
+
instance_variable_set("@#{option}", value)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
def process_souls
|
28
|
+
|
29
|
+
ctr = 0
|
30
|
+
@clients_array = []
|
31
|
+
@ap_macs = {}
|
32
|
+
scndstatus = 0
|
33
|
+
status = 0
|
34
|
+
temp_file = Tempfile.new('soul_catcher')
|
35
|
+
temp_file_name = temp_file.path.split('/')[-1]
|
36
|
+
|
37
|
+
remaining_part = proc do
|
38
|
+
tempfile_real_path = Dir["#{temp_file.path}*-01.csv"][0]
|
39
|
+
CSV.foreach(tempfile_real_path) do |row|
|
40
|
+
@ssid << row[13][1..-1] if row[13] && status == 0 && @status_ssid == 1
|
41
|
+
@ssid.each { |target_ssid| @ap_macs[row[0]] = target_ssid and break if target_ssid == row[13][1..-1]} if row[13] && status == 0
|
42
|
+
@ap_macs.each { |ap_mac, target_ssid| @clients_array << Hash.new and @clients_array.last.replace({target_ssid => row[00]}) and break if row[05][1..-1] == ap_mac} if status == 1 && row[0]
|
43
|
+
status = 1 and @status_ssid = 0 if row[0] == "Station MAC"
|
44
|
+
@status_ssid = 1 if row[0] == "BSSID" && @ssid.empty?
|
45
|
+
end
|
46
|
+
Formatador.display_compact_table(@clients_array) unless @clients_array.empty?
|
47
|
+
puts "No results" if @clients_array.empty?
|
48
|
+
end
|
49
|
+
|
50
|
+
system("sudo ifconfig #{@interface} down")
|
51
|
+
system("sudo iwconfig #{@interface} mode monitor")
|
52
|
+
|
53
|
+
counter = Thread.new do
|
54
|
+
system("cd /tmp && sudo airodump-ng -w #{temp_file_name} #{@interface} >/dev/null 2>&1")
|
55
|
+
end
|
56
|
+
|
57
|
+
prog_b = ProgressBar.create(:format => '%a %B %p%% %t')
|
58
|
+
|
59
|
+
100.times { sleep(@length) ; prog_b.increment }
|
60
|
+
|
61
|
+
|
62
|
+
remaining_part.call
|
63
|
+
system("sudo killall airodump-ng")
|
64
|
+
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
68
|
+
|
69
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
require File.expand_path('../lib/soul_catcher/version', __FILE__)
|
3
|
+
|
4
|
+
Gem::Specification.new do |spec|
|
5
|
+
spec.name = 'soul_catcher'
|
6
|
+
spec.version = SoulCatcher::VERSION
|
7
|
+
spec.authors = ['sidney sissaoui']
|
8
|
+
spec.email = ['shideneyu@gmail.com']
|
9
|
+
spec.version = '0.0.1'
|
10
|
+
spec.date = '2014-03-14'
|
11
|
+
spec.summary = 'Soul Catcher enables us to watch and get connected clients mac addresses.'
|
12
|
+
spec.description = 'Soul Catcher is a solution to get unlimited internet access when using a captive portal.'
|
13
|
+
spec.license = 'MIT'
|
14
|
+
spec.homepage = 'https://github.com/shideneyu/soul-catcher'
|
15
|
+
spec.files = `git ls-files`.split($\)
|
16
|
+
spec.executables = spec.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
17
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
18
|
+
spec.require_paths = ['lib']
|
19
|
+
|
20
|
+
spec.add_development_dependency 'bundler', '~> 1.7'
|
21
|
+
spec.add_development_dependency 'rake', '~> 10.0'
|
22
|
+
|
23
|
+
spec.add_development_dependency 'digest'
|
24
|
+
spec.add_development_dependency 'highline'
|
25
|
+
spec.add_development_dependency 'ruby-progressbar'
|
26
|
+
spec.add_development_dependency 'choice'
|
27
|
+
spec.add_development_dependency 'formatador'
|
28
|
+
spec.add_development_dependency 'pry'
|
29
|
+
end
|
metadata
ADDED
@@ -0,0 +1,169 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: soul_catcher
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- sidney sissaoui
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-03-14 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ~>
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.7'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ~>
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.7'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ~>
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ~>
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: digest
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ! '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ! '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: highline
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ! '>='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: ruby-progressbar
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ! '>='
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ! '>='
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: choice
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ! '>='
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ! '>='
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: formatador
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ! '>='
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ! '>='
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: pry
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ! '>='
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ! '>='
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
description: Soul Catcher is a solution to get unlimited internet access when using
|
126
|
+
a captive portal.
|
127
|
+
email:
|
128
|
+
- shideneyu@gmail.com
|
129
|
+
executables:
|
130
|
+
- soul_catcher
|
131
|
+
extensions: []
|
132
|
+
extra_rdoc_files: []
|
133
|
+
files:
|
134
|
+
- .gitignore
|
135
|
+
- .ruby-version
|
136
|
+
- Gemfile
|
137
|
+
- LICENSE.txt
|
138
|
+
- README.md
|
139
|
+
- Rakefile
|
140
|
+
- bin/soul_catcher
|
141
|
+
- lib/soul_catcher.rb
|
142
|
+
- lib/soul_catcher/version.rb
|
143
|
+
- soul_catcher.gemspec
|
144
|
+
homepage: https://github.com/shideneyu/soul-catcher
|
145
|
+
licenses:
|
146
|
+
- MIT
|
147
|
+
metadata: {}
|
148
|
+
post_install_message:
|
149
|
+
rdoc_options: []
|
150
|
+
require_paths:
|
151
|
+
- lib
|
152
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
153
|
+
requirements:
|
154
|
+
- - ! '>='
|
155
|
+
- !ruby/object:Gem::Version
|
156
|
+
version: '0'
|
157
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
158
|
+
requirements:
|
159
|
+
- - ! '>='
|
160
|
+
- !ruby/object:Gem::Version
|
161
|
+
version: '0'
|
162
|
+
requirements: []
|
163
|
+
rubyforge_project:
|
164
|
+
rubygems_version: 2.2.2
|
165
|
+
signing_key:
|
166
|
+
specification_version: 4
|
167
|
+
summary: Soul Catcher enables us to watch and get connected clients mac addresses.
|
168
|
+
test_files: []
|
169
|
+
has_rdoc:
|