thc 0.0.4 → 0.0.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.
Files changed (6) hide show
  1. checksums.yaml +4 -4
  2. data/VERSION +1 -1
  3. data/lib/thc.rb +1 -1
  4. data/lib/thc/rc.rb +8 -6
  5. data/thc.gemspec +2 -2
  6. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6078dc9783586c6b07680e6a8d92ae5a3b1f1802
4
- data.tar.gz: c256330d7d7c119913d273d745161b0c4dc79f3b
3
+ metadata.gz: 73ea56b32bf40a0abd06ccfcf5eabe4940b9fa36
4
+ data.tar.gz: 4918864aad3d7f913416a999c83c74c88ab6b617
5
5
  SHA512:
6
- metadata.gz: 4cc53c3a21ea2e49c944595cc008da9421a4ba5ba9c193d5b5e84cb7852e83662d20eab904e81e12cd778a24109d6508138ec1f98c7a309bdee48cda833613a5
7
- data.tar.gz: 5e6091f7538b562d085e548e0a757fed7843ede275c0f2ff7340511121d7e4878f103f1313950958d2420b8c789cdf3384218e3aa8c7c7810b0dfdf9dde835c1
6
+ metadata.gz: 2f7b1842c10208688d8b9ea6505f646974044efaf8a8c3eb73fe884de1144c06943a06a5895be60b9d8152c0ffa1c1d3102521f1d643c2fabcab1b9c566f3a7a
7
+ data.tar.gz: 1c1d90b4eeaff31bdc2a8fcd9ca45c754b850724bed80748e803ecac2ee4340c009555a73fdf89c9e38b457c5e2515599779fe1b43ebce24743c54a3e29763d2
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.4
1
+ 0.0.5
data/lib/thc.rb CHANGED
@@ -9,7 +9,7 @@ require 'thc/rc'
9
9
 
10
10
  module THC
11
11
  attr_accessor :service
12
- VERSION="0.0.3"
12
+ VERSION="0.0.5"
13
13
  NAME="thc - Tor Hidden-Service Controller"
14
14
  @config = []
15
15
 
@@ -28,12 +28,14 @@ module THC
28
28
  count=-1;
29
29
  File.open(@torrc, 'r') do |f|
30
30
  f.each_line do |line|
31
- if line.include?("HiddenServiceDir")
32
- config << {'path' => line.split(" ").last, 'service' => []}
33
- count+=1;
34
- elsif line.include?("HiddenServicePort")
35
- config[count]['service'] << {'dport' => line.split(" ")[1].to_i, 'sport' => line.split(" ").last.split(":").last.to_i}
36
- #puts config.to_s
31
+ if !line.start_with?("#") then
32
+ if line.include?("HiddenServiceDir")
33
+ config << {'path' => line.split(" ").last, 'service' => []}
34
+ count+=1;
35
+ elsif line.include?("HiddenServicePort")
36
+ #puts config.to_s
37
+ config[count]['service'] << {'dport' => line.split(" ")[1].to_i, 'sport' => line.split(" ").last.split(":").last.to_i}
38
+ end
37
39
  end
38
40
  end
39
41
  end
@@ -2,11 +2,11 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: thc 0.0.4 ruby lib
5
+ # stub: thc 0.0.5 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "thc"
9
- s.version = "0.0.4"
9
+ s.version = "0.0.5"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - thez3ro