0
I’m trying to accomplish a telnet
at the door SSH 22, using the pysocks
, but it seems that the SOCKS not connecting, but if I use the program Open Text Socks Client Dasboard it connects, but I need to do this by python, this program and for Windows and the SCRIPT will run on a LINUX machine
SCRIPT
import socket
import socks
import requests
import os
import pymssql
socks.setdefaultproxy(socks.PROXY_TYPE_SOCKS5, "meu-ip", 1080, True, 'usuario','senha')
socket.socket = socks.socksocket
socks(os.system('telnet meu-ip 22'))
OUTPUT:
Connecting To MY-IP... Could not open Connection to the host, on port 22: Connect failed Traceback (Most recent call last): File "teste2.py", line 11, in Socks(os.system('telnet my-ip 22')) Typeerror: 'module' Object is not callable
That’s pretty confusing, Telnet is on port 21, so unless the server is running telnet on port 22 this will never work. Another thing, if you will run the telnet command directly in the OS which is what happens in the last line, you do not need sockets, just that the OS has a native telnet client.
– Carlos H Marques
@Carloshmarques client can only be proxy access
– Luis Henrique
I need to do more q a telnet, but I thought q would be a good example telnet
– Luis Henrique
i am testing port 22 for SSH connection
– Luis Henrique