mirror of
https://github.com/hakasenyang/link-skipper
synced 2026-08-22 02:53:08 +09:00
Add files via upload
This commit is contained in:
@@ -0,0 +1,67 @@
|
||||
<?php
|
||||
/**
|
||||
* Redirect Bypass Function PHP
|
||||
* any.gs and sh.st source by https://github.com/starbuck93/handy-link-skipper/blob/master/index.php
|
||||
* adf.ly source by http://skizzerz.net/scripts/adfly.php
|
||||
* Other source by Hakase ( contact@hakase.kr / https://hakase.kr/ )
|
||||
*/
|
||||
class Redirect {
|
||||
private $httph = 'Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.116 Safari/537.36';
|
||||
public function __construct()
|
||||
{
|
||||
ob_start();
|
||||
}
|
||||
public function splits($data, $first, $end, $num = 1)
|
||||
{
|
||||
$temp = explode($first, $data);
|
||||
$temp = explode($end, $temp[$num]);
|
||||
$temp = $temp[0];
|
||||
return $temp;
|
||||
}
|
||||
public function WEBParsing($url, $cookie=NULL, $postparam=NULL, $otherheader=NULL)
|
||||
{
|
||||
$uri = parse_url($url);
|
||||
$paramType = strtoupper($paramType);
|
||||
if (!$uri['port']) $uri['port'] = 80;
|
||||
if (!$uri['path']) $uri['path'] = "/";
|
||||
$ch = curl_init();
|
||||
$opts = array(CURLOPT_RETURNTRANSFER => true,
|
||||
CURLOPT_URL => $url,
|
||||
CURLOPT_TIMEOUT => 10,
|
||||
CURLOPT_CONNECTTIMEOUT => 5,
|
||||
CURLOPT_SSL_VERIFYPEER => FALSE,
|
||||
CURLOPT_HEADER => 1,
|
||||
);
|
||||
curl_setopt_array($ch, $opts);
|
||||
if ($uri['host'] != 'sh.st') curl_setopt($ch, CURLOPT_USERAGENT, $this->httph);
|
||||
if ($otherheader) curl_setopt($ch, CURLOPT_HTTPHEADER, $otherheader);
|
||||
if ($cookie) curl_setopt($ch, CURLOPT_COOKIE, $cookie);
|
||||
if ($postparam)
|
||||
{
|
||||
curl_setopt($ch, CURLOPT_POST, 1);
|
||||
curl_setopt($ch, CURLOPT_POSTFIELDS, $postparam);
|
||||
}
|
||||
|
||||
$data = curl_exec($ch);
|
||||
curl_close($ch);
|
||||
return ($data) ? $data : false;
|
||||
}
|
||||
/**
|
||||
* [decode_adfly adf.ly decode URL]
|
||||
* @param [string] $ysmm [adf.ly ysmm data]
|
||||
* @return [string] [Original URL]
|
||||
* Source by http://skizzerz.net/scripts/adfly.php
|
||||
*/
|
||||
public function decode_adfly( $ysmm ) {
|
||||
$left = '';
|
||||
$right = '';
|
||||
for ( $i = 0; $i < strlen( $ysmm ); $i++ ) {
|
||||
if ( $i % 2 == 0 ) {
|
||||
$left .= $ysmm[$i];
|
||||
} else {
|
||||
$right = $ysmm[$i] . $right;
|
||||
}
|
||||
}
|
||||
return substr( base64_decode( $left . $right ), 2 );
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
<?php
|
||||
/**
|
||||
* Redirect Bypass PHP
|
||||
* any.gs and sh.st source by https://github.com/starbuck93/handy-link-skipper/blob/master/index.php
|
||||
* adf.ly source by http://skizzerz.net/scripts/adfly.php
|
||||
* Other source by Hakase ( contact@hakase.kr / https://hakase.kr/ )
|
||||
*/
|
||||
include_once '_function.php';
|
||||
$aa = new Redirect();
|
||||
$url = $_GET['url'];
|
||||
if($url) {
|
||||
$urls = parse_url($url);
|
||||
switch($urls['host'])
|
||||
{
|
||||
case 'goo.gl':
|
||||
case 'me2.do':
|
||||
case 'tinyurl.com':
|
||||
case 'bit.ly':
|
||||
$data = $aa->splits($aa->WEBParsing($url), 'Location: ', PHP_EOL);
|
||||
break;
|
||||
case 'durl.kr':
|
||||
$data = $aa->splits($aa->WEBParsing($url), '<h2><a href="', '" id="titleArea"');
|
||||
break;
|
||||
//any.gs and sh.st source by https://github.com/starbuck93/handy-link-skipper/blob/master/index.php
|
||||
case 'www.any.gs':
|
||||
case 'any.gs':
|
||||
$data = substr($url, strpos($url,"url/")+4);
|
||||
break;
|
||||
case 'sh.st':
|
||||
$data = $aa->WEBParsing($url);
|
||||
$data = $aa->splits($data, '<title>Redirecting to ', '</title>');
|
||||
break;
|
||||
// adf.ly source by http://skizzerz.net/scripts/adfly.php
|
||||
case 'adf.ly':
|
||||
$data = $aa->WEBParsing($url);
|
||||
if ( preg_match( "#var ysmm = '([a-zA-Z0-9+/=]+)'#", $data, $matches ) ) {
|
||||
$data = $final = $url = $aa->decode_adfly( $matches[1] );
|
||||
//echo $final;
|
||||
/*$data = $aa->WEBParsing($url);
|
||||
if ( preg_match_all( '/Location:\s*(.+)\s*$/im', $data, $matches, PREG_SET_ORDER ) ) {
|
||||
$last = array_pop( $matches );
|
||||
$final = trim( $last[1] );
|
||||
}*/
|
||||
}
|
||||
break;
|
||||
case 'adfoc.us':
|
||||
$data = $aa->WEBParsing($url, NULL, NULL, array('Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8'));
|
||||
$data = $aa->splits($data, 'var click_url = "', '";');
|
||||
break;
|
||||
case 'bc.vc':
|
||||
$data = $aa->WEBParsing($url);
|
||||
$aid = $aa->splits($data, '{aid:', ',');
|
||||
$lid = $aa->splits($data, ',lid:', ',');
|
||||
if(!$aid || !$lid) { unset($data); break; }
|
||||
$data = $aa->WEBParsing('http://bc.vc/fly/ajax.fly.php', NULL, 'opt=check_log&args%5Baid%5D='.$aid.'&args%5Blid%5D='.$lid, array('Referer: http://bc.vc/', 'X-Requested-With: XMLHttpRequest'));
|
||||
$cookie1 = $aa->splits($data, 'Set-Cookie: SITE_view_', PHP_EOL, 1);
|
||||
$cookie2 = $aa->splits($data, 'Set-Cookie: SITE_view_', PHP_EOL, 2);
|
||||
if(!$cookie1 || !$cookie2) { unset($data); break; }
|
||||
$cookie = 'SITE_view_'.$cookie1.';SITE_view_'.$cookie2.';';
|
||||
$data = $aa->WEBParsing('http://bc.vc/fly/ajax.fly.php', $cookie, 'opt=checks_log&args%5Baid%5D='.$aid.'&args%5Blid%5D='.$lid, array('Referer: http://bc.vc/', 'X-Requested-With: XMLHttpRequest'));
|
||||
$cookie = $cookie . 'PHPSESSID=' . $aa->splits($data, 'Set-Cookie: PHPSESSID=', ';') . ';';
|
||||
$data = $aa->WEBParsing('http://bc.vc/fly/ajax.fly.php', $cookie, 'opt=check_log&args%5Baid%5D='.$aid.'&args%5Blid%5D='.$lid, array('Referer: http://bc.vc/', 'X-Requested-With: XMLHttpRequest'));
|
||||
sleep(5); // server check time
|
||||
$data = $aa->WEBParsing('http://bc.vc/fly/ajax.fly.php', $cookie, 'opt=make_log&args%5Baid%5D='.$aid.'&args%5Blid%5D='.$lid, array('Referer: http://bc.vc/', 'X-Requested-With: XMLHttpRequest'));
|
||||
$data = json_decode('{'.$aa->splits($data, '{"error":false,"message":{', '}}').'}',true)['url'];
|
||||
break;
|
||||
default:
|
||||
echo 'Not supported. (E-mail: contact@hakase.kr)';
|
||||
break;
|
||||
}
|
||||
if($data) echo $data; else echo 'Error';
|
||||
exit;
|
||||
}
|
||||
?>
|
||||
<p>For example: <br>
|
||||
<a href='?url=<?php echo urlencode('http://me2.do/G4AB9cJL');?>'>http://me2.do/G4AB9cJL</a><br>
|
||||
<a href='?url=<?php echo urlencode('https://goo.gl/AIScrC');?>'>https://goo.gl/AIScrC</a><br>
|
||||
<a href='?url=<?php echo urlencode('http://bit.ly/29O1WJt');?>'>http://bit.ly/29O1WJt</a><br>
|
||||
<a href='?url=<?php echo urlencode('http://durl.kr/cpubjn');?>'>http://durl.kr/cpubjn</a></p>
|
||||
<p>How to use? : ?url=URL<br>
|
||||
Supported URL : me2.do / goo.gl / tinyurl.com / me2.do / durl.kr / adf.ly / sh.st / adfoc.us / bc.vc (wait for 5 seconds)</p>
|
||||
Reference in New Issue
Block a user