best view in 720p full screen.
Hacking Programming Coding Security.
$file_location = '';
if (isset($this->gw_this['vars']['_files']['file_location']))
{
$file_location = $this->gw_this['vars']['_files']['file_location'];
}
/* */
if (!empty($file_location))
{
$avatar_file = isset($file_location['tmp_name']) ? $file_location['tmp_name'] : '';
if ( $avatar_file ) {
$ar_img_size = getimagesize($avatar_file);
$file_target = urlencode($this->sys['time_now'].'_'.$file_location['name']);
/* Create directory */
$this->oFunc->file_put_contents($this->sys['path_temporary'].'/a/'.$file_target, '');
if (is_uploaded_file($avatar_file)
&& move_uploaded_file($avatar_file, $this->sys['path_temporary'].'/a/'.$file_target)
)
{
$file_target = urlencode($this->sys['time_now'].'_'.$file_location['name']);
move_uploaded_file($avatar_file, $this->sys['path_temporary'].'/a/'.$file_target)
$sys['path_temporary'] = 'gw_temp';
$data = array("red", "green", "blue");
echo "Array has " . sizeof($data) . " elements"; // มี 3 ค่าใน array
// Output : Array has 3 elements
2. array_values($arr)
$data = array("hero" => "Holmes", "villain" => "Moriarty");
print_r(array_values($data));// คืนค่าเฉพาะ value
/* Output :
Array
(
[0] => Holmes
[1] => Moriarty
)*/
3. array_key($arr)
$data = array("hero" => "Holmes", "villain" => "Moriarty");
print_r(array_values($data)); // คืนค่าเฉพาะ key
/* Output :
Array
(
[0] => hero
[1] => villain
)*/
4. array_pop($arr)
$data = array("Donald", "Jim", "Tom");
array_pop($data); // Tom ถูกถอดออก
print_r($data);
/* Output :
Array
(
[0] => Donald
[1] => Jim
)*/
5. array_push($arr,$val)
$data = array("Donald", "Jim", "Tom");
array_push($data, "Harry"); // เพิ่ม Harry ลงใน array $data
print_r($data);
/* Output :
Array
(
[0] => Donald
[1] => Jim
[2] => Tom
[3] => Harry
)*/
6. array_shift($arr,$val)
$data = array("Donald", "Jim", "Tom");
array_shift($data); // Donald ซึ่งเป็น $data[0] จะถูกถอดออกไป
print_r($data);
/* Output :
Array
(
[0] => Jim
[1] => Tom
)*/
7. array_unshift($arr, $val)
$data = array("Donald", "Jim", "Tom");
array_unshift($data, "Sarah"); // Sarah ถูกเพิ่มเข้ามาเป็น $data[0]
print_r($data);
/* Output :
Array
(
[0] => Sarah
[1] => Donald
[2] => Jim
[3] => Tom
)*/
8. each($arr)
$data = array("hero" => "Holmes", "villain" => "Moriarty");
while (list($key, $value) = each($data)) {
echo "$key: $value \n";
}
/* Output :
hero: Holmes
villain: Moriarty*/
9. sort($arr)
$data = array("g", "t", "a", "s");
sort($data); // เรียงลำดับ a-z
print_r($data);
/* Output :
Array
(
[0] => a
[1] => g
[2] => s
[3] => t
)*/
10. array_flip($arr)
$data = array("a" => "apple", "b" => "ball");
print_r(array_flip($data)); // สลับค่ากัน
/* Output :
Array
(
[apple] => a
[ball] => b
)*/
11. array_reverse($arr)
$data = array(10, 20, 25, 60); print_r(array_reverse($data)); // เรียงจากหลังไปหน้า /* Output : Array ( [0] => 60 [1] => 25 [2] => 20 [3] => 10 )*/12. array_merge($arr)
$data1 = array("cat", "goat");
$data2 = array("dog", "cow");
print_r(array_merge($data1, $data2)); // รวม 2 อาร์เรย์เข้าด้วยกัน
/* Output :
Array
(
[0] => cat
[1] => goat
[2] => dog
[3] => cow
)*/
13. array_rand($arr)
$data = array("white", "black", "red");
echo "Today's color is " . $data[array_rand($data)]; //สุ่มค่า
/* Output :
Today's color is red*/
14. array_search($search, $arr)
$data = array("blue" => "#0000cc", "black" => "#000000", "green" => "#00ff00");
echo "Found " . array_search("#0000cc", $data); // ค้นหา
/* Output :
Found blue*/
15. array_slice($arr, $offset, $length)
$data = array("vanilla", "strawberry", "mango", "peaches");
print_r(array_slice($data, 1, 2)); // แบ่งแยกค่า
/* Output :
Array
(
[0] => strawberry
[1] => mango
)*/
16. array_unique($data)
$data = array(1,1,4,6,7,4); print_r(array_unique($data)); // เอาค่าซ้ำออก (1,4) /* Output : Array ( [0] => 1 [3] => 6 [4] => 7 [5] => 4 )*/17. array_walk($arr, $func)
function reduceBy10(&$val, $key) {
$val -= $val * 0.1;
}
$data = array(10,20,30,40);
array_walk($data, 'reduceBy10'); // ส่งฟังก์ชั่น reduceBy10 เข้าไปกระทำกับทุก elements ใน array
print_r($data);
/* Output :
Array
(
[0] => 9
[1] => 18
[2] => 27
[3] => 36
)*/
แก้ปัญหา line บน linux ที่ line อัพเดทเวอร์ชั่นใหม่นะ เข้าไปที่ common.css แล้วลบ unicode-range:....; พวกนี้ออกให้หมด
use File::Find;
print "\n\n\t### Search String in Files on Directory and Subdirectory By ICheer_No0M ###\n\n";
print 'Path File : ';
chomp($path=<stdin>);
print 'Search Keyword : ';
chomp($string=<stdin>);
$keyword = AddSlashes($string);
find(\&file_names, $path);
sub file_names {
if($_ =~ /\.php$/){
$file = $File::Find::name;
open (MYFILE, $file);
$line = 1;
while (<MYFILE>) {
$content .= $_;
if($content=~/$keyword/){
print "\nFound : $string\n";
print "On Line : $line\n";
print "On File : $file\n";
}
$line += 1;
$content = "";
}
close (MYFILE);
}
}
print "\n\n\t### Finding $string on $path Complete... ###\n\n";
sub AddSlashes {
$text = $_[0];
$text =~ s/\\/\\\\/g;
$text =~ s/\$/\\\$/g;
$text =~ s/\'/\\'/g;
$text =~ s/\"/\\\"/g;
$text =~ s/\[/\\[/g;
$text =~ s/\]/\\\]/g;
$text =~ s/\(/\\(/g;
$text =~ s/\)/\\\)/g;
$text =~ s/\\0/\\\\0/g;
return $text;
}
$ find /var/www/exploit -name "*.php" -exec grep -l "base64" {} \;
# Exploit Title: MobileCartly 1.0 Remote File Upload Vulnerability
# Google Dork: -
# Date: 14/08/2012
# Exploit Author: ICheer_No0M
# Vendor Homepage: http://icheernoom.blogspot.com/
# Software Link: http://mobilecartly.com/mobilecartly.zip
# Version: 1.0
# Tested on: Ubuntu 10.10 + PHP 5.3.3
#
#
# 1. Vuln Code : /images/uploadprocess.php
#
# /*$zip = new ZipArchive;
# $zip->open($_FILES['uploadedfile']['tmp_name']);
# $zip->extractTo('productimages/');
# $zip->close(); */
#
# You can upload shell.php on /images/upload.php
# Find your shell on /images/productimages/shell.php
#
#
# 2. Vuln Code : /includes/logo-upload-process.php
#
# /*if (($_FILES["logo-upload"]["type"] == "image/gif")
# || ($_FILES["logo-upload"]["type"] == "image/jpeg")
# || ($_FILES["logo-upload"]["type"] == "image/pjpeg")
# && ($_FILES["logo-upload"]["size"] < 20000))*/
#
# You can upload shell on /includes/upload-logo.php and edit header values.
# Find your shell on /images/logo/shell.php
#
#