Beispiel #1
0
def resolve(url):

    try:
        session=requests.Session()
        try: referer = urlparse.parse_qs(urlparse.urlparse(url).query)['referer'][0]
        except: referer = url
        id = urlparse.parse_qs(urlparse.urlparse(url).query)['stream'][0]
        url = 'http://www.04stream.com/weed.js?stream=%s&width=600&height=460&str=is&link=1&cat=1'%id
        
        session.headers.update({'referer': referer,
                                'User-agent' : client.agent()})

        result = session.get(url).text
        result = decryptionUtils.doDemystify(result)
        src = re.compile('.*?src=([^\'"><]+).*').findall(result)[0] + 'thefeed2all.eu'
        page = src
        ref2 = src
        result = session.get(src).text
        
        try:
            captcha = re.compile("<input type=\"hidden\" name=\"x\" value=\"(.+?)\">").findall(result)[0]
            url = re.compile("<input type=\"hidden\" name=\"url\" value=\"(.+?)\">").findall(result)[0]
            if 'http' not in url:
                url = 'http://www.04stream.com'+ url
            cap_url = 'http://www.blocked.com/captcha.php?x=' + captcha
            urllib.urlretrieve(cap_url,captcha_img)
            input = get_response(captcha_img)
            post_data = {'blockscript' : 'captcha',
                         'x' : captcha,
                         'url' : url,
                         'val' : input}
            session.headers.update({'Host':'www.04stream.com',
                                'Origin': 'http://www.04stream.com',
                                'Referer' : ref2})

            result = session.put(url, data=urllib.urlencode(post_data))
            result=result.text
        except:
            pass
        result = decryptionUtils.doDemystify(result)
        var = re.compile('var\s(.+?)\s*=\s*[\'\"](.+?)[\'\"]').findall(result)
        server_id = re.findall('.*?boxig=.*?&srp=(\d+)',result)[0]
        rtmp = rowbalance.get(server_id)
        var.append(('thist',rtmp))
        for i in range(100):
            for v in var: result = result.replace("+%s+" % v[0], '%s'%v[1])
            for v in var: result = result.replace("+%s" % v[0], '%s'%v[1])
            for v in var: result = result.replace("%s+" % v[0], '%s'%v[1])
            
        
        
        file = re.findall("&file=(rtmp://[^&]+)&",result)[0]#.replace('/stream//','').replace('/stream/','').replace('?.stream','.stream')
        file = file.replace('\'','').replace('"','')
        url = file + ' swfUrl=http://thecdn.04stream.com/p/ooolo1.swf flashver=' + constants.flash_ver() + ' timeout=15 live=1 pageUrl='+page
        return url
    except:
        return
Beispiel #2
0
def resolve(url):
    
    try:
        session=requests.Session()
        try: referer = urlparse.parse_qs(urlparse.urlparse(url).query)['referer'][0]
        except: referer = url
        id = urlparse.parse_qs(urlparse.urlparse(url).query)['stream'][0]
        url = 'http://www.04stream.com/weed.js?stream=%s&width=600&height=460&str=is&link=1&cat=1'%id
        
        session.headers.update({'referer': referer,
                                'User-agent' : client.agent()})

        result = session.get(url).text
        result = decryptionUtils.doDemystify(result)
        src = re.compile('.*?src=([^\'"><]+).*').findall(result)[0] + 'thefeed2all.eu'
        page = src
        ref2 = src
        result = session.get(src).text
        
        try:
            captcha = re.compile("<input type=\"hidden\" name=\"x\" value=\"(.+?)\">").findall(result)[0]
            url = re.compile("<input type=\"hidden\" name=\"url\" value=\"(.+?)\">").findall(result)[0]
            if 'http' not in url:
                url = 'http://www.04stream.com'+ url
            cap_url = 'http://www.blocked.com/captcha.php?x=' + captcha
            urllib.urlretrieve(cap_url,captcha_img)
            input = get_response(captcha_img)
            post_data = {'blockscript' : 'captcha',
                         'x' : captcha,
                         'url' : url,
                         'val' : input}
            session.headers.update({'Host':'www.04stream.com',
                                'Origin': 'http://www.04stream.com',
                                'Referer' : ref2})

            result = session.put(url, data=urllib.urlencode(post_data))
            result=result.text
        except:
            pass
        result = decryptionUtils.doDemystify(result)
        file = re.findall("&file=rtmp://'\+thist\+'(.+?)&",result)[0].replace('/stream//','').replace('/stream/','').replace('?.stream','.stream')
        server_id = re.findall('.*?boxig=.*?&srp=(\d+)',result)[0]
        rtmp = rowbalance.get(server_id)
        rtmp = 'rtmp://%s/stream/'%rtmp
        url = rtmp+ ' playpath=' + file + ' swfUrl=http://thecdn.04stream.com/p/ooolo1.swf flashver=' + constants.flash_ver() + ' timeout=15 live=1 pageUrl='+page
        return url
    except:
        return
Beispiel #3
0
def resolve(url):
    try:
        pageUrl = url
        try: referer = urlparse.parse_qs(urlparse.urlparse(url).query)['referer'][0]
        except: referer = url
        
        result = client.request(url, referer=referer, headers= { 'Host': urlparse.urlparse(url).netloc} )
        page2 = re.findall('.*src=["\']([^"\']+)["\'].*',result)[0]
        result = client.request(page2, referer=referer )
        result = decryptionUtils.doDemystify(result)
        vs = re.findall('"([^\"\']+)";',result)
        for v in vs:

            try:
                vd = base64.b64decode(v)
                if 'm3u8' in vd:
                    file = vd
                    break
            except:
                pass

        host = urlparse.urlparse(pageUrl).netloc
        host2 = urlparse.urlparse(file).netloc
        origin = 'http://' + host
        url = file + '|%s' % urllib.urlencode({'Referer':page2,'User-agent':'Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0','Accept-Encoding':'gzip,deflate lzma, sdch','DNT':'1','Connection':'keep-alive','IcY-METadATA':'0','Origin':origin,'Host':host2})
        return url
    except:
        return
Beispiel #4
0
def resolve(url):
    try:
        pageUrl = url
        try:
            referer = urlparse.parse_qs(
                urlparse.urlparse(url).query)['referer'][0]
        except:
            referer = url

        result = client.request(
            url,
            referer=referer,
            headers={'Host': urlparse.urlparse(url).netloc})
        page2 = re.findall('.*src=["\']([^"\']+)["\'].*', result)[0]
        result = client.request(page2, referer=referer)
        result = decryptionUtils.doDemystify(result)

        vs = re.findall('type="hidden" id=".+?" value="(.+?)"', result)
        for v in vs:
            vd = base64.b64decode(v)
            if 'm3u8' in vd:
                file = vd
            if vd.startswith('//'):
                ref = 'http:' + vd
        url = file + '|%s' % urllib.urlencode({
            'Referer': ref,
            'User-agent': client.agent()
        })
        return url
    except:
        return
Beispiel #5
0
def resolve(url):
	#swf='http://static.zoomtv.me/player/jwplayer.6.5.3.swf'
    referer = urlparse.parse_qs(urlparse.urlparse(url).query)['referer'][0]
    headers = { 'referer': referer,
                             'Accept' : 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',
                             'Connection' : 'keep-alive',
                             'Host' : 'www.zoomtv.me',
                             'Origin' : urlparse.urlparse(referer).netloc
                             }
    fid = urlparse.parse_qs(urlparse.urlparse(url).query)['v'][0]
    cx = urlparse.parse_qs(urlparse.urlparse(url).query)['cx'][0]
    pid = urlparse.parse_qs(urlparse.urlparse(url).query)['pid'][0]
    url = 'http://www.zoomtv.me/embed.php?v=%s&vw=660&vh=450'%fid
    post_data = {'cx' : cx,
    			'lg' : '1' ,
    			'pid' : pid }
    result = client.request(url, post=urllib.urlencode(post_data),headers = headers, mobile=True)

    result = decryptionUtils.doDemystify(result)
    print(result)
    rtmp = re.findall('(rtmp://.+?/zmtvliveme)',result)[0]
    junk,file = re.findall('file',result)[0]
    junk,ts = re.findall('.*[^\w](\w+)\s*=.{0,20}(1[\d]{9})\b.*ts.{0,20}\1.*',result)[0]
    junk,sg = re.findall('.*?[^\w](\w+)\s*=.{0,20}([a-z0-9]{32})\b.*sg.{0,20}\1.*',result)[0]
    res  = client.request(req,referer='http://static.zoomtv.me/player/jwplayer.6.7.4.swf')
    
    if not rtmp:
        rtmp = 'rtmp://94.102.49.62:1935/zmliveme'
    url = rtmp + ' playpath=' + file + ' swfUrl=http://static.zoomtv.me/player/jwplayer.6.7.4.swf flashver=WIN\2019,0,0,245 conn=S:' + file + ' conn=S:' + ts + ' conn=S:' + sg + ' conn=S:V&gt;JWhui^@2ESdu0?}&gt;AN live=1 timeout=15 token=Q!lrB@G1)ww(-dQ4J4 swfVfy=1 pageUrl=' + url
    return url
Beispiel #6
0
def resolve(url):
    try:
        try:
            referer = urlparse.parse_qs(urlparse.urlparse(url).query)['referer'][0]
        except:
            referer=url


        id = urlparse.parse_qs(urlparse.urlparse(url).query)['u'][0]
        url = 'http://www.finecast.tv/embed4.php?u=%s&vw=640&vh=450'%id

        headers=[("User-Agent", client.agent()), ("Referer", referer)]
        cj = get_cj()

        result = unCaptcha.performCaptcha(url, cj, headers = headers)
        result = decryptionUtils.doDemystify(result)
        cj.save (cookieFile,ignore_discard=True)
        


        file = re.findall('[\'\"](.+?.stream)[\'\"]',result)[0]
        auth = re.findall('[\'\"](\?wmsAuthSign.+?)[\'\"]',result)[0]
        rtmp = 'http://play.finecast.tv:1935/live/%s/playlist.m3u8%s'%(file,auth)

        #url = rtmp +  ' playpath=' + file + ' swfUrl=http://www.finecast.tv/player6/jwplayer.flash.swf flashver=' + constants.flash_ver() + ' live=1 timeout=14 pageUrl=' + url
        return rtmp

        
    except:
        return
Beispiel #7
0
def resolve(url):
    try:
        try:
            cid  = urlparse.parse_qs(urlparse.urlparse(url).query)['cid'][0] 
        except:
            cid = re.compile('channel/(.+?)(?:/|$)').findall(url)[0]

        
        try:
            referer = urlparse.parse_qs(urlparse.urlparse(url).query)['referer'][0]
        except:
            referer='http://castalba.tv'
        
        url = 'http://castalba.tv/embed.php?cid=%s&wh=600&ht=380&r=%s'%(cid,urlparse.urlparse(referer).netloc)
        pageUrl=url

        result = client.request(url, referer=referer,mobile=True)
        result = decryptionUtils.doDemystify(result)
        result=urllib.unquote(result)
        var = re.compile('var\s(.+?)\s*=\s*[\'\"](.+?)[\'\"]').findall(result)
        var_dict = dict(var)

        if 'm3u8' in result:
            url = re.compile('(?:var\s*)?file.+?\s*=\s*(?:unescape\()[\'\"](.+?)[\'\"]').findall(result)[-1]
            url = 'http://' + url + '.m3u8'
            url += '|%s' % urllib.urlencode({'User-Agent': client.agent(), 'Referer': url,'X-Requested-With':constants.get_shockwave()})
            log("Castalba: Found m3u8 url: " + url)
            
        else:
            try:
                filePath = re.compile("'file'\s*:\s*(?:unescape\()?'(.+?)'").findall(result)[0]
                
            except:
                file = re.findall('(?:var\s*)?file\s*=\s*(?:unescape\()?(?:\'|\")(.+?)(?:\'|\")',result)[-1]
                try:
                    file2 = re.findall("'file':\s*unescape\(file\)\s*\+\s*unescape\('(.+?)'\)",result)[0]
                    filePath = file+file2
                except:
                    filePath = file
            swf = re.compile("'flashplayer'\s*:\s*\"(.+?)\"").findall(result)[0]
            
            sm = re.findall("'streamer':(.+?),",result)[0]
            strm_funcs = re.findall('function\s*(.+?)\s*\{([^\}]+)',result,flags=re.DOTALL)
            for f in strm_funcs:
                if f[0] in ['(p,a,c,k,e,r)','()']:
                    continue
                if '%s'%f[0] in sm:
                    strm_func = f[1]
                    break
            strm_func = re.sub('\s//[^;]+','',strm_func)
            streamer = 'rtmp://' +  re.findall('.*["\'/](\d{1,3}\.\d{1,3}\.\d{1,3}\.[^"\'/]+)["\'/]',strm_func)[0] + '/live'
            streamer = streamer.replace('///','//')
            url = streamer  + ' playpath=' + filePath +' swfUrl=' + swf + ' flashver=' + constants.flash_ver() +' live=true timeout=15 swfVfy=true pageUrl=' + pageUrl
            log("Castalba: Found rtmp link: " + url)

        return url
    
    except:
        log("Castalba: Resolver failed. Returning...")
        return
Beispiel #8
0
def resolve(url):
    try:
        try:
            referer = urlparse.parse_qs(
                urlparse.urlparse(url).query)['referer'][0]
        except:
            referer = url

        id = urlparse.parse_qs(urlparse.urlparse(url).query)['u'][0]
        url = 'http://www.finecast.tv/embed4.php?u=%s&vw=640&vh=450' % id

        headers = [("User-Agent", client.agent()), ("Referer", referer)]
        cj = get_cj()

        result = unCaptcha.performCaptcha(url, cj, headers=headers)
        result = decryptionUtils.doDemystify(result)
        cj.save(cookieFile, ignore_discard=True)

        file = re.findall('[\'\"](.+?.stream)[\'\"]', result)[0]
        auth = re.findall('[\'\"](\?wmsAuthSign.+?)[\'\"]', result)[0]
        rtmp = 'http://play.finecast.tv:1935/live/%s/playlist.m3u8%s' % (file,
                                                                         auth)

        #url = rtmp +  ' playpath=' + file + ' swfUrl=http://www.finecast.tv/player6/jwplayer.flash.swf flashver=' + constants.flash_ver() + ' live=1 timeout=14 pageUrl=' + url
        return rtmp

    except:
        return
Beispiel #9
0
def resolve(url):
    
    try:
        session=requests.Session()
        try: referer = urlparse.parse_qs(urlparse.urlparse(url).query)['referer'][0]
        except: referer = url
        id = urlparse.parse_qs(urlparse.urlparse(url).query)['stream'][0]
        url = 'http://www.04stream.com/weed.js?stream=%s&width=600&height=460&str=is&link=1&cat=1'%id
        
        session.headers.update({'referer': referer,
                                'User-agent' : client.agent()})

        result = session.get(url).text
        result = decryptionUtils.doDemystify(result)
        src = re.compile('.*?src=([^\'"><]+).*').findall(result)[0] + 'thefeed2all.eu'
        page = src
        ref2 = src
        result = session.get(src).text
        try:
            captcha = re.compile("<input type=\"hidden\" name=\"x\" value=\"(.+?)\">").findall(result)[0]
            url = re.compile("<input type=\"hidden\" name=\"url\" value=\"(.+?)\">").findall(result)[0]
            if 'http' not in url:
                url = 'http://www.04stream.com'+ url
            cap_url = 'http://www.blocked.com/captcha.php?x=' + captcha
            urllib.urlretrieve(cap_url,captcha_img)
            input = get_response(captcha_img)
            post_data = {'blockscript' : 'captcha',
                         'x' : captcha,
                         'url' : url,
                         'val' : input}
            session.headers.update({'Host':'www.04stream.com',
                                'Origin': 'http://www.04stream.com',
                                'Referer' : ref2})

            result = session.put(url, data=urllib.urlencode(post_data))
            result=result.text
        except:
            pass
        result = decryptionUtils.doDemystify(result)
        file = re.findall("&file=rtmp://'\+thist\+'(.+?)&",result)[0].replace('/stream//','').replace('/stream/','').replace('?.stream','.stream')
        rtmp = rowbalance.get()
        rtmp = 'rtmp://%s/stream/'%rtmp
        url = rtmp+ ' playpath=' + file + r' swfUrl=http://thecdn.04stream.com/p/ooolo1.swf flashver=WIN/2020,0,0,286  timeout=15 live=1 pageUrl='+page
        return url
    except:
        return
Beispiel #10
0
def req(url,post_data,headers):
    result = client.request(url, post=post_data,headers = headers)
    result = decryptionUtils.doDemystify(result)
    var = re.compile('var\s(.+?)\s*=\s*\'(.+?)\'').findall(result)
    vars = dict(var)
    result = re.sub('var.+?=.+?;','',result)
    for v in vars.keys():
        result = result.replace(v,vars[v])
    return result
Beispiel #11
0
def req(url, post_data, headers):
    result = client.request(url, post=post_data, headers=headers)
    result = decryptionUtils.doDemystify(result)
    var = re.compile('var\s(.+?)\s*=\s*\'(.+?)\'').findall(result)
    vars = dict(var)
    result = re.sub('var.+?=.+?;', '', result)
    for v in vars.keys():
        result = result.replace(v, vars[v])
    return result
Beispiel #12
0
def resolve(url):
    #try:
        referer = urlparse.parse_qs(urlparse.urlparse(url).query)['referer'][0]
        page = url.replace(referer, '').replace('&referer=', '').replace('referer=', '')

        result = client.request(page, referer=referer)
        result = decryptionUtils.doDemystify(result)
        token = re.findall(r'(\["\\x.+?[^\]]+\])',result)[0]
        token = eval(token)[1]
        rtmp = re.findall('.*(?:file|streamer|hestia):\s*["\']([^\'"]+).*',result)[0]
        url = rtmp + ' swfUrl=http://mybeststream.xyz/YjFlMTI0MT/jwplayer.flash.swf token=' + token + ' flashver=' + constants.flash_ver() + ' live=1 timeout=15 swfVfy=1 pageUrl=' + page
        return url
Beispiel #13
0
def resolve(url):
    #try:
        referer = urlparse.parse_qs(urlparse.urlparse(url).query)['referer'][0]
        page = url.replace(referer, '').replace('&referer=', '').replace('referer=', '')

        result = client.request(page, referer=referer)
        result = decryptionUtils.doDemystify(result)
        log(result)
        rtmp = re.findall('.*(?:file|streamer|hestia):\s*["\']([^\'"]+).*',result)[0]
        rtmp=rtmp.replace('rtmpe://l.mybeststream.xyz/r/','')
        url='rtmpe://l.mybeststream.xyz/r/'+ rtmp + ' swfUrl=http://mybeststream.xyz/jwplayer.flash.swf swfsize=61916 swfhash=e54728508e787f43cd472ef9ba2e514e2eca3f0679b3782206a3808b8d89b164 token=c.r.e.a.t.e.S.t. flashver=' + constants.flash_ver() + ' live=1 timeout=15 swfVfy=1 pageUrl=' + page
        return url
Beispiel #14
0
def resolve(url):
    #try:
        referer = urlparse.parse_qs(urlparse.urlparse(url).query)['referer'][0]
        page = url.replace(referer, '').replace('&referer=', '').replace('referer=', '')

        result = client.request(page, referer=referer)
        result = decryptionUtils.doDemystify(result)
        log(result)
        rtmp = re.findall('.*(?:file|streamer|hestia):\s*["\']([^\'"]+).*',result)[0]
        rtmp=rtmp.replace('rtmpe://l.mybeststream.xyz/r/','')
        url='rtmpe://l.mybeststream.xyz/r/'+ rtmp + ' swfUrl=http://mybeststream.xyz/jwplayer.flash.swf swfsize=61916 swfhash=e54728508e787f43cd472ef9ba2e514e2eca3f0679b3782206a3808b8d89b164 token=c.r.e.a.t.e.S.t. flashver=' + constants.flash_ver() + ' live=1 timeout=15 swfVfy=1 pageUrl=' + page
        return url
Beispiel #15
0
def resolve(url):
    #try:
    referer = urlparse.parse_qs(urlparse.urlparse(url).query)['referer'][0]
    page = url.replace(referer, '').replace('&referer=',
                                            '').replace('referer=', '')

    result = client.request(page, referer=referer)
    result = decryptionUtils.doDemystify(result)
    token = re.findall(r'(\["\\x.+?[^\]]+\])', result)[0]
    token = eval(token)[1]
    rtmp = re.findall('.*(?:file|streamer|hestia):\s*["\']([^\'"]+).*',
                      result)[0]
    url = rtmp + ' swfUrl=http://mybeststream.xyz/YjFlMTI0MT/jwplayer.flash.swf token=' + token + ' flashver=' + constants.flash_ver(
    ) + ' live=1 timeout=15 swfVfy=1 pageUrl=' + page
    return url
Beispiel #16
0
def resolve(url):
    try:
        try:
            referer = urlparse.parse_qs(urlparse.urlparse(url).query)["referer"][0]
        except:
            referer = url
        url = url.replace(referer, "")
        result = client.request(url, referer=referer)
        result = decryptionUtils.doDemystify(result)
        print(result)
        rtmp = re.findall(".*[\"'](rtmp[^\"']+)[\"'].*", result)[0]

        url = rtmp + " swfUrl=http://micast.tv/jwplayer/jwplayer.flash.swf live=true pageUrl=" + url
        return url
    except:
        return
Beispiel #17
0
def resolve(url):
    try:
        try:
            referer = urlparse.parse_qs(
                urlparse.urlparse(url).query)['referer'][0]
        except:
            referer = url
        url = url.replace(referer, '')
        result = client.request(url, referer=referer)
        result = decryptionUtils.doDemystify(result)
        print(result)
        rtmp = re.findall('.*["\'](rtmp[^"\']+)["\'].*', result)[0]

        url = rtmp + ' swfUrl=http://micast.tv/jwplayer/jwplayer.flash.swf live=true pageUrl=' + url
        return url
    except:
        return
Beispiel #18
0
def resolve(url):
    try:
        try:
            referer = urlparse.parse_qs(urlparse.urlparse(url).query)['referer'][0]
        except:
            referer= url 


        url = liveresolver_utils.remove_referer(url)

        result = client.request(url,referer=referer)
        result = decryptionUtils.doDemystify(result)
        rtmp = re.findall('.*file:"([^"]+)"',result)[0]
        token = re.findall('token:"([^"]+)"',result)[0]
        url = rtmp +' swfUrl=http://akamaistreaming.com/YjFlMTI0MT/jwplayer.flash.swf token='+token+' flashver=' + constants.flash_ver() + ' live=1 timeout=15 pageUrl=' + url
        return url 
    except:
        return
Beispiel #19
0
def resolve(url):
    try:
        try: referer = urlparse.parse_qs(urlparse.urlparse(url).query)['referer'][0]
        except: referer = url
        try: id = urlparse.parse_qs(urlparse.urlparse(url).query)['id'][0]
    	except: id = re.findall('streamup.com/(.+?)/embed',url)[0]
        url = 'https://streamup.com/%s/embeds/video?startMuted=true'%id
        page = url
        result = client.request(url,referer=referer)
        result = decryptionUtils.doDemystify(result)
        roomSlug = re.findall('"roomSlug":\s*"(.+?)"',result)[0]
        url = re.findall('\$.ajax\(\{\s*url:\s*"(.+?),',result)[0].replace('"','').replace(' ','').replace('window.Room.roomSlug',roomSlug).replace('+','')
        item = re.findall('HlsManifestUrl:\s*response\[\'(.+?)\'\]',result)[0]
        resp = json.loads(client.request(url,referer=referer))[item]
        url = resp + '|%s' % urllib.urlencode({'User-Agent': client.agent(), 'Referer': page,'X-Requested-With':'ShockwaveFlash/20.0.0.286'})
        return url
    except:
        return
Beispiel #20
0
def resolve(url):
    try:
        pageUrl = url
        try:
            referer = urlparse.parse_qs(
                urlparse.urlparse(url).query)['referer'][0]
        except:
            referer = url

        result = client.request(
            url,
            referer=referer,
            headers={'Host': urlparse.urlparse(url).netloc})
        page2 = re.findall('.*src=["\']([^"\']+)["\'].*', result)[0]
        result = client.request(page2, referer=referer)
        result = decryptionUtils.doDemystify(result)
        vs = re.findall('"([^\"\']+)";', result)
        for v in vs:

            try:
                vd = base64.b64decode(v)
                if 'm3u8' in vd:
                    file = vd
                    break
            except:
                pass

        host = urlparse.urlparse(pageUrl).netloc
        host2 = urlparse.urlparse(file).netloc
        origin = 'http://' + host
        url = file + '|%s' % urllib.urlencode({
            'Referer': page2,
            'User-agent':
            'Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0',
            'Accept-Encoding': 'gzip,deflate lzma, sdch',
            'DNT': '1',
            'Connection': 'keep-alive',
            'IcY-METadATA': '0',
            'Origin': origin,
            'Host': host2
        })
        return url
    except:
        return
Beispiel #21
0
def resolve(url):
    try:
        try:
            referer = urlparse.parse_qs(
                urlparse.urlparse(url).query)['referer'][0]
        except:
            referer = url

        url = liveresolver_utils.remove_referer(url)

        result = client.request(url, referer=referer)
        result = decryptionUtils.doDemystify(result)
        rtmp = re.findall('.*file:"([^"]+)"', result)[0]
        token = re.findall('token:"([^"]+)"', result)[0]
        url = rtmp + ' swfUrl=http://akamaistreaming.com/YjFlMTI0MT/jwplayer.flash.swf token=' + token + ' flashver=' + constants.flash_ver(
        ) + ' live=1 timeout=15 pageUrl=' + url
        return url
    except:
        return
def resolve(url):
    #try:
        pageUrl = url
        try: referer = urlparse.parse_qs(urlparse.urlparse(url).query)['referer'][0]
        except: referer = url
        
        result = client.request(url, referer=referer, headers= { 'Host': urlparse.urlparse(url).netloc} )
        page2 = re.findall('.*src=["\']([^"\']+)["\'].*',result)[0]
        result = client.request(page2, referer=referer )
        result = decryptionUtils.doDemystify(result)
        
        vs = re.findall('type="hidden" id=".+?" value="(.+?)"',result)
        for v in vs:
            vd = base64.b64decode(v)
            if 'm3u8' in vd:
                file = vd
            if vd.startswith('//'):
                ref = 'http:' + vd
        url = file + '|%s' % urllib.urlencode({'Referer':ref,'User-agent':client.agent()})
        return url
Beispiel #23
0
def resolve(url):
    try:

        referer = urlparse.parse_qs(urlparse.urlparse(url).query)['referer'][0]
        headers = {
            'referer': referer,
            'Accept':
            'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',
            'Content-Type': 'application/x-www-form-urlencoded',
            'Connection': 'keep-alive',
            'Host': 'www.zoomtv.me',
            'Origin': urlparse.urlparse(referer).netloc,
            'User-Agent': client.agent()
        }
        fid = urlparse.parse_qs(urlparse.urlparse(url).query)['v'][0]
        pid = urlparse.parse_qs(urlparse.urlparse(url).query)['pid'][0]
        url = 'http://www.zoomtv.me/embed.php?v=%s&vw=660&vh=450' % fid
        page = url
        post_data = 'uagent=uagent&pid=' + pid
        result = client.request(url, post=post_data, headers=headers)
        result = decryptionUtils.doDemystify(result)
        var = re.compile('var\s(.+?)\s*=\s*\'(.+?)\'').findall(result)

        for v in var:
            if 'm3u8' in v[1]:
                m3u8 = v[1]
            if 'file' in v[1]:
                file = v[1]
        url = m3u8 + file
        url += '|%s' % urllib.urlencode(
            {
                'User-Agent': client.agent(),
                'Referer': page,
                'X-Requested-With': 'ShockwaveFlash/20.0.0.286'
            })

        return url
    except:
        return
Beispiel #24
0
def resolve(url):
    #swf='http://static.zoomtv.me/player/jwplayer.6.5.3.swf'
    referer = urlparse.parse_qs(urlparse.urlparse(url).query)['referer'][0]
    headers = {
        'referer': referer,
        'Accept':
        'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',
        'Connection': 'keep-alive',
        'Host': 'www.zoomtv.me',
        'Origin': urlparse.urlparse(referer).netloc
    }
    fid = urlparse.parse_qs(urlparse.urlparse(url).query)['v'][0]
    cx = urlparse.parse_qs(urlparse.urlparse(url).query)['cx'][0]
    pid = urlparse.parse_qs(urlparse.urlparse(url).query)['pid'][0]
    url = 'http://www.zoomtv.me/embed.php?v=%s&vw=660&vh=450' % fid
    post_data = {'cx': cx, 'lg': '1', 'pid': pid}
    result = client.request(url,
                            post=urllib.urlencode(post_data),
                            headers=headers,
                            mobile=True)

    result = decryptionUtils.doDemystify(result)
    print(result)
    rtmp = re.findall('(rtmp://.+?/zmtvliveme)', result)[0]
    junk, file = re.findall('file', result)[0]
    junk, ts = re.findall('.*[^\w](\w+)\s*=.{0,20}(1[\d]{9})\b.*ts.{0,20}\1.*',
                          result)[0]
    junk, sg = re.findall(
        '.*?[^\w](\w+)\s*=.{0,20}([a-z0-9]{32})\b.*sg.{0,20}\1.*', result)[0]
    res = client.request(
        req, referer='http://static.zoomtv.me/player/jwplayer.6.7.4.swf')

    if not rtmp:
        rtmp = 'rtmp://94.102.49.62:1935/zmliveme'
    url = rtmp + ' playpath=' + file + ' swfUrl=http://static.zoomtv.me/player/jwplayer.6.7.4.swf flashver=WIN\2019,0,0,245 conn=S:' + file + ' conn=S:' + ts + ' conn=S:' + sg + ' conn=S:V&gt;JWhui^@2ESdu0?}&gt;AN live=1 timeout=15 token=Q!lrB@G1)ww(-dQ4J4 swfVfy=1 pageUrl=' + url
    return url
Beispiel #25
0
def resolve(url):
    try:

        page = re.compile('//(.+?)/(?:embed|v)/([0-9a-zA-Z-_]+)').findall(url)[0]
        
        try: referer = urlparse.parse_qs(urlparse.urlparse(url).query)['referer'][0]
        except: referer = page
        try: host = urlparse.parse_qs(urlparse.urlparse(url).query)['host'][0]
        except: host = 'www.sawlive.tv'
        page = 'http://sawlive.tv/embed/%s' % (page[1])
        headers={'User-Agent': client.agent(),'Host': host, 'Referer': referer, 'Connection': 'keep-alive'}
        result = client.request(page, referer=referer, headers = headers)
        
        unpacked = ''
        
        packed = result.split('\n')
        for i in packed:
            try:
                unpacked += jsunpack.unpack(i)
            except:
                pass
        result += unpacked
        result = decryptionUtils.doDemystify(result)
        
        result = urllib.unquote_plus(result)
        r2 = result
        resul = None
        try:
            url = client.parseDOM(result, 'iframe', ret='src')[-1]
        except:
            result = unpacked
            try:
                url = client.parseDOM(result, 'iframe', ret='src')[-1]
                var = re.compile('var\s(.+?)\s*=\s*[\'\"](.+?)[\'\"]').findall(result)
                var_dict = dict(var)       
                
                for v in var_dict.keys():
                    url = url.replace(v,var_dict[v])
                url = url.replace('\'','').replace('\"','').replace('+','').replace(' ','')
                resul = client.request(url, headers = headers)
            except:
                pass
        
        if resul is None:
            aaa = r2.replace('var ','').replace('\' ','\' +').replace(' \'','+ \'')

            aaa = aaa.replace('document.write(','result =').replace('\');','\'')
            aaa = re.sub('function.+?\(\)[^}]+}\s*','',aaa)
            aaa = re.sub('=([^\'\"\s]+)\s*([^\'\";]+);',r'=\1+\2;',aaa)
            aaa = aaa.replace('"\' +swidth+ \'"','')
            aaa = aaa.replace('"\' +sheight+ \'"','')
            aaa = re.sub('([^+])\s([^+])',r'\1+\2',aaa)
            exec(aaa)
            result = urllib.unquote_plus(result)
            url = client.parseDOM(result, 'iframe', ret='src')[-1]
            result = client.request(url, headers = headers)
        else:
            result = resul
        unpacked = ''
        packed = result.split('\n')
        for i in packed:
            try:
                unpacked += jsunpack.unpack(i)
            except:
                pass
        result += unpacked
        result = urllib.unquote_plus(result)
        var = re.compile('var\s(.+?)\s*=\s*[\'\"](.+?)[\'\"]').findall(result)
        rplcs = re.findall(';.+?=(.+?).replace\([\"\'](.+?)[\"\']\s*,\s*[\"\']([^\"\']*)[\"\']',result)
        var_dict = dict(var)       
        file = re.compile("'file'\s*(.+?)\)").findall(result)[0]
        file = file.replace('\'','')
            
        for v in var_dict.keys():
            file = file.replace(v,var_dict[v])
        file = file.replace('+','').replace(',','').strip().replace(' ', '')
        log("Sawlive: Found file url: " + file)
        if 'f4m' in file:
            return file
        try:
            log("Sawlive: Finding m3u8 link.")
            if not file.startswith('http'): raise Exception()
            url = client.request(file, output='geturl')
            if not '.m3u8' in url: raise Exception()
            url += '|%s' % urllib.urlencode({'User-Agent': client.agent(), 'Referer': file})
            log("Sawlive: Found m3u8 link: " + url)
            return url
        except:
            log("Sawlive: m3u8 link not found, finding rtmp.")
            pass
        strm = re.compile("'streamer'\s*(.+?)\)").findall(result)[0]
        strm = strm.replace('\'','')
        for v in var_dict.keys():
            strm = strm.replace(v,var_dict[v])
        strm = strm.replace('+','').replace(',','').strip().replace(' ', '')
        swf = re.compile("SWFObject\('(.+?)'").findall(result)[0].replace(' ', '')

        url = '%s playpath=%s swfUrl=%s pageUrl=%s live=1 timeout=60' % (strm, file, swf, url)
        url = urllib.unquote(url).replace('unescape(','')

        for r in rplcs:
            url = url.replace(r[1],r[2])
        log("Sawlive: rtmp link found: " + url)
        return url
    except Exception as e:
        log("Sawlive exception:\n" + str(e))
        log("Sawlive: Resolver failed. Returning...")
        return
Beispiel #26
0
def resolve(url):
    try:

        page = re.compile('//(.+?)/(?:embed|v)/([0-9a-zA-Z-_]+)').findall(url)[0]
        page = 'http://%s/embed/%s' % (page[0], page[1])
        try: referer = urlparse.parse_qs(urlparse.urlparse(url).query)['referer'][0]
        except: referer = page
        try: host = urlparse.parse_qs(urlparse.urlparse(url).query)['host'][0]
        except: host = 'sawlive.tv'

        headers={'User-Agent': client.agent(),'Host': host, 'Referer': referer, 'Connection': 'keep-alive'}

        result = client.request(page, referer=referer, headers = headers)
        
        unpacked = ''
        packed = result.split('\n')
        for i in packed:
            try:
                unpacked += jsunpack.unpack(i)
            except:
                pass
        result += unpacked
        result = decryptionUtils.doDemystify(result)
        
        result = urllib.unquote_plus(result)
        r2 = result
        resul = None
        try:
            url = client.parseDOM(result, 'iframe', ret='src')[-1]
        except:
            result = unpacked
            try:
                url = client.parseDOM(result, 'iframe', ret='src')[-1]
                var = re.compile('var\s(.+?)\s*=\s*[\'\"](.+?)[\'\"]').findall(result)
                var_dict = dict(var)       
                
                for v in var_dict.keys():
                    url = url.replace(v,var_dict[v])
                url = url.replace('\'','').replace('\"','').replace('+','').replace(' ','')
                resul = client.request(url, headers = headers)
            except:
                pass
        
        if resul is None:
            aaa = r2.replace('var ','').replace('\' ','\' +').replace(' \'','+ \'')

            aaa = aaa.replace('document.write(','result =').replace('\');','\'')
            aaa = re.sub('function.+?\(\)[^}]+}\s*','',aaa)
            aaa = re.sub('=([^\'\"\s]+)\s*([^\'\";]+);',r'=\1+\2;',aaa)
            aaa = aaa.replace('"\' +swidth+ \'"','')
            aaa = aaa.replace('"\' +sheight+ \'"','')
            aaa = re.sub('([^+])\s([^+])',r'\1+\2',aaa)
            
            exec(aaa)
            result = urllib.unquote_plus(result)
            url = client.parseDOM(result, 'iframe', ret='src')[-1]
            result = client.request(url, headers = headers)
        else:
            result = resul
        unpacked = ''
        packed = result.split('\n')
        for i in packed:
            try:
                unpacked += jsunpack.unpack(i)
            except:
                pass
        result += unpacked
        result = urllib.unquote_plus(result)
        var = re.compile('var\s(.+?)\s*=\s*[\'\"](.+?)[\'\"]').findall(result)
        rplcs = re.findall(';.+?=(.+?).replace\([\"\'](.+?)[\"\']\s*,\s*[\"\']([^\"\']*)[\"\']',result)
        var_dict = dict(var)       
        file = re.compile("'file'\s*(.+?)\)").findall(result)[0]
        file = file.replace('\'','')
            
        for v in var_dict.keys():
            file = file.replace(v,var_dict[v])
        file = file.replace('+','').replace(',','').strip().replace(' ', '')
        log("Sawlive: Found file url: " + file)
        if 'f4m' in file:
            return file
        try:
            log("Sawlive: Finding m3u8 link.")
            if not file.startswith('http'): raise Exception()
            url = client.request(file, output='geturl')
            if not '.m3u8' in url: raise Exception()
            url += '|%s' % urllib.urlencode({'User-Agent': client.agent(), 'Referer': file})
            log("Sawlive: Found m3u8 link: " + url)
            return url
        except:
            log("Sawlive: m3u8 link not found, finding rtmp.")
            pass
        strm = re.compile("'streamer'\s*(.+?)\)").findall(result)[0]
        strm = strm.replace('\'','')
        for v in var_dict.keys():
            strm = strm.replace(v,var_dict[v])
        strm = strm.replace('+','').replace(',','').strip().replace(' ', '')
        swf = re.compile("SWFObject\('(.+?)'").findall(result)[0].replace(' ', '')

        url = '%s playpath=%s swfUrl=%s pageUrl=%s live=1 timeout=60' % (strm, file, swf, url)
        url = urllib.unquote(url).replace('unescape(','')

        for r in rplcs:
            url = url.replace(r[1],r[2])
        log("Sawlive: rtmp link found: " + url)
        return url
    except Exception as e:
        log("Sawlive exception:\n" + str(e))
        log("Sawlive: Resolver failed. Returning...")
        return
Beispiel #27
0
def resolve(url):
    try:

        page = re.compile('//(.+?)/(?:embed|v)/([0-9a-zA-Z-_]+)').findall(
            url)[0]
        page = 'http://%s/embed/%s' % (page[0], page[1])
        try:
            referer = urlparse.parse_qs(
                urlparse.urlparse(url).query)['referer'][0]
        except:
            referer = page
        try:
            host = urlparse.parse_qs(urlparse.urlparse(url).query)['host'][0]
        except:
            host = 'sawlive.tv'

        headers = {
            'User-Agent': client.agent(),
            'Host': host,
            'Referer': referer,
            'Connection': 'keep-alive'
        }

        result = client.request(page, referer=referer)

        result = decryptionUtils.doDemystify(result)
        url = client.parseDOM(result, 'iframe', ret='src')[-1]
        url = url.replace(' ', '').replace('+', '')
        var = re.compile('var\s(.+?)\s*=\s*[\'\"](.+?)[\'\"]').findall(result)
        for i in range(100):
            for v in var:
                result = result.replace(" %s " % v[0], ' %s ' % v[1])
        var = re.compile('var\s(.+?)\s*=\s*[\'\"](.+?)[\'\"]').findall(result)
        var_dict = dict(var)

        for v in var:
            if '+' in v[1]:
                ss = v[1].rstrip('+').replace('"+', '').split('+')
                sg = v[1].rstrip('+').replace('"+', '')
                for s in ss:
                    sg = sg.replace(s, var_dict[s])
                var_dict[v[0]] = sg.replace('+', '')

        for i in range(100):
            for v in var_dict.keys():
                url = url.replace("'%s'" % v, var_dict[v])
            for v in var_dict.keys():
                url = url.replace("(%s)" % v, "(%s)" % var_dict[v])

        result = client.request(url, headers=headers)
        result = decryptionUtils.doDemystify(result)
        var = re.compile('var\s(.+?)\s*=\s*[\'\"](.+?)[\'\"]').findall(result)
        var_dict = dict(var)
        file = re.compile("'file'\s*(.+?)\)").findall(result)[0]
        file = file.replace('\'', '')
        for v in var_dict.keys():
            file = file.replace(v, var_dict[v])
        file = file.replace('+', '').replace(',', '').strip()
        log("Sawlive: Found file url: " + file)
        try:
            log("Sawlive: Finding m3u8 link.")
            if not file.startswith('http'): raise Exception()
            url = client.request(file, output='geturl')
            if not '.m3u8' in url: raise Exception()
            url += '|%s' % urllib.urlencode({
                'User-Agent': client.agent(),
                'Referer': file
            })
            log("Sawlive: Found m3u8 link: " + url)
            return url
        except:
            log("Sawlive: m3u8 link not found, finding rtmp.")
            pass
        strm = re.compile("'streamer'\s*(.+?)\)").findall(result)[0]
        strm = strm.replace('\'', '')
        for v in var_dict.keys():
            strm = strm.replace(v, var_dict[v])
        strm = strm.replace('+', '').replace(',', '').strip()
        swf = re.compile("SWFObject\('(.+?)'").findall(result)[0]

        url = '%s playpath=%s swfUrl=%s pageUrl=%s live=1 timeout=60' % (
            strm, file, swf, url)
        url = urllib.unquote(url).replace('unescape(', '')
        log("Sawlive: rtmp link found: " + url)
        return url
    except Exception as e:
        log("Sawlive exception:\n" + str(e))
        log("Sawlive: Resolver failed. Returning...")
        return
Beispiel #28
0
def resolve(url):
    try:

        page = re.compile('//(.+?)/(?:embed|v)/([0-9a-zA-Z-_]+)').findall(url)[0]
        page = 'http://%s/embed/%s' % (page[0], page[1])
        try: referer = urlparse.parse_qs(urlparse.urlparse(url).query)['referer'][0]
        except: referer = page
        try: host = urlparse.parse_qs(urlparse.urlparse(url).query)['host'][0]
        except: host = 'sawlive.tv'

        headers={'User-Agent': client.agent(),'Host': host, 'Referer': referer, 'Connection': 'keep-alive'}
        
        result = client.request(page, referer=referer)
        
        result = decryptionUtils.doDemystify(result)
        url = client.parseDOM(result, 'iframe', ret='src')[-1]
        url = url.replace(' ', '').replace('+','')
        var = re.compile('var\s(.+?)\s*=\s*[\'\"](.+?)[\'\"]').findall(result)
        for i in range(100):
            for v in var: result = result.replace(" %s " % v[0], ' %s '%v[1])
        var = re.compile('var\s(.+?)\s*=\s*[\'\"](.+?)[\'\"]').findall(result)
        var_dict = dict(var)
        for v in var:
            if '+' in v[1]:
                ss = v[1].rstrip('+').replace('"+','').split('+')
                sg = v[1].rstrip('+').replace('"+','')
                for s in ss:
                    sg = sg.replace(s, var_dict[s])
                var_dict[v[0]]=sg.replace('+','')
        for i in range(100):
            for v in var_dict.keys(): url = url.replace("'%s'" % v, var_dict[v])
            for v in var_dict.keys(): url = url.replace("(%s)" % v, "(%s)" % var_dict[v])
        
        
        result = client.request(url, headers = headers)
        result = decryptionUtils.doDemystify(result)
        
        file = re.compile("'file'.+?'(.+?)'").findall(result)[0]
        log("Sawlive: Found file url: " + file)
        try:
            log("Sawlive: Finding m3u8 link.")
            if not file.startswith('http'): raise Exception()
            url = client.request(file, output='geturl')
            if not '.m3u8' in url: raise Exception()
            url += '|%s' % urllib.urlencode({'User-Agent': client.agent(), 'Referer': file})
            log("Sawlive: Found m3u8 link: " + url)
            return url
        except:
            log("Sawlive: m3u8 link not found, finding rtmp.")
            pass

        strm = re.compile("'streamer'.+?'(.+?)'").findall(result)[0]
        swf = re.compile("SWFObject\('(.+?)'").findall(result)[0]

        url = '%s playpath=%s swfUrl=%s pageUrl=%s live=1 timeout=30' % (strm, file, swf, url)
        url = urllib.unquote(url)
        log("Sawlive: rtmp link found: " + url)
        return url
    except Exception as e:
        log("Sawlive exception:\n" + str(e))
        log("Sawlive: Resolver failed. Returning...")
        return