Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reloading a module alias fails, while reloading the OG module still works #12026

Closed
wvu opened this issue Jun 28, 2019 · 3 comments · Fixed by #12223
Closed

Reloading a module alias fails, while reloading the OG module still works #12026

wvu opened this issue Jun 28, 2019 · 3 comments · Fixed by #12223

Comments

@wvu
Copy link
Contributor

wvu commented Jun 28, 2019

msf5 > use auxiliary/scanner/smb/login
msf5 auxiliary(scanner/smb/login) > reload
[*] Reloading module...
[-] Failed to reload module:
msf5 auxiliary(scanner/smb/login) > use auxiliary/scanner/smb/smb_login
msf5 auxiliary(scanner/smb/smb_login) > reload
[*] Reloading module...
msf5 auxiliary(scanner/smb/smb_login) >

#11941

@wvu
Copy link
Contributor Author

wvu commented Jun 28, 2019

Also, is there a way to get the original module name? I couldn't find it.

@wvu
Copy link
Contributor Author

wvu commented Jun 28, 2019

I'm currently using file_path.

@acammack-r7 acammack-r7 self-assigned this Jun 28, 2019
@acammack-r7
Copy link
Contributor

Oof, good catch. I can't decided on what should happen if you reload a module for an alias that doesn't contain that alias after reloading. Ex:

msf5 auxiliary(scanner/smb/login) > edit
.... remove the auxiliary/scanner/smb/login alias .....
msf5 auxiliary(scanner/smb/login) > reload
???????

Best solution I can think of is print a warning and then load the module under the real name, but I could also see erroring out the reload.

Originally fullname was going to be the original/root module name, but when I changed my mind I didn't add another field hold it. I'll PR a fix.

acammack-r7 added a commit to acammack-r7/metasploit-framework that referenced this issue Aug 22, 2019
Also speeds up module reloads by avoiding module instance creating
without a type.

Fixes rapid7#12026
@wvu wvu closed this as completed in 948918d Aug 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants