English | Italiano
by InRete.com
Documentation
Setting -
Basic -
Firewall -
Local Domain -
------------------
Antispam Level ZERO -
Antispam Level ONE -
Antispam Level TWO -
Dante Community -
Phishing -
Antivirus -
------------------
RFC Answer -
Caronte Log -
Statistics -
Remote Admin -
Web G.U.I. -
Plug-In -
Internal Cron -
Mail X-Header -
------------------------------------
Quick Install -

Remote Admin


This particular module permits to open a “server service”, for the remote management of the entire configuration of Caronte Antispam.
Choosen a “LISTING” port on which the service will be sentient, a crypting key of the TCP/IP communication and mapped the ip allowed to the manage of the configuration, it's possible administrate Caronte Antispam from any pc allowed to do it.

The communication occurs by a proprietary protocol, real API of interface, an example of client of configuration is "Caronte Antispam PHP WEB Admin".

This module came from the need of make talk Caronte Antispam and the administrative management or automatic configuration procedures.

For example a provider would like to change, insert or delete, determined parameters inside Caronte Antispam for a determined domain and not only, when run other internal procedures or other mangement sofware.
This service permits the complete automation of business procedure or implemetation of all the management procedures.

The API comunication is made with crypted XML protocol instructions and coded in HEX, but relatively simply and intuitive to manage by a good programmer.

Let's make some examples, wanting to verify the login at administrator level, develope the XML file using the XOR for encrypt and decrypt the relative buffer in HEX , could be like this:

<caronte>
<h>
 <cmd>0100</cmd>
 <kmd5>58b4e38f66bcdb546380845d6af27187</kmd5>
 <c>2</c>
 <r>1</r>
</h>
<b>
 <r1>
 <c1>15160b0611</c1>
 <c2>1216171d1a0d54</c2>
 </r1>
</b>
</caronte>

The file is splitted in two families “HEADER” and “BODY” with the relative tags <h></h> and <b></b>.
The header is always clear to read, while the values of the BODY tags must be crypted.

Inside the header, the tag <cmd> encloses the type of API command to be send to the server.
In this case CR_QUERY_LOGIN = 0100

The encrypt key used for the datas in MD5 is the tag <kmd5>.
In this case MD5("qwerty1234") = 58b4e38f66bcdb546380845d6af27187
This particular tag is needed to block trasmissions where the crypt key is wrong or partially correct.
The server of "Remote Admin" interrupts immediately the trasmission, as all of us know the XOR is very easy to decrypt
if it's known part of the key. (enough truly little)

The number of colums for record is the <c> BODY tag
The number of records is the <r> BODY tag.

Now we have to create the body with USERID and PASSWORD
Using the XOR with relative key and bringing the buffer in HEX of the relative works.

<b>
  <r1>
   <c1>15160b0611</c1>
   <c2>1216171d1a0d54</c2>
 </r1>
</b>

Both the HEADER and the BODY after will be enclosed in the main tag of communication:
<caronte>….</caronte>

Obtained the file, this must be trasmitted on the service port of Caronte Antispam,
obtaining in answer the relative file which will have one of the follow answer enclosed in the TAG <e></e> :

  1. 0200 “ACK” simple
  2. 0200 “ACK” complex with record in the BODY
  3. 0401 “CR_ERROR_401” command not found
  4. 0501 “CR_ERROR_501” missing parameters in the sended command
  5. 0300 “CR_ERROR_300” syntax error.

An example of answer “ACK” simple:

<caronte>
 <h>
  <r>0</r>
  <c>0</c>
  <e>0200</e>
 </h>
</caronte>

“ACK” complex with record in the BODY:

<caronte>
 <h>
  <r>1</r>
  <c>2</c>
  <e>0200</e>
 </h>
 <b>
  <r1>
   <c1>alldomain.tld</c1>";
   <c2>1</c2>
  </r1>
 </b>
<caronte>

Or in case of error or failed operation CR_ERROR_501:
<caronte>
 <h>
  <r>0</r>
  <c>0</c>
  <e>0501</e>
 </h>
</caronte>

The order of the values to transmit in the communication is fundamental, for example in the column <c1> must be inserted the USERID
In the column <c2> the PASSWORD.

Inside Caronte Antispam there are some script classes that allow the manipulation of the datas as described.
The classes are:

WEB enviroment
- CaronteServerConn (opens the connection and allows to communicate with the service)
- CaronteRecordSet (manipulates the XML nodes in array form);

ADMIN enviroment
- CAdminRequest (contains the type of request made in the communication)
- CAdminResponse (allows to manipulate the respond)

Caronte Antispam processed the XML procedure tries to execute the relative script that is in the "/script/admin/" directory with the name of the procedure, for example "100.cs" that is the login procedure.
This mechanism creates a scenario of comunication very versatile and implementable from everyone.



Start project 10-10-2003 - Copyright 2000-2015 C&G Servizi Web s.rl. All rights reserved. VAT N. : 01404430470 .