From 2db30e7ab548bb85f76be066e892190cec459a0f Mon Sep 17 00:00:00 2001 From: hakasenyang Date: Wed, 21 Sep 2016 03:47:56 +0900 Subject: [PATCH] Add files via upload --- _function.php | 67 ++++++++++++++++++++++++++++++++++++++++++ index.php | 81 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 148 insertions(+) create mode 100644 _function.php create mode 100644 index.php diff --git a/_function.php b/_function.php new file mode 100644 index 0000000..fedbdba --- /dev/null +++ b/_function.php @@ -0,0 +1,67 @@ + 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 ); + } + } \ No newline at end of file diff --git a/index.php b/index.php new file mode 100644 index 0000000..32f5b5f --- /dev/null +++ b/index.php @@ -0,0 +1,81 @@ +splits($aa->WEBParsing($url), 'Location: ', PHP_EOL); + break; + case 'durl.kr': + $data = $aa->splits($aa->WEBParsing($url), '

WEBParsing($url); + $data = $aa->splits($data, 'Redirecting to ', ''); + 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; + } +?> +

For example:
+
'>http://me2.do/G4AB9cJL
+'>https://goo.gl/AIScrC
+'>http://bit.ly/29O1WJt
+'>http://durl.kr/cpubjn

+

How to use? : ?url=URL
+Supported URL : me2.do / goo.gl / tinyurl.com / me2.do / durl.kr / adf.ly / sh.st / adfoc.us / bc.vc (wait for 5 seconds)