The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Another New Script for you cPanel guys!

Discussion in 'General Discussion' started by shaun, Sep 1, 2003.

  1. shaun

    shaun Well-Known Member

    Joined:
    Nov 9, 2001
    Messages:
    698
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    San Clemente, Ca
    Script is called portwatch go read about it on the site.

    Future version may run in background and auto block abusers or email you.

    Give me some feedback about these too, bugs, suggestions, etc. feedback@cplicensing.net


    cplicensing.net/extras/scripts.php

    cPanel.net Support Ticket Number:
     
  2. JPmorgan

    JPmorgan BANNED

    Joined:
    Aug 19, 2003
    Messages:
    93
    Likes Received:
    0
    Trophy Points:
    6
    How do we run it? Cron? One time? Can you please give us instructions? If it needs to run in the background how do we start the pgms and where should they reside.

    Thanks

    cPanel.net Support Ticket Number:
     
  3. bmcpanel

    bmcpanel Well-Known Member

    Joined:
    Jun 1, 2002
    Messages:
    546
    Likes Received:
    0
    Trophy Points:
    16
    Dude, thanks for the scripts!

    cPanel.net Support Ticket Number:
     
  4. shaun

    shaun Well-Known Member

    Joined:
    Nov 9, 2001
    Messages:
    698
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    San Clemente, Ca
    download the script some where.

    chmod 700 portwatch
    ./portwatch <port>


    so if you wanted to see connections to apache, you'd run ./portwatch 80

    cPanel.net Support Ticket Number:
     
  5. casey

    casey Well-Known Member

    Joined:
    Jan 17, 2003
    Messages:
    2,303
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    If there is trouble, it will find me
    You're very generous. Thank you.

    cPanel.net Support Ticket Number:
     
  6. B12Org

    B12Org Well-Known Member

    Joined:
    Jul 15, 2003
    Messages:
    692
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Seattle Washington
    cPanel Access Level:
    Root Administrator
    I get nothing but errors, commands not found, and what not.

    cPanel.net Support Ticket Number:
     
  7. dgbaker

    dgbaker Well-Known Member
    PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,578
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Toronto, Ontario Canada
    cPanel Access Level:
    DataCenter Provider
    Not to imply anything, but you didn't just copy the link from the post did you? :D Hopefully you went to that page and then got the link? :D

    cPanel.net Support Ticket Number:
     
  8. B12Org

    B12Org Well-Known Member

    Joined:
    Jul 15, 2003
    Messages:
    692
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Seattle Washington
    cPanel Access Level:
    Root Administrator
    I went to the page, clicked on the link, opened the script, and then copied and pasted the content of the script into a file on the server.

    cPanel.net Support Ticket Number:
     
  9. dgbaker

    dgbaker Well-Known Member
    PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,578
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Toronto, Ontario Canada
    cPanel Access Level:
    DataCenter Provider
    What are some of the errors it is throwing?

    cPanel.net Support Ticket Number:
     
  10. B12Org

    B12Org Well-Known Member

    Joined:
    Jul 15, 2003
    Messages:
    692
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Seattle Washington
    cPanel Access Level:
    Root Administrator
    Here are three examples, from 3 different scripts from them.

    print: command not found
    line 9: syntax error near unexpected token `while(@USERS=getpwent()){'
    line 9: `while(@USERS=getpwent()){'


    ./portwatch: line 1: syntax error near unexpected token `Copyright(c'
    ./portwatch: line 1: `censing.net - scripts Copyright(c) 2003 cPlicensing.net.'


    ./checkaccts: use: command not found
    ./checkaccts: $: command not found
    ./checkaccts: ++: command not found
    ./checkaccts: {REMOTE_USER}: command not found
    ./checkaccts: =: command not found
    ./checkaccts: =: command not found
    ./checkaccts: line 9: syntax error near unexpected token `{'
    ./checkaccts: line 9: `if (!-e "/usr/local/cpanel") {'

    cPanel.net Support Ticket Number:
     
  11. shaun

    shaun Well-Known Member

    Joined:
    Nov 9, 2001
    Messages:
    698
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    San Clemente, Ca
    which script are you running. It looks as if your trying to execute a perl script as a sh/bash. make sure the scripts first line is #!/usr/bin/perl

    cPanel.net Support Ticket Number:
     
  12. B12Org

    B12Org Well-Known Member

    Joined:
    Jul 15, 2003
    Messages:
    692
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Seattle Washington
    cPanel Access Level:
    Root Administrator
    Ok, I was missing a character in two of them (bad copy on my part I guess) but I am still getting an error with one of them,

    "use" not allowed in expression at ./cleanbackups line 8, at end of line
    syntax error at ./cleanbackups line 8, near "scripts
    #
    # support@cPlicensing.net
    # Unauthorized copying is prohibited
    #Version: 0.01

    use POSIX"
    Execution of ./cleanbackups aborted due to compilation errors.

    cPanel.net Support Ticket Number:
     
  13. shaun

    shaun Well-Known Member

    Joined:
    Nov 9, 2001
    Messages:
    698
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    San Clemente, Ca
  14. B12Org

    B12Org Well-Known Member

    Joined:
    Jul 15, 2003
    Messages:
    692
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Seattle Washington
    cPanel Access Level:
    Root Administrator
    Thanks, that works great! I dont know what I was doing wrong, but it works now, so thanks!

    cPanel.net Support Ticket Number:
     
  15. isputra

    isputra Well-Known Member

    Joined:
    May 3, 2003
    Messages:
    576
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Mbelitar
    Hi Shaun,

    I use your chkformmailver and still untill now i don't know what's wrong because i only receive email warning without direction where are the formmail location.

    I run it thru ssh as root and i only have :
    "Starting Search, this will take a while ... Complete

    When i check my email :
    "The following files are old vulnerable versions of matts formmail. These scripts allow spammers to spam thru these scripts inturn making your server a open relay. They should be upgraded immediatly!!!"

    Here are my configuration :
    ------------
    #!/usr/bin/perl
    # cPlicensing.net - scripts Copyright(c) 2003 cPlicensing.net.
    # All rights Reserved.
    # support@cPlicensing.net http://cPlicensing.net
    # Unauthorized copying is prohibited
    #Version: 0.01

    use POSIX;
    use File::Find::Rule;

    $outputresults = '1'; #Output Results to STDOUT?
    $emailresults = '1'; #Email the Results
    $disablevulnscripts = '0'; #Careful with this one, i havnt tested the regex that much

    $searchpath = '/home'; #path to start search (recursive)
    $admin_email = 'admin@mydomain.com'; #Enter Your E-Mail Address
    -------------

    Please help me:confused:

    cPanel.net Support Ticket Number:

    cPanel.net Support Ticket Number:
     
  16. WeMasterz5

    WeMasterz5 Well-Known Member

    Joined:
    Feb 24, 2003
    Messages:
    361
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Miami
    question on the portwatch

    works fine, no problem there, just dont really know what I am looking at with the output

    (ie)
    a list of ips like this is listed
    TCP!!!12.243.xx.69:1
    TCP!!!142.176.xx.236:2

    so what is this exactly showing me?

    cPanel.net Support Ticket Number:
     
  17. B12Org

    B12Org Well-Known Member

    Joined:
    Jul 15, 2003
    Messages:
    692
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Seattle Washington
    cPanel Access Level:
    Root Administrator
    The protocol being used, the IP address, and how many connections

    cPanel.net Support Ticket Number:
     
  18. WeMasterz5

    WeMasterz5 Well-Known Member

    Joined:
    Feb 24, 2003
    Messages:
    361
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Miami
    yeah I got that much. thanks for the reply....info needed is what do I do with this info, how do I determine if something is amiss

    Thanks

    cPanel.net Support Ticket Number:
     
  19. B12Org

    B12Org Well-Known Member

    Joined:
    Jul 15, 2003
    Messages:
    692
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Seattle Washington
    cPanel Access Level:
    Root Administrator
    If some one has too many connections to the server, or you can use it on different ports other than 80 to see if any one is connecting somewhere they should not be . . .

    cPanel.net Support Ticket Number:
     
Loading...

Share This Page