rails_pwnerer 0.5.3 → 0.5.4
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.
- data/CHANGELOG +2 -0
- data/Manifest +1 -0
- data/lib/pwnage/base/process.rb +38 -0
- data/rails_pwnerer.gemspec +4 -2
- metadata +3 -1
data/CHANGELOG
CHANGED
data/Manifest
CHANGED
@@ -0,0 +1,38 @@
|
|
1
|
+
# extends Base with process management features
|
2
|
+
|
3
|
+
begin
|
4
|
+
require 'sys/proctable'
|
5
|
+
|
6
|
+
module RailsPwnage::Base
|
7
|
+
|
8
|
+
# returns information about a process
|
9
|
+
def process_info(pid = nil)
|
10
|
+
info = Hash.new
|
11
|
+
Sys::ProcTable.ps.each do |process|
|
12
|
+
item = { :cmdline => process.cmdline, :pid => pid.to_s }
|
13
|
+
|
14
|
+
if pid.nil?
|
15
|
+
info[process.pid.to_s] = item
|
16
|
+
else
|
17
|
+
return item if item.pid.to_s == pid.to_s
|
18
|
+
end
|
19
|
+
end
|
20
|
+
if pid.nil?
|
21
|
+
return info
|
22
|
+
else
|
23
|
+
return nil
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
rescue
|
28
|
+
# the sys-proctable gem isn't available during scaffolding
|
29
|
+
module RailsPwnage::Base
|
30
|
+
def process_info(pid = nil)
|
31
|
+
if pid.nil?
|
32
|
+
return {}
|
33
|
+
else
|
34
|
+
return nil
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
data/rails_pwnerer.gemspec
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
|
2
|
-
# Gem::Specification for Rails_pwnerer-0.5.
|
2
|
+
# Gem::Specification for Rails_pwnerer-0.5.4
|
3
3
|
# Originally generated by Echoe
|
4
4
|
|
5
5
|
--- !ruby/object:Gem::Specification
|
6
6
|
name: rails_pwnerer
|
7
7
|
version: !ruby/object:Gem::Version
|
8
|
-
version: 0.5.
|
8
|
+
version: 0.5.4
|
9
9
|
platform: ruby
|
10
10
|
authors:
|
11
11
|
- Victor Costan
|
@@ -48,6 +48,7 @@ extra_rdoc_files:
|
|
48
48
|
- lib/pwnage/base/gems.rb
|
49
49
|
- lib/pwnage/base/hostname.rb
|
50
50
|
- lib/pwnage/base/packages.rb
|
51
|
+
- lib/pwnage/base/process.rb
|
51
52
|
- lib/pwnage/base/startup.rb
|
52
53
|
- lib/pwnage/base.rb
|
53
54
|
- lib/pwnage/config/app.rb
|
@@ -84,6 +85,7 @@ files:
|
|
84
85
|
- lib/pwnage/base/gems.rb
|
85
86
|
- lib/pwnage/base/hostname.rb
|
86
87
|
- lib/pwnage/base/packages.rb
|
88
|
+
- lib/pwnage/base/process.rb
|
87
89
|
- lib/pwnage/base/startup.rb
|
88
90
|
- lib/pwnage/base.rb
|
89
91
|
- lib/pwnage/config/app.rb
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_pwnerer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Victor Costan
|
@@ -45,6 +45,7 @@ extra_rdoc_files:
|
|
45
45
|
- lib/pwnage/base/gems.rb
|
46
46
|
- lib/pwnage/base/hostname.rb
|
47
47
|
- lib/pwnage/base/packages.rb
|
48
|
+
- lib/pwnage/base/process.rb
|
48
49
|
- lib/pwnage/base/startup.rb
|
49
50
|
- lib/pwnage/base.rb
|
50
51
|
- lib/pwnage/config/app.rb
|
@@ -81,6 +82,7 @@ files:
|
|
81
82
|
- lib/pwnage/base/gems.rb
|
82
83
|
- lib/pwnage/base/hostname.rb
|
83
84
|
- lib/pwnage/base/packages.rb
|
85
|
+
- lib/pwnage/base/process.rb
|
84
86
|
- lib/pwnage/base/startup.rb
|
85
87
|
- lib/pwnage/base.rb
|
86
88
|
- lib/pwnage/config/app.rb
|