Página 1 de 3

How to bypass http://swzz.xyz

Publicado: 30 Jul 2015, 22:15
por zanzibar1982
Hola todos,

I am trying to bypass the service swzz.xyz above, used by cb01.eu to protect the links to the videos,

but linkdecrypter can't translate the links.

I am trying to resolve links from this link as example http://www.cb01.eu/kristy-hd-3d-2015/

Suggestions?

Thanks in advance.

Re: How to bypass http://swzz.xyz

Publicado: 31 Jul 2015, 12:30
por zanzibar1982
I could not sleep on that. :?

In page http://www.cb01.eu/kristy-hd-3d-2015/ we have for nowvideo http://swzz.xyz/link/Y6QV1/

that actually contains this string:

Código: Seleccionar todo

eval(function(p,a,c,k,e,d){e=function(c){return c};if(!''.replace(/^/,String)){while(c--){d[c]=k[c]||c}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('2 1="0://3.4.6/5/7";',8,8,'http|link|var|www|nowvideo|video|li|3610bbd982982'.split('|'),0,{}))

So it should not be difficult to generate a link to the movie page (not at all if you are robalo :) ).

"Findvideos" action takes place in first link posted here; we need to insert an "if" case for it, so that

if there's an url page starting with "http://swzz.xyz/link" then it has to go to above code string, and extract

"www|nowvideo|video|li|3610bbd982982" and re-format as http://www.nowvideo.li/video/3610bbd982982,

and then pass generated new url to "findvideos".

And that is just for nowvideo links! :lol:

Because for another host which pelisalacarta has a server for, like streamin.to, for the same movie we have this link,

http://swzz.xyz/link/Y8lnZ/ which contains the string:

Código: Seleccionar todo

eval(function(p,a,c,k,e,d){e=function(c){return c};if(!''.replace(/^/,String)){while(c--){d[c]=k[c]||c}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('1 0="2://3.4/5";',6,6,'link|var|http|streamin|to|jf3rf09eqnzj'.split('|'),0,{}))

so http|streamin|to|jf3rf09eqnzj should become http://www.streamin.to/jf3rf09eqnzj

the operation to extract the two links must be different for each one of them.

Re: How to bypass http://swzz.xyz

Publicado: 31 Jul 2015, 14:32
por robalo
Te pego algo con lo que trabajar :)

Código: Seleccionar todo

def findvideos( item ):
    logger.info( "[cineblog01.py] findvideos" )

    itemlist = []

    ## Descarga la página
    data = scrapertools.cache_page( item.url )
    data = scrapertools.decodeHtmlentities( data ).replace( 'http://cineblog01.pw', 'http://k4pp4.pw' )

    ## Extrae las entradas

    streaming = scrapertools.find_single_match( data, '<strong>Streaming:</strong>(.*?)<table height="30">' )
    patron = '<td><a href="([^"]+)" target="_blank">([^<]+)</a></td>'
    matches = re.compile( patron, re.DOTALL ).findall( streaming )
    for scrapedurl, scrapedtitle in matches:
        print "##### findvideos Streaming ## %s ## %s ##" % ( scrapedurl, scrapedtitle )
        title = "[COLOR green]Streaming:[/COLOR] " + item.title + " [COLOR blue][" + scrapedtitle + "][/COLOR]"
        itemlist.append( Item( channel=__channel__, action="play", title=title, url=scrapedurl, folder=False ) )

    download = scrapertools.find_single_match( data, '<strong>Download:</strong>(.*?)<table height="30">' )
    patron = '<td><a href="([^"]+)" target="_blank">([^<]+)</a></td>'
    matches = re.compile( patron, re.DOTALL ).findall( download )
    for scrapedurl, scrapedtitle in matches:
        print "##### findvideos Download ## %s ## %s ##" % ( scrapedurl, scrapedtitle )
        title = "[COLOR green]Download:[/COLOR] " + item.title + " [COLOR blue][" + scrapedtitle + "][/COLOR]"
        itemlist.append( Item( channel=__channel__, action="play", title=title, url=scrapedurl, folder=False ) )

    download_hd = scrapertools.find_single_match( data, '<strong>Download HD[^<]+</strong>(.*?)<table width="100%" height="20">' )
    patron = '<td><a href="([^"]+)" target="_blank">([^<]+)</a></td>'
    matches = re.compile( patron, re.DOTALL ).findall( download_hd )
    for scrapedurl, scrapedtitle in matches:
        print "##### findvideos Download HD ## %s ## %s ##" % ( scrapedurl, scrapedtitle )
        title = "[COLOR green]Download HD:[/COLOR] " + item.title + " [COLOR blue][" + scrapedtitle + "][/COLOR]"
        itemlist.append( Item( channel=__channel__, action="play", title=title, url=scrapedurl, folder=False ) )

    return itemlist

def play( item ):
    logger.info( "[cineblog01.py] play" )

    data = scrapertools.cache_page( item.url )

    print "##############################################################"
    if "go.php" in item.url:
        data = scrapertools.get_match( data, 'window.location.href = "([^"]+)";' )
        print "##### play go.php data ##\n%s\n##" % data
    elif "/link/" in item.url:
        from lib.jsbeautifier.unpackers import packer
        data = scrapertools.get_match( data, "(eval.function.p,a,c,k,e,.*?)</script>" )
        data = packer.unpack( data )
        print "##### play /link/ unpack ##\n%s\n##" % data
        data = scrapertools.get_match( data, 'var link="([^"]+)";' )
        print "##### play /link/ data ##\n%s\n##" % data
    else:
        data = item.url
        print "##### play else data ##\n%s\n##" % data
    print "##############################################################"

    itemlist = servertools.find_video_items( data=data )

    for videoitem in itemlist:
        videoitem.title = item.show
        videoitem.fulltitle = item.fulltitle
        videoitem.thumbnail = item.thumbnail
        videoitem.channel = __channel__

    return itemlist    
Si no te gusta el tema de los 'print "##..' los borras. Yo prefiero eso a activar el log detallado

Re: How to bypass http://swzz.xyz

Publicado: 31 Jul 2015, 16:24
por zanzibar1982
okay,

here is the log for the findvideos item above.

This regards same movie as example in first post, choosing nowvideo.

Good news is that I see your script translates perfectly the link to the video, :)

that is equal to magic to me :D

the only error I see is at the end "NameError: global name 'servertools' is not defined"

Código: Seleccionar todo

17:20:31 T:1980  NOTICE: -->Python Interpreter Initialized<--
17:20:31 T:1980  NOTICE: PLATFORM_NAME=xbmcgotham
17:20:31 T:1980  NOTICE: [config.py] xbmcgotham config
17:20:31 T:1980  NOTICE: [config.py] runtime path = C:\Users\Barracuda\AppData\Roaming\Kodi\addons\plugin.video.pelisalacarta
17:20:31 T:1980  NOTICE: [config.py] data path = C:\Users\Barracuda\AppData\Roaming\Kodi\userdata\addon_data\plugin.video.pelisalacarta\
17:20:31 T:1980  NOTICE: [config.py] temp path = C:\Users\Barracuda\AppData\Roaming\Kodi\cache\test
17:20:31 T:5300  NOTICE: Thread FileCache start, auto delete: false
17:20:32 T:3396  NOTICE: Thread BackgroundLoader start, auto delete: false
17:20:32 T:2020  NOTICE: Thread JobWorker start, auto delete: true
17:20:32 T:8188  NOTICE: Thread FileCache start, auto delete: false
17:20:33 T:5440  NOTICE: Thread LanguageInvoker start, auto delete: false
17:20:33 T:5440  NOTICE: -->Python Interpreter Initialized<--
17:20:33 T:5440  NOTICE: PLATFORM_NAME=xbmcgotham
17:20:33 T:5440  NOTICE: [config.py] xbmcgotham config
17:20:33 T:5440  NOTICE: [config.py] runtime path = C:\Users\Barracuda\AppData\Roaming\Kodi\addons\plugin.video.pelisalacarta
17:20:33 T:5440  NOTICE: [config.py] data path = C:\Users\Barracuda\AppData\Roaming\Kodi\userdata\addon_data\plugin.video.pelisalacarta\
17:20:33 T:5440  NOTICE: [config.py] temp path = C:\Users\Barracuda\AppData\Roaming\Kodi\cache\test
17:20:33 T:5076  NOTICE: Thread BackgroundLoader start, auto delete: false
17:20:33 T:8676  NOTICE: Thread LanguageInvoker start, auto delete: false
17:20:33 T:8676  NOTICE: -->Python Interpreter Initialized<--
17:20:33 T:8676  NOTICE: PLATFORM_NAME=xbmcgotham
17:20:33 T:8676  NOTICE: [config.py] xbmcgotham config
17:20:33 T:8676  NOTICE: [config.py] runtime path = C:\Users\Barracuda\AppData\Roaming\Kodi\addons\plugin.video.pelisalacarta
17:20:33 T:8676  NOTICE: [config.py] data path = C:\Users\Barracuda\AppData\Roaming\Kodi\userdata\addon_data\plugin.video.pelisalacarta\
17:20:33 T:8676  NOTICE: [config.py] temp path = C:\Users\Barracuda\AppData\Roaming\Kodi\cache\test
17:20:33 T:7752  NOTICE: Thread BackgroundLoader start, auto delete: false
17:20:34 T:6892  NOTICE: Thread LanguageInvoker start, auto delete: false
17:20:34 T:6892  NOTICE: -->Python Interpreter Initialized<--
17:20:34 T:6892  NOTICE: PLATFORM_NAME=xbmcgotham
17:20:34 T:6892  NOTICE: [config.py] xbmcgotham config
17:20:34 T:6892  NOTICE: [config.py] runtime path = C:\Users\Barracuda\AppData\Roaming\Kodi\addons\plugin.video.pelisalacarta
17:20:34 T:6892  NOTICE: [config.py] data path = C:\Users\Barracuda\AppData\Roaming\Kodi\userdata\addon_data\plugin.video.pelisalacarta\
17:20:34 T:6892  NOTICE: [config.py] temp path = C:\Users\Barracuda\AppData\Roaming\Kodi\cache\test
17:20:34 T:8912  NOTICE: Thread BackgroundLoader start, auto delete: false
17:20:34 T:8528  NOTICE: Thread JobWorker start, auto delete: true
17:20:35 T:7368  NOTICE: Thread LanguageInvoker start, auto delete: false
17:20:35 T:7368  NOTICE: -->Python Interpreter Initialized<--
17:20:35 T:7368  NOTICE: PLATFORM_NAME=xbmcgotham
17:20:35 T:7368  NOTICE: [config.py] xbmcgotham config
17:20:35 T:7368  NOTICE: [config.py] runtime path = C:\Users\Barracuda\AppData\Roaming\Kodi\addons\plugin.video.pelisalacarta
17:20:35 T:7368  NOTICE: [config.py] data path = C:\Users\Barracuda\AppData\Roaming\Kodi\userdata\addon_data\plugin.video.pelisalacarta\
17:20:35 T:7368  NOTICE: [config.py] temp path = C:\Users\Barracuda\AppData\Roaming\Kodi\cache\test
17:20:35 T:7776  NOTICE: Thread BackgroundLoader start, auto delete: false
17:20:36 T:9684  NOTICE: Thread LanguageInvoker start, auto delete: false
17:20:36 T:9684  NOTICE: -->Python Interpreter Initialized<--
17:20:36 T:9684  NOTICE: PLATFORM_NAME=xbmcgotham
17:20:36 T:9684  NOTICE: [config.py] xbmcgotham config
17:20:36 T:9684  NOTICE: [config.py] runtime path = C:\Users\Barracuda\AppData\Roaming\Kodi\addons\plugin.video.pelisalacarta
17:20:36 T:9684  NOTICE: [config.py] data path = C:\Users\Barracuda\AppData\Roaming\Kodi\userdata\addon_data\plugin.video.pelisalacarta\
17:20:36 T:9684  NOTICE: [config.py] temp path = C:\Users\Barracuda\AppData\Roaming\Kodi\cache\test
17:20:37 T:4640  NOTICE: Thread BackgroundLoader start, auto delete: false
17:20:38 T:6684  NOTICE: Thread LanguageInvoker start, auto delete: false
17:20:38 T:6684  NOTICE: -->Python Interpreter Initialized<--
17:20:38 T:6684  NOTICE: PLATFORM_NAME=xbmcgotham
17:20:38 T:6684  NOTICE: [config.py] xbmcgotham config
17:20:38 T:6684  NOTICE: [config.py] runtime path = C:\Users\Barracuda\AppData\Roaming\Kodi\addons\plugin.video.pelisalacarta
17:20:38 T:6684  NOTICE: [config.py] data path = C:\Users\Barracuda\AppData\Roaming\Kodi\userdata\addon_data\plugin.video.pelisalacarta\
17:20:38 T:6684  NOTICE: [config.py] temp path = C:\Users\Barracuda\AppData\Roaming\Kodi\cache\test
17:20:38 T:6684  NOTICE: ##### findvideos Streaming ## http://k4pp4.pw/HR/go.php?id=22143 ## Abysstream ##
17:20:38 T:6684  NOTICE: ##### findvideos Streaming ## http://k4pp4.pw/HR/go.php?id=22142 ## Backin ##
17:20:38 T:6684  NOTICE: ##### findvideos Streaming ## http://moevideo.net/video/91866.97e15ca6ef74422e459268ebc0f2 ## Moevideo ##
17:20:39 T:6684  NOTICE: ##### findvideos Streaming ## http://swzz.xyz/link/Y6QV1/ ## Nowvideo ##
17:20:39 T:6684  NOTICE: ##### findvideos Streaming ## http://swzz.xyz/link/wLDG6/ ## Openload ##
17:20:39 T:6684  NOTICE: ##### findvideos Streaming ## http://k4pp4.pw/HR/go.php?id=22144 ## Speedvideo ##
17:20:39 T:6684  NOTICE: ##### findvideos Streaming ## http://swzz.xyz/link/Y8lnZ/ ## Streamin ##
17:20:39 T:6684  NOTICE: ##### findvideos Streaming ## http://videowood.tv/video/f9is ## Videowood ##
17:20:39 T:6684  NOTICE: ##### findvideos Download ## http://k4pp4.pw/HR/go.php?id=22145 ## Backin ##
17:20:39 T:6684  NOTICE: ##### findvideos Download ## http://swzz.xyz/link/wLDGn/ ## Easybytez ##
17:20:39 T:6684  NOTICE: ##### findvideos Download ## http://swzz.xyz/link/w72Q1/ ## Neodrive ##
17:20:39 T:6684  NOTICE: ##### findvideos Download ## http://swzz.xyz/link/vqW64/ ## Rapidgator ##
17:20:39 T:6684  NOTICE: ##### findvideos Download ## http://rockfile.eu/mtl9ai3i3gva.html ## Rockfile ##
17:20:39 T:6684  NOTICE: ##### findvideos Download ## http://storbit.net/file/QCYDP95TMH1N/Kristy.2014.iTALiAN.MD.BDRip.XviD-iNCOMiNG.avi ## Storbit ##
17:20:39 T:6684  NOTICE: ##### findvideos Download HD ## http://cineblog01hd.net/news/11632-kristy-2015-md-mp3-bluray-720p-mkv-ita.html ## Screener HD 720i/p ##
17:20:39 T:6684  NOTICE: ##### findvideos Download HD ## http://cineblog01hd.net/news/11634-kristy-2015-md-mp3-3d-half-sbs-1080p-bluray-mkv-ita.html ## Screener 3D ##
17:20:39 T:6684 WARNING: CVideoInfoTag::GetDurationFromMinuteString <runtime> should be in minutes. Interpreting '' as 0 minutes
17:20:39 T:10900 WARNING: Previous line repeats 15 times.
17:20:39 T:10900  NOTICE: Thread BackgroundLoader start, auto delete: false
17:20:40 T:6352  NOTICE: Thread LanguageInvoker start, auto delete: false
17:20:40 T:6352  NOTICE: -->Python Interpreter Initialized<--
17:20:40 T:6352  NOTICE: PLATFORM_NAME=xbmcgotham
17:20:40 T:6352  NOTICE: [config.py] xbmcgotham config
17:20:40 T:6352  NOTICE: [config.py] runtime path = C:\Users\Barracuda\AppData\Roaming\Kodi\addons\plugin.video.pelisalacarta
17:20:40 T:6352  NOTICE: [config.py] data path = C:\Users\Barracuda\AppData\Roaming\Kodi\userdata\addon_data\plugin.video.pelisalacarta\
17:20:40 T:6352  NOTICE: [config.py] temp path = C:\Users\Barracuda\AppData\Roaming\Kodi\cache\test
17:20:41 T:6352  NOTICE: ##############################################################
17:20:41 T:6352  NOTICE: ##### play /link/ unpack ##
                                            var link="http://www.nowvideo.li/video/3610bbd982982";
                                            ##
17:20:41 T:6352  NOTICE: ##### play /link/ data ##
                                            http://www.nowvideo.li/video/3610bbd982982
                                            ##
17:20:41 T:6352  NOTICE: ##############################################################
17:20:41 T:6352   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.NameError'>
                                            Error Contents: global name 'servertools' is not defined
                                            Traceback (most recent call last):
                                              File "C:\Users\Barracuda\AppData\Roaming\Kodi\addons\plugin.video.pelisalacarta\default.py", line 27, in <module>
                                                launcher.run()
                                              File "C:\Users\Barracuda\AppData\Roaming\Kodi\addons\plugin.video.pelisalacarta\platformcode\xbmc\launcher.py", line 150, in run
                                                itemlist = channel.play(item)
                                              File "C:\Users\Barracuda\AppData\Roaming\Kodi\addons\plugin.video.pelisalacarta\pelisalacarta\channels\cineblog01.py", line 405, in play
                                                itemlist = servertools.find_video_items( data=data )
                                            NameError: global name 'servertools' is not defined
                                            -->End of Python script error report<--
now working to sort this out.

Re: How to bypass http://swzz.xyz

Publicado: 31 Jul 2015, 17:58
por zanzibar1982
I don't understand why itemlist in play item is not working. It's not calling in anyone of servertools items.

Re: How to bypass http://swzz.xyz

Publicado: 31 Jul 2015, 18:28
por dentaku65
Robalo you are my hero!

Código: Seleccionar todo

def play( item ):
        from servers import servertools
        logger.info( "[cineblog01.py] play" )
everything is perfect adding

Código: Seleccionar todo

from servers import servertools
under play

Re: How to bypass http://swzz.xyz

Publicado: 31 Jul 2015, 18:42
por zanzibar1982
...it feels like when Pirlo passed the ball to Grosso in Germany vs Italy back in 2006 :o :twisted:
Guys you deserve 90 minutes applauses.

EDIT:

Fixed here serie tv and anime conflict:

http://www37.zippyshare.com/v/WTWHxnGw/file.html

:D

Issues:

for this http://www.cb01.eu/vento-di-primavera-2011/

The html structure has "1st part" and "2nd part" so we get blank page.

But I guess we can live with that :D

and for some reason "Pixel" movie nowvideo link is not playing, only speedvideo is.

Re: How to bypass http://swzz.xyz

Publicado: 31 Jul 2015, 19:59
por robalo
zanzibar1982 escribió:the only error I see is at the end "NameError: global name 'servertools' is not defined"
Ups, culpa mía, se me pasó mencionarte que se debe añadir 'from servers import servertools', pero bueno, veo que ya has dado con el problema :).

Yo lo he añadido al inicio del archivo, por eso no se ve en la función.

La función 'findvideos' no extrae todas las entradas, aún quedan por añadir, pero creo que es suficiente para trabajar y comprobar que los enlaces llegan como deben y saber que conectores funcionan, hay que reparar, si se puede, o, si merece la pena, intentar crearlo

Re: How to bypass http://swzz.xyz

Publicado: 31 Jul 2015, 22:23
por robalo
Para solucionar el problema de enlaces que fallan, lo único que se me ocurre es actuar igual que lo hace la web nowvideo pero para todos los casos, independientemente de que falle o no.

Pixel falla en la la web y lanza una segunda petición anunciando el error de la url.

Pueba cambiar de la función 'get_video_url' del conector la parte que va desde 'else:' a 'video_urls.append( [ "[nowvideo]",data ] )' por esto

Código: Seleccionar todo

    else:

        data = scrapertools.cache_page( page_url )

        flashvar_filekey = scrapertools.get_match( data, 'flashvars.filekey=([^;]+);' )
        filekey = scrapertools.get_match( data,'var '+ flashvar_filekey + '="([^"]+)"' )

        #get stream url from api

        url = 'http://www.nowvideo.sx/api/player.api.php?key=%s&file=%s' % ( filekey.replace(".","%2E").replace("-","%2D"), video_id )
        data = scrapertools.cache_page( url )

        print "##### data 1 ## %s ##" % data

        data = scrapertools.get_match( data, 'url=([^\&]+)&' )
        data = urllib.quote_plus( data )

        url = 'http://www.nowvideo.li/api/player.api.php?cid3=undefined&numOfErrors=1&user=undefined&errorUrl=' + data.replace( ".", "%2E" ) + '&pass=undefined&errorCode=404&cid=1&cid2=undefined&file=' + video_id + '&key=' + filekey.replace( ".", "%2E" ).replace( "-", "%2D" )
        data = scrapertools.cache_page( url )

        print "##### data 2 ## %s ##" % data

        media_url = scrapertools.get_match( data, 'url=([^\&]+)&' )

        print "##### media_url ## %s ##" % media_url

        video_urls.append( [ scrapertools.get_filename_from_url( media_url )[-4:] + " [nowvideo]", media_url ] )

Re: How to bypass http://swzz.xyz

Publicado: 31 Jul 2015, 23:25
por zanzibar1982
Yes, this patch is working robalo :)

TY

Plus it seems it's not breaking other nowvideo links.

I submitted a little issue in pm, but it's not relevant I think.

Updating my files now.

EDIT:

I understood the fix is whether it's an .sx domain or a .li one

Entendí la solución es si se trata de un dominio .Sx oa uno .li