Reset temporary password back - warvox - VoIP based wardialing tool, forked from rapid7/warvox.
DIR Log
DIR Files
DIR Refs
DIR README
---
DIR commit e0fa24eeb83d3c6216b4358510b969ff45fe0912
DIR parent 09db7333d2726e689a3cdcbac1b76f26fe636a28
HTML Author: HD Moore <hd_moore@rapid7.com>
Date: Wed, 26 Dec 2012 16:09:30 -0600
Reset temporary password back
Diffstat:
M etc/warvox.conf | 2 +-
M lib/warvox/config.rb | 46 ++++++++++++++++----------------
2 files changed, 24 insertions(+), 24 deletions(-)
---
DIR diff --git a/etc/warvox.conf b/etc/warvox.conf
@@ -9,7 +9,7 @@
#
authentication:
user: admin
- pass: lAjPQpUn7
+ pass: warvox
#
# Configure the path to all saved data files
DIR diff --git a/lib/warvox/config.rb b/lib/warvox/config.rb
@@ -1,7 +1,7 @@
module WarVOX
module Config
require 'yaml'
-
+
def self.authentication_creds
user = nil
pass = nil
@@ -13,15 +13,15 @@ module Config
)
user = info['authentication']['user']
pass = info['authentication']['pass']
- end
+ end
[user,pass]
end
-
+
def self.authenticate(user,pass)
wuser,wpass = authentication_creds
- (wuser == user and wpass == pass) ? true : false
+ (wuser == user and wpass == pass) ? true : false
end
-
+
def self.tool_path(name)
info = YAML.load_file(WarVOX::Conf)
return nil if not info
@@ -31,7 +31,7 @@ module Config
info['tools'][name].gsub('%BASE%', WarVOX::Base)
)
end
-
+
def self.data_path
info = YAML.load_file(WarVOX::Conf)
return nil if not info
@@ -45,7 +45,7 @@ module Config
return 1 if not info['analysis_threads']
[ info['analysis_threads'].to_i, 1 ].max
end
-
+
def self.blacklist_path
info = YAML.load_file(WarVOX::Conf)
return nil if not info
@@ -58,7 +58,7 @@ module Config
return if not path
data = File.read(path, File.size(path))
sigs = []
-
+
File.open(path, 'r') do |fd|
lno = 0
fd.each_line do |line|
@@ -70,7 +70,7 @@ module Config
end
sigs
end
-
+
end
def self.signatures_path
@@ -79,33 +79,33 @@ module Config
return nil if not info['signatures']
File.expand_path(info['signatures'].gsub('%BASE%', WarVOX::Base))
end
-
+
def self.signatures_load
path = signatures_path
sigs = []
return sigs if not path
- Dir.new(path).entries.sort{ |a,b|
- a.to_i <=> b.to_i
- }.map{ |ent|
- File.join(path, ent)
+ Dir.new(path).entries.sort{ |a,b|
+ a.to_i <=> b.to_i
+ }.map{ |ent|
+ File.join(path, ent)
}.each do |ent|
sigs << ent if File.file?(ent)
end
-
+
sigs
end
-
+
# This method searches the PATH environment variable for
# a fully qualified path to the supplied file name.
# Stolen from Rex
def self.find_full_path(file_name)
-
+
# Return absolute paths unmodified
if(file_name[0,1] == ::File::SEPARATOR)
return file_name
end
-
+
path = ENV['PATH']
if (path)
path.split(::File::PATH_SEPARATOR).each { |base|
@@ -120,23 +120,23 @@ module Config
end
return nil
end
-
+
# This method prevents two installations of WarVOX from using the same
# rails session key. The first time this method is called, it generates
# a new key and stores it in the rails directory, afterwards this key
# will be used every time.
def self.load_session_key
- kfile = File.join(WarVOX::Base, 'web', 'config', 'session.key')
+ kfile = File.join(WarVOX::Base, 'config', 'session.key')
if(not File.exists?(kfile))
# XXX: assume /dev/urandom exists
kdata = File.read('/dev/urandom', 64).unpack("H*")[0]
# Create the new session key file
fd = File.new(kfile, 'w')
-
+
# Make this file mode 0600
File.chmod(0600, kfile)
-
+
# Write it and close
fd.write(kdata)
fd.close
@@ -144,7 +144,7 @@ module Config
end
File.read(kfile)
end
-
+
end
end