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.

listsuspended XML/JSON output but without authentication

Discussion in 'cPanel Developers' started by teh, Nov 20, 2009.

  1. teh

    teh Member

    Joined:
    Jul 13, 2008
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Hello,

    I need to get the output from listsuspended (JSON or XML - doesn't matter) but without authentication when called locally by root. I need to use the output in a script. Is there something that can do this or it'll be easier to just parse /var/cpanel/suspended/ in some way?
     
  2. MattDees

    MattDees cPanel Product Owner
    Staff Member

    Joined:
    Apr 29, 2005
    Messages:
    417
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    well, parsing /var/cpanel/suspended would probably be your easiest route for this, however I do have a script written for this.

    This requires that the server has /root/.accesshash setup (got to "Setup Remote Access Keys" in WHM to generate the file this uses)

    To use this script, run it f.ex. "./hash_query.pl /xml-api/listsuspended"

    and it should return the correct data.
     

    Attached Files:

Loading...

Share This Page