Python Reverse Shell Tutorial - 5 - Testing the Program Locally

preview_player
Показать описание
Рекомендации по теме
Комментарии
Автор

So nice of you to tell us which parts to remove to use this unethically <3.

ShifterCZECH
Автор

Worked at this for like 4 hours trying to adjust it for Python 2.7. Thought I'd dug myself into a pit of errors at one point, but damn does it feel good when it finally works. Thanks for the practice & content man.

jeremyphillips
Автор

that friend in Texas.. he needs to start paying for support

lassebg
Автор

after 2000 years of fixing my own bugs it worked fine :D
Thanks a lot for your Courses it helps a lot <3

ahmdrn
Автор

Watching this in 2021: If anyone experiences weird behavior where the client.py gets deleted as soon as you try to run it, it's due windows defender thinking client.py is a virus. To get it to work, I had to go into Virus & Threat protection settings and turn off Real-time protection and Cloud-delivered protection. Proceed at your own risk!

Franchyze
Автор

I got : ConnectionRefusedError: [WinError 10061] No connection could be made because the target machine actively refused it

Cyfix
Автор

I have typed in the command "dir" i looked at both the client and the server but nothing has shown up. pls help

shadowmaster
Автор

Please help :(

output_str = str(output_bytes, "utf-8")
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 306: invalid start byte

jwxvedt
Автор

I got an error:
Socket binding error: [WinError 10049] The requested address is not valid in its context
I put my IP in the server and the client in the host variable

iwanttodie
Автор

Hey I got an error on the client side when sending a command:

Traceback (most recent call last):
File Shell/client.py", line 17, in <module>
output_str = str(output_bytes, 'utf-8')
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x84 in position 8: invalid start byte

BlackTigerHD
Автор

When I type a command on the server cmd, the client cmd crash...

Nicolas-pdvy
Автор

I works!
 Excellent!!
Pls, go on making those sort of python videos.

sebasq
Автор

I did exactly like Bucky did (server and client with exactly the same code) but I always got the same error:

client_reponse = str(con.recv(1024), "utf-8")
ConnectionAbortedError: [WinError 10053] An established connection was aborted by the software in your host machine

Any solve for this problem?

aloualassane
Автор

in <module>
output_str = str(output_bytes, "utf-8")
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa3 in position 44: invalid start byte
help i got this error

urieeel
Автор

Got an error... no output, not in client.py and not in server.py, and if I type "clear" I get this response:
server.py:
clear
Traceback (most recent call last):
File "C:\Users\Joep van Dijk\Desktop\Python reverse shell\Server.py", line 52, in <module>
main()
File "C:\Users\Joep van Dijk\Desktop\Python reverse shell\Server.py", line 50, in main
socket_accept()
File "C:\Users\Joep van Dijk\Desktop\Python reverse shell\Server.py", line 32, in socket_accept
send_command(conn)
File "C:\Users\Joep van Dijk\Desktop\Python reverse shell\Server.py", line 44, in send_command
client_response = str(conn.recv(1024), "UTF-8")

So after the second command the program crashes and gives me an error. Can someone help me?
Thanks

joepvandijk
Автор

The connection has been established but i couldn't send commands
i was testing on my computer using sublime text3 for server
and ( PYTHON IDLE) for client


it goes well untill send_commands func i tested that

moamenebrahim
Автор

Traceback (most recent call last):
File "C:/Users/Home/Desktop/Python Reverse Shell Tutorials/server.py", line 64, in <module>
main()
File "C:/Users/Home/Desktop/Python Reverse Shell Tutorials/server.py", line 61, in main
socket_accept()
File "C:/Users/Home/Desktop/Python Reverse Shell Tutorials/server.py", line 39, in socket_accept
send_commands(conn)
File "C:/Users/Home/Desktop/Python Reverse Shell Tutorials/server.py", line 52, in send_commands
if len(str.encode(cmd)) > 0:
TypeError: descriptor 'encode' requires a 'str' object but received a 'builtin_function_or_method'

martinled
Автор

if you type 'quit' you'll find an error. Here is a quick way to fix it:
if len(str.encode(cmd))>0:
if cmd == 'quit':
conn.close()
s.close()
else:
conn.send(str.encode(cmd))
client_response = str(conn.recv(1024), "utf-8")
print (client_response, end="")

geroblacksmith
Автор

Hey Bucky i got an error and don't now what to do i have tried looking it up but cant seem to find any helpful info heres the error

File "C:/Users/Abdilatif/PycharmProjects/untitled/server.py", line 45, in send_commands


client_response = str(conn.recv(1024), 'utf-8')


ConnectionAbortedError: [WinError 10053] An established connection was aborted by the software in your host machine

abdilatifmusa
Автор

Kinda new to network programming with python.

I noticed when you just type cd it crashes the client so adding in another if statement to handle that.
if data[:2].decode("utf-8") == 'cd':
if len(data) <= 2:
os.chdir('/root/')
else:

Not sure how to do that in cross platform so if it's Windows it will just come back as an invalid command. Been so long since I used a Windows prompt I can't even remember I think it's something like cd C:. Not sure if there is a better way to do this. It also crashes the client if I run cd -.

infosecemporium
visit shbcf.ru