spior 0.1.0 → 0.1.5

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,3 @@
1
+ module Spior
2
+ VERSION = '0.1.5'.freeze
3
+ end
@@ -1,35 +1,41 @@
1
+ require File.dirname(__FILE__) + "/lib/spior/version"
2
+
1
3
  Gem::Specification.new do |s|
2
4
  s.name = "spior"
3
-
4
- s.summary = "A tool to make TOR your default gateway and randomize your hardware"
5
+ s.version = Spior::VERSION
6
+ s.summary = "A tool to make TOR your default gateway"
5
7
  s.description = <<-EOF
6
- A tool to make TOR your default gateway and randomize your hardware.
8
+ A tool to make TOR your default gateway
7
9
  EOF
8
-
9
10
  s.metadata = {
10
11
  "changelog_uri" => "https://github.com/szorfein/spior/blob/master/CHANGELOG.md",
11
12
  "bug_tracker_uri" => "https://github.com/szorfein/spior/issues",
12
13
  "wiki_uri" => "https://github.com/szorfein/spior"
13
14
  }
15
+ s.author = ['szorfein']
14
16
 
15
- s.version = "0.1.0"
16
- s.requirements << 'tor'
17
- s.requirements << 'sudo'
18
- s.requirements << 'iptables'
19
- s.requirements << 'deceitmac'
20
17
  s.platform = Gem::Platform::RUBY
21
- s.author = ['szorfein']
22
- s.homepage = 'https://github.com/szorfein/spior'
18
+
19
+ s.licenses = ['MIT']
23
20
  s.email = 'szorfein@protonmail.com'
24
- s.required_ruby_version = '>=2.4'
21
+ s.homepage = 'https://github.com/szorfein/spior'
22
+
25
23
  s.files = `git ls-files`.split(" ")
26
24
  s.files.reject! { |fn| fn.include? "certs" }
27
25
  s.files.reject! { |fn| fn.include? "Makefile" }
28
26
  s.executables = [ 'spior' ]
27
+
28
+ s.extra_rdoc_files = Dir["README.md", "CHANGELOG.md", "LICENSE.txt"]
29
+
29
30
  s.test_files = Dir["test/test_*.rb"]
30
- s.licenses = ['MIT']
31
31
  s.cert_chain = ['certs/szorfein.pem']
32
32
  s.signing_key = File.expand_path("~/.ssh/gem-private_key.pem") if $0 =~ /gem\z/
33
+
34
+ s.requirements << 'tor'
35
+ s.requirements << 'iptables'
36
+
37
+ s.required_ruby_version = '>=2.4'
38
+
33
39
  s.add_runtime_dependency('rainbow', '3.0.0')
34
40
  s.add_runtime_dependency('interfacez', '1.0.3')
35
41
  s.add_runtime_dependency('nomansland', '0.0.2')
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.1.0
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - szorfein
@@ -35,7 +35,7 @@ cert_chain:
35
35
  J/zT/q2Ac7BWpSLbv6p9lChBiEnD9j24x463LR5QQjDNS5SsjzRQfFuprsa9Nqf2
36
36
  Tw==
37
37
  -----END CERTIFICATE-----
38
- date: 2020-05-08 00:00:00.000000000 Z
38
+ date: 2020-11-01 00:00:00.000000000 Z
39
39
  dependencies:
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: rainbow
@@ -93,39 +93,42 @@ dependencies:
93
93
  - - '='
94
94
  - !ruby/object:Gem::Version
95
95
  version: 0.4.2
96
- description: " A tool to make TOR your default gateway and randomize your hardware.\n"
96
+ description: " A tool to make TOR your default gateway\n"
97
97
  email: szorfein@protonmail.com
98
98
  executables:
99
99
  - spior
100
100
  extensions: []
101
- extra_rdoc_files: []
101
+ extra_rdoc_files:
102
+ - README.md
103
+ - CHANGELOG.md
102
104
  files:
103
105
  - ".gitignore"
104
106
  - CHANGELOG.md
105
107
  - LICENSE
106
108
  - README.md
109
+ - Rakefile
107
110
  - bin/spior
108
- - conf/ipt_mod.conf
109
- - conf/iptables.service
110
- - conf/resolv.conf
111
- - conf/ssh.conf
112
- - conf/sshd.conf
113
- - conf/sshuttle.service
114
- - conf/torrc/torrc_archlinux
115
- - conf/torrc/torrc_default
111
+ - ext/ipt_mod.conf
112
+ - ext/iptables.service
113
+ - lib/spior.rb
116
114
  - lib/spior/clear.rb
117
115
  - lib/spior/copy.rb
116
+ - lib/spior/helpers.rb
118
117
  - lib/spior/install.rb
119
118
  - lib/spior/iptables.rb
120
- - lib/spior/mac.rb
119
+ - lib/spior/iptables/default.rb
120
+ - lib/spior/iptables/root.rb
121
+ - lib/spior/iptables/tor.rb
122
+ - lib/spior/menu.rb
121
123
  - lib/spior/msg.rb
122
124
  - lib/spior/network.rb
123
125
  - lib/spior/options.rb
124
126
  - lib/spior/persist.rb
125
- - lib/spior/reload.rb
126
- - lib/spior/runner.rb
127
127
  - lib/spior/status.rb
128
128
  - lib/spior/tor.rb
129
+ - lib/spior/tor/info.rb
130
+ - lib/spior/tor/restart.rb
131
+ - lib/spior/version.rb
129
132
  - spior.gemspec
130
133
  - test/test_install.rb
131
134
  - test/test_options.rb
@@ -152,13 +155,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
152
155
  version: '0'
153
156
  requirements:
154
157
  - tor
155
- - sudo
156
158
  - iptables
157
- - deceitmac
158
- rubygems_version: 3.1.2
159
+ rubygems_version: 3.0.3
159
160
  signing_key:
160
161
  specification_version: 4
161
- summary: A tool to make TOR your default gateway and randomize your hardware
162
+ summary: A tool to make TOR your default gateway
162
163
  test_files:
163
- - test/test_options.rb
164
164
  - test/test_install.rb
165
+ - test/test_options.rb
metadata.gz.sig CHANGED
Binary file
@@ -1 +0,0 @@
1
- nameserver 127.0.0.1
@@ -1,29 +0,0 @@
1
- Host *.onion
2
- ProxyCommand socat - SOCKS4A:localhost:%h:%p,socksport=9050
3
-
4
- Host github.com
5
- KexAlgorithms curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
6
- Ciphers chacha20-poly1305@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr,aes256-cbc,aes192-cbc,aes128-cbc
7
- MACs hmac-sha2-256,hmac-sha2-512,hmac-sha1
8
-
9
- Host *
10
- Protocol 2
11
- KexAlgorithms curve25519-sha256@libssh.org,diffie-hellman-group-exchange-sha256
12
-
13
- MACs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-512,hmac-sha2-256,umac-128@openssh.com
14
-
15
- Ciphers chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr
16
-
17
- PasswordAuthentication no
18
- ChallengeResponseAuthentication no
19
- PubkeyAuthentication yes
20
- ForwardX11Trusted no
21
- ForwardX11 no
22
- ForwardAgent no
23
- ConnectTimeout 40
24
-
25
- # Send locale environment variables. #367017
26
- SendEnv LANG LC_ALL LC_COLLATE LC_CTYPE LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LANGUAGE LC_ADDRESS LC_IDENTIFICATION LC_MEASUREMENT LC_NAME LC_PAPER LC_TELEPHONE
27
-
28
- # Send COLORTERM to match TERM. #658540
29
- SendEnv COLORTERM
@@ -1,46 +0,0 @@
1
- # ref https://github.com/stribika/stribika.github.io/wiki/Secure-Secure-Shell
2
- # ref https://github.com/jumanjihouse/devenv/blob/master/app/etc/ssh/sshd_config
3
- # ref https://www.ssh.com/ssh/sshd_config/
4
-
5
- # Support for curve25519 KEX and chacha20 are on the wishlist.
6
- KexAlgorithms curve25519-sha256@libssh.org,diffie-hellman-group-exchange-sha256
7
-
8
- hostkeyalgorithms ssh-ed25519-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,ssh-ed25519,rsa-sha2-512,rsa-sha2-256
9
-
10
- Ciphers chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr
11
-
12
- MACs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-512,hmac-sha2-256,umac-128@openssh.com
13
-
14
- Protocol 2
15
- AllowGroups ssh-user
16
-
17
- # Only allow 4096-byte RSA key
18
- HostKey /etc/ssh/ssh_host_rsa_key
19
- HostKey /etc/ssh/ssh_host_ed25519_key
20
-
21
- PermitEmptyPasswords no
22
-
23
- # Change to no to disable s/key passwords
24
- ChallengeResponseAuthentication no
25
-
26
- PubkeyAuthentication yes
27
-
28
- # With TOR
29
- #ListenAddress 127.0.0.1:22
30
-
31
- UsePAM yes
32
- PasswordAuthentication no
33
- PrintMotd no
34
- PrintLastLog no
35
-
36
- X11Forwarding no
37
- permitrootlogin no
38
-
39
- # override default of no subsystems
40
- Subsystem sftp /usr/lib64/misc/sftp-server
41
-
42
- # Allow client to pass locale environment variables. #367017
43
- AcceptEnv LANG LC_ALL LC_COLLATE LC_CTYPE LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LANGUAGE LC_ADDRESS LC_IDENTIFICATION LC_MEASUREMENT LC_NAME LC_PAPER LC_TELEPHONE
44
-
45
- # Allow client to pass COLORTERM to match TERM. #658540
46
- AcceptEnv COLORTERM
@@ -1,11 +0,0 @@
1
- [Unit]
2
- Description=Create a transparent proxy over SSH with sshuttle
3
- After=network-online.target
4
-
5
- [Service]
6
- Type=notify
7
- NotifyAccess=all
8
- ExecStart=/usr/bin/sshuttle -vr username@localhost 0/0
9
-
10
- [Install]
11
- WantedBy=multi-user.target
@@ -1,18 +0,0 @@
1
- DataDirectory /var/lib/tor/data
2
-
3
- Log notice stdout
4
-
5
- GeoIPExcludeUnknown 1
6
-
7
- ## Torified DNS
8
- DNSPort 127.0.0.1:9061
9
- AutomapHostsOnResolve 1
10
- AutomapHostsSuffixes .exit,.onion
11
-
12
- SocksPort 9050
13
-
14
- VirtualAddrNetworkIPv4 10.192.0.0/10
15
- TransPort 9040 IsolateClientAddr IsolateClientProtocol IsolateDestAddr IsolateDestPort
16
-
17
- TestSocks 1
18
- MaxCircuitDirtiness 600
@@ -1,20 +0,0 @@
1
- User tor
2
- PIDFile /run/tor/tor.pid
3
- DataDirectory /var/lib/tor/data
4
-
5
- Log notice stdout
6
-
7
- GeoIPExcludeUnknown 1
8
-
9
- ## Torified DNS
10
- DNSPort 127.0.0.1:9061
11
- AutomapHostsOnResolve 1
12
- AutomapHostsSuffixes .exit,.onion
13
-
14
- SocksPort 9050
15
-
16
- VirtualAddrNetworkIPv4 10.192.0.0/10
17
- TransPort 9040 IsolateClientAddr IsolateClientProtocol IsolateDestAddr IsolateDestPort
18
-
19
- TestSocks 1
20
- MaxCircuitDirtiness 600
@@ -1,11 +0,0 @@
1
- require "pathname"
2
- require_relative "msg"
3
-
4
- module Spior
5
- module MAC
6
- def self.randomize(interface)
7
- @network_int = interface
8
- system("deceitmac --interface #{@network_int} --random --dhcpcd --tor --no-banner")
9
- end
10
- end
11
- end
@@ -1,48 +0,0 @@
1
- require_relative 'options'
2
- require_relative 'install'
3
- require_relative 'copy'
4
- require_relative 'mac'
5
- require_relative 'iptables'
6
- require_relative 'network'
7
- require_relative 'persist'
8
- require_relative 'msg'
9
-
10
- module Spior
11
- class Runner
12
- def initialize(argv)
13
- @options = Options.new(argv)
14
- @network = false
15
- end
16
-
17
- def run
18
- if @options.install then
19
- Msg.head
20
- Spior::Install::dependencies
21
- Spior::Copy::config_files
22
- end
23
- if @options.mac then
24
- Msg.head
25
- Spior::Install::check_mac
26
- if not @network
27
- @network = Spior::Network.new(@options.interface)
28
- end
29
- Spior::MAC::randomize(@network.card)
30
- end
31
- if @options.tor then
32
- Msg.head
33
- Spior::Install::check_base
34
- Spior::Copy::config_files
35
- if not @network
36
- @network = Spior::Network.new(@options.interface)
37
- end
38
- Spior::Iptables::tor(@network.card)
39
- end
40
- if @options.persist then
41
- if not @network
42
- @network = Spior::Network.new(@options.interface)
43
- end
44
- Spior::Persist::all(@network.card)
45
- end
46
- end
47
- end
48
- end