2020-12-30 05:36:54 +00:00
|
|
|
#!./env/bin/python
|
|
|
|
import pwncat.manager
|
2021-01-01 23:53:13 +00:00
|
|
|
import time
|
2020-12-30 05:36:54 +00:00
|
|
|
|
|
|
|
# Create a manager
|
|
|
|
manager = pwncat.manager.Manager("data/pwncatrc")
|
|
|
|
|
|
|
|
# Establish a session
|
|
|
|
session = manager.create_session("windows", host="192.168.122.11", port=4444)
|
|
|
|
|
2021-01-01 23:53:13 +00:00
|
|
|
session.platform.channel.send(
|
|
|
|
b"""
|
|
|
|
csharp
|
|
|
|
/* ENDASM */
|
|
|
|
class command {
|
|
|
|
public void main()
|
|
|
|
{
|
|
|
|
System.Console.WriteLine("We can execute C# Now!");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/* ENDBLOCK */
|
|
|
|
powershell
|
|
|
|
Write-Host "And we can execute powershell!"
|
|
|
|
# ENDBLOCK
|
|
|
|
"""
|
|
|
|
)
|
|
|
|
|
2020-12-30 05:36:54 +00:00
|
|
|
manager.interactive()
|