2009-02-17 13:14:53 +00:00
|
|
|
<?
|
|
|
|
include_once(realpath(dirname(__FILE__). '/../../framework/common/curl.php'));
|
|
|
|
|
|
|
|
/** Etape de connexion
|
|
|
|
**/
|
|
|
|
$postData=array('action'=>'login',
|
|
|
|
'domain'=>'',
|
|
|
|
'login'=>'scoresdeci',
|
|
|
|
'pw'=>'catsysyo92',
|
|
|
|
);
|
|
|
|
$page=getUrl("http://www.online.net/administration/identification.html", '', $postData, '', false, '', '',0);
|
|
|
|
$cookies=$page['header']['Set-Cookie'];
|
|
|
|
|
|
|
|
/** Etape de liste de la zone S&D
|
|
|
|
**/
|
|
|
|
$postData=array('action'=>'select_domain',
|
|
|
|
'domain_id'=>'173991',
|
|
|
|
);
|
|
|
|
$page=getUrl("http://www.online.net/dns.pl", $cookies, $postData, 'http://www.online.net/dns.pl', false, '', '',0);
|
|
|
|
|
|
|
|
/** Suppression de la zone DNS **/
|
|
|
|
if (preg_match('/<form action="\/dns\.pl" method="POST">.*<input type="hidden" name="action" value="delete_entry">.*<input type="hidden" name="entry_id" value="(.*)">.*<input type="hidden" name="domain_id" value="173991">.*<tr>.*<td>ws2<\/td>.*<\/form>/Uis',$page['body'],$matches)) {
|
|
|
|
$postData=array('action'=>'delete_entry',
|
|
|
|
'entry_id'=>$matches[1],
|
|
|
|
'domain_id'=>'173991',
|
|
|
|
);
|
|
|
|
$page=getUrl("http://www.online.net/dns.pl", $cookies, $postData, 'http://www.online.net/dns.pl', false, '', '',0);
|
|
|
|
}
|
|
|
|
|
|
|
|
/** Ajout de la zone DNS **/
|
|
|
|
$postData=array('action'=>'add_entry',
|
|
|
|
'entry'=>'ws2',
|
|
|
|
'type'=>'A',
|
|
|
|
'priority'=>'',
|
|
|
|
'value'=>$_SERVER['REMOTE_ADDR'],
|
|
|
|
'domain_id'=>'173991',
|
|
|
|
);
|
|
|
|
$page=getUrl("http://www.online.net/dns.pl", $cookies, $postData, 'http://www.online.net/dns.pl', false, '', '',0);
|
|
|
|
|
|
|
|
die();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ($_REQUEST['orange']=='lk65gqsdg657g68sqgdg686d7g9q87g') {
|
|
|
|
$str="<?php
|
|
|
|
define('WEBSERVICE_URL', 'http://".$_SERVER['REMOTE_ADDR']."/ws/');
|
|
|
|
define('WEBSERVICE_URI', 'http://".$_SERVER['REMOTE_ADDR']."/');
|
|
|
|
?>";
|
|
|
|
|
|
|
|
//TODO : Fichier n'existe plus
|
2009-02-20 09:40:39 +00:00
|
|
|
$fp=fopen(realpath(dirname(__FILE__)) . '/../../config/serveur.orange.php', 'w');
|
2009-02-17 13:14:53 +00:00
|
|
|
fwrite($fp, $str);
|
|
|
|
fclose($fp);
|
|
|
|
}
|
|
|
|
?>
|