-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
renamed sessions example; added module execution example
- Loading branch information
1 parent
21acb15
commit 8174bd7
Showing
2 changed files
with
28 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import time | ||
|
||
from snek_sploit import MetasploitClient, ModuleType, SessionInformation | ||
|
||
|
||
def main(): | ||
# Initialize client | ||
client = MetasploitClient("msf", "root", disable_https_warnings=True) | ||
console = client.consoles.create() | ||
|
||
commands = [ | ||
"use multi/handler", | ||
"set PAYLOAD python/shell_reverse_tcp", | ||
"set LHOST 0.0.0.0", | ||
"set LPORT 4444", | ||
"run -z", | ||
] | ||
result = console.execute("\n".join(commands)) | ||
print(result) | ||
|
||
|
||
if __name__ == "__main__": | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters