EntySec / HatSploit

Modular penetration testing platform that enables you to write, test, and execute exploit code.
https://hatsploit.com
MIT License
277 stars 62 forks source link

fix #59

Closed thecakeisfalse closed 3 years ago

thecakeisfalse commented 3 years ago

fix bugs in post/macos/shell/suspend, post/unix/shell/getpid, post/windows/misc/message_box

[-] An error occurred in module: 'NoneType' object has no attribute 'send_command'!
enty8080 commented 3 years ago

@thecakeisfalse That's fine, but you need to remove self.print_error("Invalid session ID") and change if session is not None to just if session.

thecakeisfalse commented 3 years ago

@enty8080 I think that users should know if they are trying to «attack» session with invalid id

enty8080 commented 3 years ago

@thecakeisfalse Yes, I already did it here - https://github.com/EntySec/HatSploit/blob/f023ccfb37bfc5667508e4a429f9fab91aa21347/hatsploit/lib/modules.py#L200

thecakeisfalse commented 3 years ago

@enty8080 it don't show me any messages about session

(hsf)> use post/windows/misc/message_box
(hsf: post: Windows Invoke Message Box)> run
(hsf: post: Windows Invoke Message Box)> show options

Module Options (post/windows/misc/message_box):

    Option     Value             Required    Description           
    ------     -----             --------    -----------           
    MESSAGE    Hello, Friend!    yes         Message to show.      
    SESSION    0                 yes         Session to run on.    

(hsf: post: Windows Invoke Message Box)> 
enty8080 commented 3 years ago

@thecakeisfalse Ok, I'll take a look

thecakeisfalse commented 3 years ago

@enty8080 and you also have bug #60

thecakeisfalse commented 3 years ago

@enty8080 if I understand your code right, function compare_types works only when you use set in hsf. it doesn't work when you use run

enty8080 commented 3 years ago

@thecakeisfalse Of course I know this, I wrote code, lol :)

enty8080 commented 3 years ago

@thecakeisfalse Bug fixed, next time fill in the bug report form:

issues -> bug report