Home Linux Community Forums Hardware Networking remote ip with perl script tools

remote ip with perl script tools

Link to this post 27 Mar 11

Assalamualaikum war,wab.
hello brother..
last time i had coding new script perl
with this scropt we can remote computer with ip and port from Linux..
its usefull for me..
so chck these out

#!/usr/bin/perl -w
# connect and send commands to remote ip:port.
# the tor network is used for anonymity.
# usage: perl <ip> <port>
# Rizky Ariestiyansyah
# greetz : Devilzc0de . Indonesiancoder . IndonesianHacker . Id-backtrack

use strict;
use Net::SOCKS;

my ($sock, $conn, $pid);

# setup tor connection (defaults are used)
$sock = new Net::SOCKS
(socks_addr => '',
socks_port => 9050,
protocol_version => 4 ) || die "$!\n";

$conn = $sock->connect
(peer_addr => $ARGV[0],
peer_port => $ARGV[1]) || die "$!\n";

print "port $ARGV[1] is open\n";


$pid = fork();
if ($pid) {
while(<$conn>) {
print $_;
kill("TERM" => $pid)
} else {
print ">> ";
while(<STDIN>) {
print $conn "$_\n";

i hope this usefull for u,,
the tutor include in the script..

just run script with





:woohoo: :P

Who we are ?

The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.

More About the foundation...

Frequent Questions

Linux Training / Board