AZZATSSINS_CYBERSERK

adf.ly bypasser

Oct 22nd, 2016
269
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.94 KB | None | 0 0
  1. <head><title>Adf.ly decoder</title></head>
  2. <body bgcolor=silver><u><i><b><h1>&copy; AZZATSSINS CYBERSERKERS</h1>
  3. </b></i></u><br>
  4. <?php
  5.  
  6. function request( $url ) {
  7.     $ua = 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1712.4 Safari/537.36';
  8.     if ( !preg_match( '/^[a-zA-Z0-9\/]+$/', $url ) )
  9.         return false;
  10.  
  11.     $ch = curl_init();
  12.     curl_setopt_array( $ch, array(
  13.         CURLOPT_FAILONERROR => true,
  14.         CURLOPT_FOLLOWLOCATION => false,
  15.         CURLOPT_RETURNTRANSFER => true,
  16.         CURLOPT_TIMEOUT => 10,
  17.         CURLOPT_USERAGENT => $ua,
  18.         CURLOPT_URL => 'http://adf.ly/' . $url
  19.     ) );
  20.     $data = curl_exec( $ch );
  21.     curl_close( $ch );
  22.  
  23.     if ( preg_match( "#var ysmm = '([a-zA-Z0-9+/=]+)'#", $data, $matches ) ) {
  24.         $final = $url = decode( $matches[1] );
  25.         // check for redirects
  26.         $ch = curl_init();
  27.         curl_setopt_array( $ch, array(
  28.             CURLOPT_FAILONERROR => true,
  29.             CURLOPT_FOLLOWLOCATION => true,
  30.             CURLOPT_RETURNTRANSFER => true,
  31.             CURLOPT_HEADER => true,
  32.             CURLOPT_NOBODY => true,
  33.             CURLOPT_TIMEOUT => 10,
  34.             CURLOPT_USERAGENT => $ua,
  35.             CURLOPT_URL => $url
  36.         ) );
  37.         $data = curl_exec( $ch );
  38.         if ( preg_match_all( '/Location:\s*(.+)\s*$/im', $data, $matches, PREG_SET_ORDER ) ) {
  39.             $last = array_pop( $matches );
  40.             $final = trim( $last[1] );
  41.         }
  42.  
  43.         return array( $url, $final );
  44.     }
  45.  
  46.     return false;
  47. }
  48.  
  49. function decode( $ysmm ) {
  50.     $left = '';
  51.     $right = '';
  52.     for ( $i = 0; $i < strlen( $ysmm ); $i++ ) {
  53.         if ( $i % 2 == 0 ) {
  54.             $left .= $ysmm[$i];
  55.         } else {
  56.             $right = $ysmm[$i] . $right;
  57.         }
  58.     }
  59.     return substr( base64_decode( $left . $right ), 2 );
  60. }
  61.  
  62. if ( isset( $_GET['url'] ) && $_GET['url'] ) {
  63.     // strip out beginning (everything up to last slash)
  64.     $stripped = '';
  65.     $slashes = explode( '/', $_GET['url'] );
  66.     $stripped = array_pop( $slashes );
  67.  
  68.     list( $url, $final ) = request( $stripped );
  69.     if ( $url ) {
  70.         echo '<p>Your URL is <a href="' . $url . '">' . $url . '</a>';
  71.         if ( $url != $final ) {
  72.             echo ' (<a href="' . $final . '">' . $final . '</a>)';
  73.         }
  74.         echo '</p>';
  75.     } else {
  76.         // try 2 parts
  77.         $stripped = array_pop( $slashes ) . '/' . $stripped;
  78.         list( $url, $final ) = request( $stripped );
  79.         if ( $url ) {
  80.             echo '<p>Your URL is <a href="' . $url . '">' . $url . '</a>';
  81.             if ( $url != $final ) {
  82.                 echo ' (<a href="' . $final . '">' . $final . '</a>)';
  83.             }
  84.             echo '</p>';
  85.         } else {
  86.             echo '<p>Adf.ly URL not found</p>';
  87.         }
  88.     }
  89. }
  90. ?>
  91. <form method="GET">
  92. Adf.ly URL to decode: <input type="text" name="url" /> <input type="submit" value="Go" />
  93. </form>
Add Comment
Please, Sign In to add comment