예제 #1
0
def Cdecode(sHtmlContent, encodedC):
    oParser = cParser()
    sPattern = '<([0-9a-zA-Z]+)><script>([^<]+)<\/script>'
    aResult = oParser.parse(sHtmlContent, sPattern)

    z = []
    y = []
    if (aResult[0] == True):
        for aEntry in aResult[1]:
            z.append(JJDecoder(aEntry[1]).decode())

        for x in z:

            r1 = re.search("atob\(\'([^']+)\'\)", x, re.DOTALL | re.UNICODE)
            if r1:
                y.append(base64.b64decode(r1.group(1)))

        # w = ''.join(y)
        # w = w.split('|')[1]
        # return w

        w = str(y).split('|')
        w = max(w, key=len)
        if w:
            return w
예제 #2
0
def CheckJJDecoder(str):

    sPattern = '([a-z]=.+?\(\)\)\(\);)'
    aResult = re.findall(sPattern, str)
    if (aResult):
        print('JJ encryption')
        return JJDecoder(aResult[0]).decode()

    return str
예제 #3
0
def CheckJJDecoder(str):
    oParser = cParser()
    sPattern = '([a-z]=.+?\(\)\)\(\);)'
    aResult = oParser.parse(str, sPattern)
    if (aResult[0]):
        xbmc.log('JJ encryption')
        return JJDecoder(aResult[1][0]).decode()

    return str
예제 #4
0
def CheckJJDecoder(str):

    sPattern = '([a-z]=.+?\(\)\)\(\);)'
    aResult = re.search(sPattern, str, re.DOTALL | re.UNICODE)
    if (aResult):
        VSlog('JJ encryption')
        tmp = JJDecoder(aResult.group(0)).decode()

        return str[:aResult.start()] + tmp + str[aResult.end():]

    return str
예제 #5
0
    def __getMediaLinkForGuest(self):

        oRequest = cRequestHandler(self.__sUrl)
        sHtmlContent = oRequest.request()

        #fh = open('c:\\test.txt', "w")
        #fh.write(sHtmlContent)
        #fh.close()

        #Debut des tests de decodage
        oParser = cParser()
        string = ''

        #"aaencode - Encode any JavaScript program to Japanese style emoticons (^_^)"
        sPattern = "<video(?:.|\s)*?<script\s[^>]*?>((?:.|\s)*?)<\/script"
        aResult = oParser.parse(sHtmlContent, sPattern)
        if (aResult[0] == True):
            string = AADecoder(aResult[1][0]).decode()

        if not (string):
            #Dean Edwards Packer
            sPattern = "(\s*eval\s*\(\s*function(?:.|\s)+?)<\/script>"
            aResult = oParser.parse(sHtmlContent, sPattern)
            if (aResult[0] == True):
                sUnpacked = cPacker().unpack(aResult[1][0])
                string = JJDecoder(sUnpacked).decode()

        if (string):
            sContent = string.replace('\\', '')

            api_call = ''

            sPattern = 'src=\s*?"(.*?)\?'
            aResult = oParser.parse(sContent, sPattern)
            if (aResult[0] == True):
                api_call = aResult[1][0]

            if not api_call:
                sPattern = 'window\.vr *="(.+?)"'
                aResult = oParser.parse(sContent, sPattern)
                if (aResult[0] == True):
                    api_call = aResult[1][0]

        if (api_call):
            return True, api_call

        return False, False
예제 #6
0
def Cdecode(sHtmlContent, encodedC):
    oParser = cParser()
    sPattern = '<([0-9a-zA-Z]+)><script>([^<]+)<\/script>'
    aResult = oParser.parse(sHtmlContent, sPattern)

    z = []
    y = []
    if (aResult[0] == True):
        for aEntry in aResult[1]:
            z.append(JJDecoder(aEntry[1]).decode())
        #VSlog(z)
        for x in z:
            r1 = re.search("atob\(\'([^']+)\'\)", x, re.DOTALL | re.UNICODE)
            if r1:
                y.append(base64.b64decode(r1.group(1)))

        for w in y:

            r2 = re.search(encodedC + "='([^']+)'", w)
            if r2:
                return r2.group(1)
예제 #7
0
    def __getMediaLinkForGuest(self):

        oRequest = cRequestHandler(self.__sUrl)
        sHtmlContent = oRequest.request()

        #fh = open('c:\\test.txt', "w")
        #fh.write(sHtmlContent)
        #fh.close()

        #Debut des tests de decodage
        oParser = cParser()
        string = ''

        #"aaencode - Encode any JavaScript program to Japanese style emoticons (^_^)"
        sPattern = '<script type="text\/javascript">(゚ω゚.+?)<\/script>'
        #sPattern = "<video(?:.|\s)*?<script\s[^>]*?>.+?<\/script>\s<script\s[^>]*?>((?:.|\s)*?)<\/"

        aResult = oParser.parse(sHtmlContent, sPattern)
        #xbmc.log(str(aResult))

        #ok on a maintenant 4 liens
        vid = 'XXXXXX'
        string2 = []
        for aEntry in aResult[1]:
            s = AADecoder(aEntry).decode()
            #xbmc.log(s)
            string2.append(s)

            if 'welikekodi_ya_rly' in s:
                c0 = re.search('welikekodi_ya_rly = ([^<>;"]+);', s)
                if c0:
                    c = c0.group(1)
                    c = c.replace('Math.round', 'int')
                    #xbmc.log('calcul : ' + c )
                    cc = str(eval(c))
                    vid = '[' + cc + ']'
                    #xbmc.log('resultat : ' + vid )

        for string3 in string2:
            if ('toString' in string3) and (vid in string3):

                #xbmc.log(string3)

                base = int(re.findall('toString\(a\+([0-9]+)\)', string3)[0])
                table = re.findall('(\([0-9][^)]+\))', string3)

                for str1 in table:
                    val = re.findall('([0-9]+),([0-9]+)', str1)
                    base2 = base + int(val[0][0])
                    str2 = base10toN(int(val[0][1]), base2)
                    string3 = string3.replace(str1, str2)

                #nettoyage
                string3 = string3.replace('+', '')
                string3 = string3.replace('"', '')
                string3 = string3.replace('', '')

                #bidouille pour pas avoir a tout recoder
                url = re.findall('(http[^<>}]+)', string3)[0]
                string = 'src="' + url + '?mime=true"'

        if not (string):
            #Dean Edwards Packer
            sPattern = "(\s*eval\s*\(\s*function(?:.|\s)+?)<\/script>"
            aResult = oParser.parse(sHtmlContent, sPattern)
            if (aResult[0] == True):
                sUnpacked = cPacker().unpack(aResult[1][0])
                string = JJDecoder(sUnpacked).decode()

        if (string):
            sContent = string.replace('\\', '')

            api_call = ''

            sPattern = 'src=\s*?"(.*?)\?'
            aResult = oParser.parse(sContent, sPattern)

            #print aResult

            if (aResult[0] == True):
                api_call = aResult[1][0]

            if not api_call:
                sPattern = 'window\.vr *=["\'](.+?)["\']'
                aResult = oParser.parse(sContent, sPattern)
                if (aResult[0] == True):
                    api_call = aResult[1][0]

        if (api_call):

            if 'openload.co/stream' in api_call:
                UA = 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0'
                headers = {'User-Agent': UA}

                req = urllib2.Request(api_call, None, headers)
                res = urllib2.urlopen(req)
                finalurl = res.geturl()
                #xbmc.log(finalurl)
                api_call = finalurl

            return True, api_call

        return False, False
예제 #8
0
    def __getMediaLinkForGuest(self):

        oRequest = cRequestHandler(self.__sUrl)
        sHtmlContent = oRequest.request()

        #fh = open('c:\\test.txt', "w")
        #fh.write(sHtmlContent)
        #fh.close()

        #Debut des tests de decodage
        oParser = cParser()
        string = ''

        #"aaencode - Encode any JavaScript program to Japanese style emoticons (^_^)"
        sPattern = "<video(?:.|\s)*?<script\s[^>]*?>((?:.|\s)*?)<\/script"
        aResult = oParser.parse(sHtmlContent, sPattern)
        if (aResult[0] == True):
            string = AADecoder(aResult[1][0]).decode()
            #print string
            if 'toString' in string:
                base = int(re.findall('toString\(a\+([0-9]+)\)', string)[0])
                table = re.findall('(\([0-9][^)]+\))', string)

                for str1 in table:
                    val = re.findall('([0-9]+),([0-9]+)', str1)
                    base2 = base + int(val[0][0])
                    str2 = base10toN(int(val[0][1]), base2)
                    string = string.replace(str1, str2)

                #nettoyage
                string = string.replace('+', '')
                string = string.replace('"', '')
                string = string.replace('', '')

                #bidouille pour pas avoir a tout recoder
                url = re.findall('(http[^<>}]+)', string)[0]
                string = 'src="' + url + '?mime=true"'

        if not (string):
            #Dean Edwards Packer
            sPattern = "(\s*eval\s*\(\s*function(?:.|\s)+?)<\/script>"
            aResult = oParser.parse(sHtmlContent, sPattern)
            if (aResult[0] == True):
                sUnpacked = cPacker().unpack(aResult[1][0])
                string = JJDecoder(sUnpacked).decode()

        if (string):
            sContent = string.replace('\\', '')

            api_call = ''

            sPattern = 'src=\s*?"(.*?)\?'
            aResult = oParser.parse(sContent, sPattern)

            #print aResult

            if (aResult[0] == True):
                api_call = aResult[1][0]

            if not api_call:
                sPattern = 'window\.vr *=["\'](.+?)["\']'
                aResult = oParser.parse(sContent, sPattern)
                if (aResult[0] == True):
                    api_call = aResult[1][0]

        if (api_call):
            return True, api_call

        return False, False
예제 #9
0
    def __getMediaLinkForGuest(self):
        
        oRequest = cRequestHandler(self.__sUrl)
        sHtmlContent = oRequest.request()
        
        #fh = open('c:\\test.txt', "w")
        #fh.write(sHtmlContent)
        #fh.close()
        
        #Debut des tests de decodage
        oParser = cParser()
        string = ''
       
        #"aaencode - Encode any JavaScript program to Japanese style emoticons (^_^)"
        sPattern = '<script type="text\/javascript">(゚ω゚.+?)<\/script>'
        #sPattern = "<video(?:.|\s)*?<script\s[^>]*?>.+?<\/script>\s<script\s[^>]*?>((?:.|\s)*?)<\/"
        
        aResult = oParser.parse(sHtmlContent, sPattern)
        #xbmc.log(str(aResult))
        
        #ok on a maintenant 4 liens
        vid = 'XXXXXX'
        string2 = []
        for aEntry in aResult[1]:
            s = AADecoder(aEntry).decode()
            #xbmc.log(s)
            string2.append(s)
            
            if 'welikekodi_ya_rly' in s:
                c0 = re.search('welikekodi_ya_rly = ([^<>;"]+);', s)
                if c0:
                    c = c0.group(1)
                    c = c.replace('Math.round','int')
                    #xbmc.log('calcul : ' + c )
                    cc = str(eval(c))
                    vid = '[' + cc + ']'
                    #xbmc.log('resultat : ' + vid )
        
        for string3 in string2:
            if ('toString' in string3) and (vid in string3):
                
                #xbmc.log(string3)
                
                base = int(re.findall('toString\(a\+([0-9]+)\)',string3)[0])
                table = re.findall('(\([0-9][^)]+\))',string3)
                
                for str1 in table:
                    val = re.findall('([0-9]+),([0-9]+)',str1)
                    base2 = base + int(val[0][0])
                    str2 = base10toN(int(val[0][1]), base2)
                    string3 = string3.replace(str1, str2)
                
                #nettoyage
                string3 = string3.replace('+', '')
                string3 = string3.replace('"', '')
                string3 = string3.replace('', '')

                #bidouille pour pas avoir a tout recoder
                url = re.findall('(http[^<>}]+)',string3)[0]
                string = 'src="' + url + '?mime=true"'
 
        if not (string): 
            #Dean Edwards Packer
            sPattern = "(\s*eval\s*\(\s*function(?:.|\s)+?)<\/script>"
            aResult = oParser.parse(sHtmlContent, sPattern)
            if (aResult[0] == True):
                sUnpacked = cPacker().unpack(aResult[1][0])
                string = JJDecoder(sUnpacked).decode()

        if (string):
            sContent = string.replace('\\','')
            
            api_call = ''

            sPattern = 'src=\s*?"(.*?)\?'
            aResult = oParser.parse(sContent, sPattern)
            
            #print aResult
            
            if (aResult[0] == True):
                api_call = aResult[1][0]
                
            if not api_call:
                sPattern = 'window\.vr *=["\'](.+?)["\']'
                aResult = oParser.parse(sContent, sPattern)
                if (aResult[0] == True):
                    api_call = aResult[1][0]

        if (api_call):
            
            if 'openload.co/stream' in api_call:
                UA = 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0'
                headers = {'User-Agent': UA }
                          
                req = urllib2.Request(api_call,None,headers)
                res = urllib2.urlopen(req)
                finalurl = res.geturl()
                #xbmc.log(finalurl)
                api_call = finalurl

            return True, api_call
            
        return False, False