The Pirate Bay Searcher! [NOT WORKING NEED HELP]

By OrFeAsGr on Aug 21, 2016

So recently ThePirateBay started using Cloudfare to protect its self from DDOS attacks. The browser calculates the wanted response to verify that it's not trying to attack the server by overloading it. This calculation needs to use complex algorithms that are way over my level. So if you can help i'd appreciate it! I think the answer is somewhere in here:

 ;SAFhTWR.CunL-=+((!+[]+!![]+[])+(+!![]));SAFhTWR.CunL+=!+[]+!![]+!![]+!![];SAFhTWR.CunL-=+((!+[]+!![]+!![]+!![]+!![]+[])+(+[]));SAFhTWR.CunL+=+((!+[]+!![]+!![]+[])+(!+[]+!![]+!![]+!![]));SAFhTWR.CunL+=!+[]+!![]+!![]+!![]+!![];SAFhTWR.CunL+=+((!+[]+!![]+[])+(!+[]+!![]+!![]+!![]));SAFhTWR.CunL*=+((!+[]+!![]+!![]+!![]+[])+(!+[]+!![]+!![]));SAFhTWR.CunL-=+((!+[]+!![]+!![]+!![]+[])+(!+[]+!![]+!![]+!![]+!![]+!![]+!![]));SAFhTWR.CunL-=+((!+[]+!![]+[])+(+!![]));SAFhTWR.CunL+=+((+!![]+[])+(+!![]));a.value = parseInt(SAFhTWR.CunL, 10) + t.length; '; 121'

But i'm not sure and i can't make it!

Type !pbay search_query
The script will respond with the 1st 10 results of your search! The 1st result is messaged in the channel and the rest with a private notice!
|---Latest Update---|
v0.2 23 Aug 2016
So now when no results are found the bot will respond with the apropriate message!
And when The Pirate Bay is under maintenance the bot will make 3 attempts in a space of 30 seconds! Most of the times it works in the first "reload" but sometimes takes more :)
Have fun!

;:.:::The Pirate Bay Searcher v0.2::.;
;:.:::.::Script by OrFeAsGr::.:::.::::;
;::.: http://humanity.ucoz.com ::.::;
;::.: Do !pbay <search_query> ::.::;
:::.::::.::.::) Enjoy (:::...::::..::.:::;
;;;; http://hawkee.com/snippet/17241/ ;;;;

ON *:TEXT:!pbay *:#: {
  if (!%PBAYVERSION) || (%PBAYVERSION != v0.2) { set %PBAYVERSION v0.2 }
  if (!%pbay.cdown) {
    set %pbay.cdown 1
    set %pbay.squery $strip($2-)
    set %pbay.user $nick
    set %pbay.chan $chan
    sockopen -e pbay thepiratebay.org 443
  }
}

ON *:SOCKOPEN:pbay: {
  sockwrite -nt $sockname GET $+(/search,/,%pbay.squery,/0/99/200) HTTP/1.1
  sockwrite -nt $sockname Host: thepiratebay.org
  sockwrite $sockname $crlf
}

ON *:SOCKREAD:pbay: {
  var %readpbay
  sockread %readpbay
  ;echo -at %readpbay
  if (*Search Results:*No hits* iswm $gettok(%readpbay,1-,32)) { msg %pbay.chan No torrents found for your search query! Sorry ;( | sockclose $sockname | unset %pbay.* }
  if (*atabase maintenance,* iswm $gettok(%readpbay,1-,32)) { 
    inc %pbay.retries 1 
    if (%pbay.retries < 4) {
      msg %pbay.chan The Pirate Bay says: $gettok(%readpbay,1-,32) . $iif(%pbay.retries < 3, $calc(3 - $v1) Tries Left.., Last attempt..!) Next in: $iif(%pbay.retries == 1, 5, $iif(%pbay.tries == 2, 10, 15)) Seconds.. | sockclose $sockname | .timer 1 $iif(%pbay.retries == 1, 5, $iif(%pbay.retries == 2, 10, 15)) sockopen -e pbay thepiratebay.org 443
    }
    elseif (%pbay.retries == 4) {
      sockclose $sockname
      unset %pbay.* 
      msg $chan 3 Failed Attempts In 30 Seconds! The Pirate Bay is under maintenance! Please try again in a bit!
    }
  }
  if (*Displaying hits* iswm $gettok(%readpbay,1-,32)) {
    ;;; http://humanity.ucoz.com ;;;
    set %pbay.hits $calc($gettok($gettok($gettok(%readpbay,1-,32),2,40),2,32) - 1)
  }
  if (*div class="detName">* iswm $gettok(%readpbay,1-,32)) {
    inc %pbay.results 1
    $iif(%pbay.results == 1, msg %pbay.chan Sending $iif(%pbay.hits > 10, 10, $iif($calc(%pbay.hits - 1) > 0, $v1, %pbay.hits)) Out Of %pbay.hits Results: 0Top Result:, .timer 1 $calc(%pbay.results + 1) .notice %pbay.user $+($chr(03),00,$chr(02),$ord(%pbay.results) Result:,$chr(02)) $+($chr(03),12,$chr(02),$gettok($gettok($gettok(%readpbay,1-,32),4,34),3,47))) 0Link: $+(https://www.thepiratebay.org,$gettok($gettok(%readpbay,1-,32),4,34))
    if (%pbay.results == $iif(%pbay.hits > 10, 10, $iif($calc(%pbay.hits - 1) > 0, $v1, %pbay.hits))) {
      sockclose $sockname
      unset %pbay.*
    }
  }
} 

Comments

Sign in to comment.
OrFeAsGr   -  Oct 28, 2016

So recently ThePirateBay started using Cloudfare to protect its self from DDOS attacks. The browser calculates the wanted response to verify that it's not trying to attack the server by overloading it. This calculation needs to use complex algorithms that are way over my level. So if you can help i'd appreciate it! I think the answer is somewhere in here:

 ;SAFhTWR.CunL-=+((!+[]+!![]+[])+(+!![]));SAFhTWR.CunL+=!+[]+!![]+!![]+!![];SAFhTWR.CunL-=+((!+[]+!![]+!![]+!![]+!![]+[])+(+[]));SAFhTWR.CunL+=+((!+[]+!![]+!![]+[])+(!+[]+!![]+!![]+!![]));SAFhTWR.CunL+=!+[]+!![]+!![]+!![]+!![];SAFhTWR.CunL+=+((!+[]+!![]+[])+(!+[]+!![]+!![]+!![]));SAFhTWR.CunL*=+((!+[]+!![]+!![]+!![]+[])+(!+[]+!![]+!![]));SAFhTWR.CunL-=+((!+[]+!![]+!![]+!![]+[])+(!+[]+!![]+!![]+!![]+!![]+!![]+!![]));SAFhTWR.CunL-=+((!+[]+!![]+[])+(+!![]));SAFhTWR.CunL+=+((+!![]+[])+(+!![]));a.value = parseInt(SAFhTWR.CunL, 10) + t.length; '; 121'

But i'm not sure and i can't make it!
If you know how this works leave a comment and try to explain it so i can make this work.. so far i was able to just retrieve a part of the link i need to GET but not the answer that is needed to verify as a legit browser!
Thanks for any help in advance!

 Respond  
WiZaRD_   -  Aug 22, 2016

Dont work!!

OrFeAsGr  -  Aug 22, 2016

Out of rush i forgot to write lines to handle: 0 results and "Database maintenance" message of ThePirateBay.org !
So now when no results are found the bot will respond with the apropriate message!
And when The Pirate Bay is under maintenance the bot will make 3 attempts in a space of 30 seconds! Most of the times it works in the first "reload" but sometimes takes more :)
Let me know if something else isn't working! Have fun!

dma  -  Aug 23, 2016

is this working now?

dma  -  Aug 24, 2016

nothing is doing with this script.. im shocked at you.. normally your my man.. dunno what happen here

dma irc.axon.pw #irc

OrFeAsGr  -  Sep 03, 2016

@dma it works fine when i use it... if you didnt copy the newest script please do so and also do /unset %pbay.*
before retrying it!

OrFeAsGr  -  Sep 04, 2016

well.. as i discovered today there is a little bug somewhere in the code.. i will fix it and update it asap

Sign in to comment

Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.