2010-12-22 2 views
2

내 네트워크에있는 두 대의 컴퓨터에 대한 역 쉘을 만들려고하고, 나는 몇 년 전 netcat을 사용 쉘, 나는 무언가가 들어오는 연결을 수신하고자 않은 기억 netcat을 리버스 :

netcat -v -l -p <PORT> 

하지만 지금 내가 작동하지 않는다면 netcat 사용법을 알게 될 것이다.

$ netcat -v -l -p 12345 
usage: nc [-46DdhklnrStUuvzC] [-i interval] [-P proxy_username] [-p source_port] 
     [-s source_ip_address] [-T ToS] [-w timeout] [-X proxy_protocol] 
     [-x proxy_address[:port]] [hostname] [port[s]] 

최신 netcat 릴리스에서 뭔가가 변경 되었습니까?

내가 우분투를 10.04

+0

대신 'ssh'을 사용하십시오. http://superuser.com. –

+1

$ man netcat은 친구입니다 – EnabrenTane

+0

Linux에서 Windows로 작업하기가 쉽기 때문에 netcat을 선호합니다. 수퍼 유저를 모르는 미안합니다 – Meredith

답변

2

를 사용하여 오전 bajillion 다른 netcat가 밖으로 변형이있다. (오케이, 실제로는 아닐지도 모릅니다.) 각기 다른 기능을 가지고 있습니다.

우분투에서는 netcat-openbsd, netcat-traditional, netcat6을 설치할 수 있습니다. netcat은 단순히 update-alternatives [--display/--set] nc에 의해 관리되는 심볼릭 링크입니다.

netcat-openbsd은 Ubuntu 10.04에서 기본적으로 설치되고 기본값으로 설정되며 (libvirt-bin에 의해 직접 의존 됨) 옵션 집합은 다른 구현에서만 작동합니다. nc.traditional 또는 nc6을 사용하거나 (적절한 패키지를 설치 한 후) update-alternatives을 사용하여 기본값을 netcat으로 설정할 수 있습니다.

0
-p source_port 
     Specifies the source port nc should use, subject to privilege 
     restrictions and availability. It is an error to use this option 
     in conjunction with the -l option. 

NC -v -l 12345

1

당신은 당신이 포트 <PORT>에서 수신 대기해야 -p를 삭제합니다.

nc -vl <PORT>