mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
security/tor: whitespace sweep
This commit is contained in:
@@ -44,8 +44,8 @@ $( document ).ready(function() {
|
||||
var tmp = '';
|
||||
for (var name in data) {
|
||||
if (data.hasOwnProperty(name)) {
|
||||
tmp += '<tr><td>' + name +
|
||||
'</td><td>' + data[name]['status'] +
|
||||
tmp += '<tr><td>' + name +
|
||||
'</td><td>' + data[name]['status'] +
|
||||
'</td><td><ul>';
|
||||
hosts = data[name]['hosts'];
|
||||
for (var host_id in hosts) {
|
||||
@@ -53,9 +53,9 @@ $( document ).ready(function() {
|
||||
tmp += '<li>' + hosts[host_id]['host'] + ' - ' + hosts[host_id]['nickname'] + '</li>';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
tmp += '</ul></td><td><ul>'
|
||||
|
||||
|
||||
flags = data[name]['flags'];
|
||||
for (var flag_id in flags) {
|
||||
if (flags.hasOwnProperty(flag_id)) {
|
||||
@@ -72,8 +72,8 @@ $( document ).ready(function() {
|
||||
var tmp = '';
|
||||
for (var name in data) {
|
||||
if (data.hasOwnProperty(name)) {
|
||||
tmp += '<tr><td>' + data[name]['stream_id'] +
|
||||
'</td><td>' + data[name]['stream_status'] +
|
||||
tmp += '<tr><td>' + data[name]['stream_id'] +
|
||||
'</td><td>' + data[name]['stream_status'] +
|
||||
'</td><td>' + data[name]['circuit_id'] +
|
||||
'</td><td>' + data[name]['destination_host'] +
|
||||
'</td><td>' + data[name]['destination_port'] +
|
||||
|
||||
@@ -107,7 +107,7 @@ class TorCTL
|
||||
flag_key, flag_value = flag_entry.split('=')
|
||||
[flag_key, flag_value.split(',')]
|
||||
end.to_h
|
||||
|
||||
|
||||
ret[circuit_id] = { status: status,
|
||||
hosts: hosts,
|
||||
flags: flags }
|
||||
@@ -163,14 +163,12 @@ if no_param_actions.include? options[:action]
|
||||
if data
|
||||
puts data.to_json
|
||||
else
|
||||
puts error: "no data"
|
||||
puts error: "no data"
|
||||
end
|
||||
rescue
|
||||
puts error: "execution error", error_str: $!
|
||||
puts error: "execution error", error_str: $!
|
||||
end
|
||||
end
|
||||
|
||||
#puts tor.get_config("controlport")
|
||||
tor.close
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user