spior 0.3.5 → 0.3.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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/auth.rb +1 -1
- data/lib/spior/iptables/rules.rb +5 -1
- data/lib/spior/tor/config.rb +1 -1
- data/lib/spior/tor/data.rb +2 -1
- data/lib/spior/tor/stop.rb +0 -7
- data/lib/spior/version.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +1 -1
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 07b4daf3d6c06b689e2d584b43e419eb4e9e9ea8e19c4bf71c3116428955f957
|
|
4
|
+
data.tar.gz: '08699ad87b9abc01147df75938c744268e33d313955bb046b736ad674f93820e'
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 92014306180514cf8b3f9bea57544054fc961127161a6ca8e067a7baeaec256fc365ca8c6e58fe4f88bfeb7f01c24b85350d7ac031dd44e4532b7c8c5ddbc497
|
|
7
|
+
data.tar.gz: 2971e056165009f5ef1dda7dcbc5e282ba1769076ffc99d439e3b8741a44d1aeb01197087b628e3f6103b1d23cfbb1861bfa27d1c843c52a5bb0e84caeba03f2
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data/lib/auth.rb
CHANGED
data/lib/spior/iptables/rules.rb
CHANGED
|
@@ -43,6 +43,8 @@ module Spior
|
|
|
43
43
|
end
|
|
44
44
|
|
|
45
45
|
def search_for_comment(filename)
|
|
46
|
+
return unless File.exist? filename
|
|
47
|
+
|
|
46
48
|
File.open(filename) do |f|
|
|
47
49
|
f.each do |line|
|
|
48
50
|
return true if line.match(/saved by Spior/)
|
|
@@ -88,7 +90,9 @@ module Spior
|
|
|
88
90
|
|
|
89
91
|
def search_iptables_config
|
|
90
92
|
case Nomansland.distro?
|
|
91
|
-
when :archlinux
|
|
93
|
+
when :archlinux
|
|
94
|
+
'/etc/iptables/iptables.rules'
|
|
95
|
+
when :void
|
|
92
96
|
'/etc/iptables/iptables.rules'
|
|
93
97
|
when :debian
|
|
94
98
|
'/etc/iptables.up.rules'
|
data/lib/spior/tor/config.rb
CHANGED
data/lib/spior/tor/data.rb
CHANGED
|
@@ -34,7 +34,8 @@ module Spior
|
|
|
34
34
|
def search(option_name)
|
|
35
35
|
File.open('/etc/tor/torrc') do |f|
|
|
36
36
|
f.each do |line|
|
|
37
|
-
|
|
37
|
+
line.match(%r{^#{option_name} ([a-z0-9./]*)}i) and
|
|
38
|
+
return Regexp.last_match(1)
|
|
38
39
|
end
|
|
39
40
|
end
|
|
40
41
|
false
|
data/lib/spior/tor/stop.rb
CHANGED
|
@@ -7,13 +7,6 @@ module Spior
|
|
|
7
7
|
# It also kill previous instance run by Spior
|
|
8
8
|
class Stop
|
|
9
9
|
def initialize
|
|
10
|
-
old_pid = `pgrep -f "tor -f /tmp/torrc*"`.chomp
|
|
11
|
-
|
|
12
|
-
if old_pid != ''
|
|
13
|
-
Msg.p "Found old pid > #{old_pid}, killing it..."
|
|
14
|
-
Helpers::Exec.new('kill').run("-9 #{old_pid}")
|
|
15
|
-
end
|
|
16
|
-
|
|
17
10
|
nomansland
|
|
18
11
|
end
|
|
19
12
|
|
data/lib/spior/version.rb
CHANGED
data.tar.gz.sig
CHANGED
|
Binary file
|
metadata
CHANGED
metadata.gz.sig
CHANGED
|
Binary file
|