Skip to content

Commit 82ab4fc

Browse files
committed
Update cisco_firepower_download module & documentation
1 parent 8194603 commit 82ab4fc

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

documentation/modules/auxiliary/scanner/http/cisco_firepower_download.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,7 @@ admin:Admin123 by default:
2525

2626
If the file is found, it will be saved in the loot directory. If not found, the module should
2727
print an error indicating so.
28+
29+
## Demo
30+
31+
![cisco_download_demo](https://cloud.githubusercontent.com/assets/1170914/21782825/78ada38e-d67a-11e6-9b7b-c7b8e2956fba.gif)

modules/auxiliary/scanner/http/cisco_firepower_download.rb

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def do_login(ip)
7474
res_cookie = res.get_cookies
7575
if res.code == 302 && res_cookie.include?('CGISESSID')
7676
cgi_sid = res_cookie.scan(/CGISESSID=(\w+);/).flatten.first
77-
print_status("CGI Session ID: #{cgi_sid}")
77+
vprint_status("CGI Session ID: #{cgi_sid}")
7878
print_good("Authenticated as #{console_user}:#{console_pass}")
7979
report_cred(ip: ip, username: console_user, password: console_pass)
8080
return cgi_sid
@@ -155,7 +155,10 @@ def run_host(ip)
155155
end
156156

157157
res = download_file(cgi_sid, datastore['FILEPATH'])
158-
if remote_file_exists?(res)
158+
159+
if res.nil?
160+
print_error("Connection timed out while downloading: #{datastore['FILEPATH']}")
161+
elsif remote_file_exists?(res)
159162
save_file(res, ip)
160163
else
161164
print_error("Remote file not found: #{datastore['FILEPATH']}")

0 commit comments

Comments
 (0)