Add PostCount (default 100) to list more posts

bug/bundler_fix
William Vu 2017-02-08 03:51:12 -06:00
parent 13f4b0d7ae
commit e480107bd5
1 changed files with 9 additions and 2 deletions

View File

@ -41,6 +41,10 @@ class MetasploitModule < Msf::Auxiliary
OptString.new('POST_CONTENT', [false, 'Post content']), OptString.new('POST_CONTENT', [false, 'Post content']),
OptString.new('POST_PASSWORD', [false, 'Post password (\'\' for none)']) OptString.new('POST_PASSWORD', [false, 'Post password (\'\' for none)'])
]) ])
register_advanced_options([
OptInt.new('PostCount', [false, 'Number of posts to list', 100])
])
end end
def check_host(_ip) def check_host(_ip)
@ -130,8 +134,11 @@ class MetasploitModule < Msf::Auxiliary
posts = [] posts = []
res = send_request_cgi({ res = send_request_cgi({
'method' => 'GET', 'method' => 'GET',
'uri' => normalize_uri(get_rest_api, 'posts') 'uri' => normalize_uri(get_rest_api, 'posts'),
'vars_get' => {
'per_page' => datastore['PostCount']
}
}, 3.5) }, 3.5)
if res && res.code == 200 if res && res.code == 200