spior 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9f1f4458f99b3d0d4f7aba4c35efab6dff475f11577b3b046b566321c584ea33
4
- data.tar.gz: c66a056ab44299ec68cbb1878d5d3036281bf43f94aaa149ebc7c9e7b4490951
3
+ metadata.gz: b62d34281190d72cbaa36cc999dc6ced8e652b2ee134c215fe232f4e9c7abc33
4
+ data.tar.gz: 3e0eed4ff972cabfc8d2d6e69f3e00574cec7af55f63addca6c8158cf727386f
5
5
  SHA512:
6
- metadata.gz: ac80151ddbf3922be49e5c5d710aee4724c8730d781f00bd8c5fe550135d00389a2a92f04af89f32f102ac06c508f52631fa237206a4b1cff618f03e10f55791
7
- data.tar.gz: 17137326682492dbdb896718ad78fe75cd99d65d97fc7ffd1baf4dd0c2ddb3ccdb67bc7cf6530c7b69175770ebd3faed70d94942993f4080ce2ca21d5df0fd9a
6
+ metadata.gz: 4c92161d748562eafdcb51a8dbcc1d5d78d830131b07f4f97c9e041d533e113f3288e406b8e9b8eda7ef4302fa6ac9dd0e68404a2e364d79f4a5db3be6516337
7
+ data.tar.gz: 566584154534bb25415246092b134f6a849b37244cd484fae3717921be51bbbda3f81969e2670c6c83ff0039385664d7d878de57f992772484b4580ee0248ccd
checksums.yaml.gz.sig CHANGED
Binary file
data/CHANGELOG.md ADDED
@@ -0,0 +1,14 @@
1
+ ## 0.0.4, release 2020-05-02
2
+ * Spior can now randomize a mac address with decertmac
3
+ * Add field s.metadata to spior.gemspec
4
+ * Add lib/spior/mac
5
+ * Add deceirtmac to the optionParser (-m|--mac, -c|--card)
6
+ * Install deceirtmac with -i|--install
7
+ * Add a Makefile for me
8
+ * Add the Gem Interfacez as dependencies
9
+
10
+ ## 0.0.3, release 2020-05-01
11
+ * Separate install / copy
12
+ * Add instruction to install deceirtmac in the README
13
+ * Add option -s | --status
14
+ * Add the Gem Rainbow as dependencies
data/lib/spior/mac.rb ADDED
@@ -0,0 +1,52 @@
1
+ require "pathname"
2
+ require "interfacez"
3
+ require_relative "msg"
4
+
5
+ module Spior
6
+ class MAC
7
+
8
+ def self.randomize(interface)
9
+ @network_int = interface
10
+ @check = false
11
+ check_dep
12
+ verify_card
13
+ if @check == false then
14
+ puts "Checking network interface..."
15
+ ask_for_card
16
+ end
17
+ system("deceitmac --interface #{@network_int} --random --dhcpcd --tor --no-banner")
18
+ end
19
+
20
+ private
21
+
22
+ def self.check_dep
23
+ if ! Pathname.new("/usr/local/bin/deceitmac") then
24
+ Msg.error "deceitmac is not installed, please, exec spior --install"
25
+ exit(-1)
26
+ end
27
+ end
28
+
29
+ def self.verify_card
30
+ return if @check or not @network_int
31
+ Interfacez.all do |interface|
32
+ if interface == @network_int then
33
+ @check = true
34
+ end
35
+ end
36
+ if not @check then
37
+ Msg.err "Your interface #{@network_int} is no found"
38
+ end
39
+ end
40
+
41
+ def self.ask_for_card
42
+ until @check == true
43
+ Interfacez.all do |interface|
44
+ print interface + " "
45
+ end
46
+ printf "\nWhich interface to randomize ? "
47
+ @network_int = gets.chomp
48
+ verify_card
49
+ end
50
+ end
51
+ end
52
+ end
data/lib/spior/options.rb CHANGED
@@ -3,12 +3,12 @@ require_relative 'status'
3
3
 
4
4
  module Spior
5
5
  class Options
6
- attr_reader :install
7
- attr_reader :copy
6
+ attr_reader :install , :copy, :mac , :interface
8
7
 
9
8
  def initialize(argv)
10
9
  @install = false
11
10
  @copy = false
11
+ @mac = false
12
12
  parse(argv)
13
13
  end
14
14
 
@@ -25,6 +25,14 @@ module Spior
25
25
  @copy = true
26
26
  end
27
27
 
28
+ opts.on("-m", "--mac", "Change your mac") do
29
+ @mac = true
30
+ end
31
+
32
+ opts.on("-c NAME", "--card NAME", "Network card to change, optionnal") do |net|
33
+ @interface = net
34
+ end
35
+
28
36
  opts.on("-s", "--status", "Look infos about your current ip") do
29
37
  Spior::Status::info
30
38
  end
data/lib/spior/runner.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  require_relative 'options'
2
2
  require_relative 'install'
3
3
  require_relative 'copy'
4
+ require_relative 'mac'
4
5
  require_relative 'msg'
5
6
 
6
7
  module Spior
@@ -18,6 +19,10 @@ module Spior
18
19
  Msg.head
19
20
  Spior::Copy::config_files
20
21
  end
22
+ if @options.mac then
23
+ Msg.head
24
+ Spior::MAC::randomize(@options.interface)
25
+ end
21
26
  end
22
27
  end
23
28
  end
data/spior.gemspec CHANGED
@@ -2,9 +2,18 @@ Gem::Specification.new do |s|
2
2
  s.name = "spior"
3
3
 
4
4
  s.summary = "A tool to make TOR your default gateway and randomize your hardware"
5
- s.description = "Status: not yet functionnal, please wait for the next releases !"
5
+ s.description = <<-EOF
6
+ A tool to make TOR your default gateway and randomize your hardware
7
+ Status: not yet functionnal, please wait for the next releases !"
8
+ EOF
6
9
 
7
- s.version = "0.0.3"
10
+ s.metadata = {
11
+ "changelog_uri" => "https://github.com/szorfein/spior/blob/master/CHANGELOG.md",
12
+ "bug_tracker_uri" => "https://github.com/szorfein/spior/issues",
13
+ "wiki_uri" => "https://github.com/szorfein/spior"
14
+ }
15
+
16
+ s.version = "0.0.4"
8
17
  s.requirements << 'tor'
9
18
  s.requirements << 'sudo'
10
19
  s.requirements << 'iptables'
@@ -23,4 +32,5 @@ Gem::Specification.new do |s|
23
32
  s.cert_chain = ['certs/szorfein.pem']
24
33
  s.signing_key = File.expand_path("~/.ssh/gem-private_key.pem") if $0 =~ /gem\z/
25
34
  s.add_runtime_dependency('rainbow', '3.0.0')
35
+ s.add_runtime_dependency('interfacez', '1.0.3')
26
36
  end
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spior
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - szorfein
@@ -51,7 +51,23 @@ dependencies:
51
51
  - - '='
52
52
  - !ruby/object:Gem::Version
53
53
  version: 3.0.0
54
- description: 'Status: not yet functionnal, please wait for the next releases !'
54
+ - !ruby/object:Gem::Dependency
55
+ name: interfacez
56
+ requirement: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - '='
59
+ - !ruby/object:Gem::Version
60
+ version: 1.0.3
61
+ type: :runtime
62
+ prerelease: false
63
+ version_requirements: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - '='
66
+ - !ruby/object:Gem::Version
67
+ version: 1.0.3
68
+ description: |2
69
+ A tool to make TOR your default gateway and randomize your hardware
70
+ Status: not yet functionnal, please wait for the next releases !"
55
71
  email: szorfein@protonmail.com
56
72
  executables:
57
73
  - spior
@@ -59,6 +75,7 @@ extensions: []
59
75
  extra_rdoc_files: []
60
76
  files:
61
77
  - ".gitignore"
78
+ - CHANGELOG.md
62
79
  - LICENSE
63
80
  - README.md
64
81
  - bin/spior
@@ -71,6 +88,7 @@ files:
71
88
  - conf/torrc
72
89
  - lib/spior/copy.rb
73
90
  - lib/spior/install.rb
91
+ - lib/spior/mac.rb
74
92
  - lib/spior/msg.rb
75
93
  - lib/spior/options.rb
76
94
  - lib/spior/runner.rb
@@ -81,7 +99,10 @@ files:
81
99
  homepage: https://github.com/szorfein/spior
82
100
  licenses:
83
101
  - MIT
84
- metadata: {}
102
+ metadata:
103
+ changelog_uri: https://github.com/szorfein/spior/blob/master/CHANGELOG.md
104
+ bug_tracker_uri: https://github.com/szorfein/spior/issues
105
+ wiki_uri: https://github.com/szorfein/spior
85
106
  post_install_message:
86
107
  rdoc_options: []
87
108
  require_paths:
metadata.gz.sig CHANGED
@@ -1,3 +1 @@
1
- ,w� ��5��l�㵓�:-8r�����M��g�6�J�AՐc���J�1�(�.�ش�|����c�GG1^;V��32B��w�y"���ᩊbYfT(���S� 9#��3����4�;��V2�p^���P�E��-1�IW��_#d��߫Sa���쉵�H��X25^M�EhS
2
- .����rb���򂀉b���J2y�J٢�Un���<G��W�V8�~�L����1g!�.Ϝ�?>,XiD����:�/6��0z�N=�rȎ?���,u���N`Q���{��Fy\v�l���;�;��aCW%�
3
- $q�5� 4@g'��ƒR�@N
1
+ }C
4
2
  �~:�����ܘ�t�(�Z�j�&f�1�#�'+E Em��O��M�\o>���%V����1�{^;+��AS���B��JZ�����/<�9�m�_ˈX�o�x���94q�YŻ����(�lY�o��7� l?�1��B���$j�Zt�̀�Ai��7 l�D�o��FK�;F3GR=�w��i�-���