Skip to content

Commit e480107

Browse files
committed
Add PostCount (default 100) to list more posts
1 parent 13f4b0d commit e480107

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

modules/auxiliary/scanner/http/wordpress_content_injection.rb

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ def initialize(info = {})
4141
OptString.new('POST_CONTENT', [false, 'Post content']),
4242
OptString.new('POST_PASSWORD', [false, 'Post password (\'\' for none)'])
4343
])
44+
45+
register_advanced_options([
46+
OptInt.new('PostCount', [false, 'Number of posts to list', 100])
47+
])
4448
end
4549

4650
def check_host(_ip)
@@ -130,8 +134,11 @@ def list_posts
130134
posts = []
131135

132136
res = send_request_cgi({
133-
'method' => 'GET',
134-
'uri' => normalize_uri(get_rest_api, 'posts')
137+
'method' => 'GET',
138+
'uri' => normalize_uri(get_rest_api, 'posts'),
139+
'vars_get' => {
140+
'per_page' => datastore['PostCount']
141+
}
135142
}, 3.5)
136143

137144
if res && res.code == 200

0 commit comments

Comments
 (0)