@@ -0,0 +1,12 @@
|
||||
{
|
||||
"id": "mixtoon",
|
||||
"name": "MixToon",
|
||||
"active": true,
|
||||
"adult": false,
|
||||
"language": ["cast"],
|
||||
"thumbnail": "http://i.imgur.com/s6CBxlw.png",
|
||||
"banner": "http://i.imgur.com/c1YTgNT.png",
|
||||
"categories": [
|
||||
"tvshow"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,162 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import re
|
||||
|
||||
from channels import renumbertools
|
||||
from channelselector import get_thumb
|
||||
from core import httptools
|
||||
from core import scrapertools
|
||||
from core import servertools
|
||||
from core import tmdb
|
||||
from core.item import Item
|
||||
from platformcode import config, logger
|
||||
from channels import filtertools
|
||||
from channels import autoplay
|
||||
from lib import gktools
|
||||
|
||||
IDIOMAS = {'castellano': 'Castellano'}
|
||||
list_language = IDIOMAS.values()
|
||||
list_servers = ['openload'
|
||||
]
|
||||
list_quality = ['default']
|
||||
|
||||
|
||||
host = "https://mixtoon.com"
|
||||
|
||||
|
||||
def mainlist(item):
|
||||
logger.info()
|
||||
thumb_series = get_thumb("channels_tvshow.png")
|
||||
autoplay.init(item.channel, list_servers, list_quality)
|
||||
|
||||
itemlist = list()
|
||||
|
||||
itemlist.append(
|
||||
Item(channel=item.channel, action="lista", title="Series", url=host, thumbnail=thumb_series, page=0))
|
||||
itemlist = renumbertools.show_option(item.channel, itemlist)
|
||||
autoplay.show_option(item.channel, itemlist)
|
||||
return itemlist
|
||||
|
||||
|
||||
def lista(item):
|
||||
logger.info()
|
||||
|
||||
itemlist = []
|
||||
data = httptools.downloadpage(item.url).data
|
||||
data = re.sub(r"\n|\r|\t|\s{2}| ", "", data)
|
||||
patron = '<a href="([^"]+)" '
|
||||
patron += 'class="link">.+?<img src="([^"]+)".*?'
|
||||
patron += 'title="([^"]+)">'
|
||||
matches = scrapertools.find_multiple_matches(data, patron)
|
||||
# Paginacion
|
||||
num_items_x_pagina = 30
|
||||
min = item.page * num_items_x_pagina
|
||||
min=min-item.page
|
||||
max = min + num_items_x_pagina - 1
|
||||
b=0
|
||||
for link, img, name in matches[min:max]:
|
||||
b=b+1
|
||||
if " y " in name:
|
||||
title=name.replace(" y "," & ")
|
||||
else:
|
||||
title = name
|
||||
url = host + link
|
||||
scrapedthumbnail = host + img
|
||||
context = renumbertools.context(item)
|
||||
context2 = autoplay.context
|
||||
context.extend(context2)
|
||||
itemlist.append(item.clone(title=title, url=url, action="episodios", thumbnail=scrapedthumbnail, show=title,contentSerieName=title,
|
||||
context=context))
|
||||
if b<29:
|
||||
pass
|
||||
else:
|
||||
itemlist.append(
|
||||
Item(channel=item.channel, title="[COLOR cyan]Página Siguiente >>[/COLOR]", url=item.url, action="lista", page=item.page + 1))
|
||||
|
||||
tmdb.set_infoLabels(itemlist)
|
||||
return itemlist
|
||||
|
||||
|
||||
def episodios(item):
|
||||
logger.info()
|
||||
|
||||
itemlist = []
|
||||
data = httptools.downloadpage(item.url).data
|
||||
# obtener el numero total de episodios
|
||||
total_episode = 0
|
||||
|
||||
patron_caps = '<li><a href="(.*?)">(.*?)-(.*?)<\/a><\/li>'
|
||||
matches = scrapertools.find_multiple_matches(data, patron_caps)
|
||||
patron_info = '<img src="([^"]+)"><div class="ds"><p>(.*?)<\/p>'
|
||||
scrapedthumbnail, scrapedplot = scrapertools.find_single_match(data, patron_info)
|
||||
show = item.title
|
||||
scrapedthumbnail = host + scrapedthumbnail
|
||||
|
||||
for link, cap, name in matches:
|
||||
|
||||
title = ""
|
||||
pat = "/"
|
||||
if "Mike, Lu & Og"==item.title:
|
||||
pat="&/"
|
||||
if "KND" in item.title:
|
||||
pat="-"
|
||||
# varios episodios en un enlace
|
||||
if len(name.split(pat)) > 1:
|
||||
i = 0
|
||||
for pos in name.split(pat):
|
||||
i = i + 1
|
||||
total_episode += 1
|
||||
season, episode = renumbertools.numbered_for_tratk(item.channel, item.contentSerieName, 1, total_episode)
|
||||
if len(name.split(pat)) == i:
|
||||
title += "%sx%s " % (season, str(episode).zfill(2))
|
||||
else:
|
||||
title += "%sx%s_" % (season, str(episode).zfill(2))
|
||||
else:
|
||||
total_episode += 1
|
||||
season, episode = renumbertools.numbered_for_tratk(item.channel,item.contentSerieName, 1, total_episode)
|
||||
|
||||
title += "%sx%s " % (season, str(episode).zfill(2))
|
||||
|
||||
url = host + "/" + link
|
||||
if "disponible" in link:
|
||||
title += "No Disponible aún"
|
||||
else:
|
||||
title += name
|
||||
itemlist.append(
|
||||
Item(channel=item.channel, action="findvideos", title=title, url=url, show=show, plot=scrapedplot,
|
||||
thumbnail=scrapedthumbnail))
|
||||
|
||||
if config.get_videolibrary_support() and len(itemlist) > 0:
|
||||
itemlist.append(Item(channel=item.channel, title="[COLOR yellow]Añadir esta serie a la videoteca[/COLOR]", url=item.url,
|
||||
action="add_serie_to_library", extra="episodios", show=show))
|
||||
|
||||
return itemlist
|
||||
|
||||
def findvideos(item):
|
||||
import base64
|
||||
logger.info()
|
||||
itemlist = []
|
||||
data = httptools.downloadpage(item.url).data
|
||||
_sl = scrapertools.find_single_match(data, 'var _dt=([^;]+);')
|
||||
sl = eval(_sl)
|
||||
buttons = [0,1]
|
||||
for id in buttons:
|
||||
new_url = "https://videoeb.xyz/" + "eb/" + sl[0] + "/" + sl[1] + "/" + str(id) + "/" + sl[2]
|
||||
data_new = httptools.downloadpage(new_url).data
|
||||
valor1, valor2 = scrapertools.find_single_match(data_new, 'var x0x = \["[^"]*","([^"]+)","[^"]*","[^"]*","([^"]+)')
|
||||
try:
|
||||
url = base64.b64decode(gktools.transforma_gsv(valor2, base64.b64decode(valor1)))
|
||||
if 'download' in url:
|
||||
url = url.replace('download', 'preview')
|
||||
title = '%s'
|
||||
itemlist.append(Item(channel=item.channel, title=title, url=url, action='play', language='latino',
|
||||
infoLabels=item.infoLabels))
|
||||
except Exception as e:
|
||||
logger.info(e)
|
||||
itemlist = servertools.get_servers_itemlist(itemlist, lambda i: i.title % i.server.capitalize())
|
||||
# Requerido para FilterTools
|
||||
itemlist = filtertools.get_links(itemlist, item, list_language)
|
||||
# Requerido para AutoPlay
|
||||
autoplay.start(itemlist, item)
|
||||
|
||||
return itemlist
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"id": "seodiv",
|
||||
"name": "Seodiv",
|
||||
"active": false,
|
||||
"active": true,
|
||||
"adult": false,
|
||||
"language": ["lat"],
|
||||
"thumbnail": "https://s32.postimg.cc/gh8lhbkb9/seodiv.png",
|
||||
|
||||
@@ -47,8 +47,7 @@ def todas(item):
|
||||
itemlist = []
|
||||
data = httptools.downloadpage(item.url).data
|
||||
data = re.sub(r'"|\n|\r|\t| |<br>|\s{2,}', "", data)
|
||||
patron = '<div class=shortf><div><div class=shortf-img><a href=(.*?)><img src=(.*?) alt=.*?quality>(.*?)<.*?Ver ' \
|
||||
'Serie><span>(.*?)<\/span>'
|
||||
patron = '<div class=shortstory-in><div class=shortstory radius-3><div class=short-images radius-3><a href=(.*?) title=(.*?) class=.*?><img src=(.*?) alt.*?><\/a><\/div>'
|
||||
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
# Paginacion
|
||||
@@ -57,16 +56,15 @@ def todas(item):
|
||||
min=int(min)-int(item.page)
|
||||
max = min + num_items_x_pagina - 1
|
||||
|
||||
for scrapedurl, scrapedthumbnail, scrapedcalidad, scrapedtitle in matches[min:max]:
|
||||
for scrapedurl, scrapedtitle, scrapedthumbnail, in matches[min:max]:
|
||||
url = host + scrapedurl
|
||||
calidad = scrapedcalidad
|
||||
title = scrapedtitle.decode('utf-8')
|
||||
thumbnail = scrapedthumbnail
|
||||
fanart = 'https://s32.postimg.cc/gh8lhbkb9/seodiv.png'
|
||||
if not 'xxxxxx' in scrapedtitle:
|
||||
if 'TITULO' != title:
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="temporadas",
|
||||
action="episodios",
|
||||
title=title, url=url,
|
||||
thumbnail=thumbnail,
|
||||
fanart=fanart,
|
||||
@@ -85,153 +83,70 @@ def todas(item):
|
||||
return itemlist
|
||||
|
||||
|
||||
def temporadas(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
data = get_source(item.url)
|
||||
url_base = item.url
|
||||
patron = '<li class=item\d+><a href=#>(.*?) <\/a>'
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
temp = 1
|
||||
if matches:
|
||||
for scrapedtitle in matches:
|
||||
url = url_base
|
||||
tempo = re.findall(r'\d+', scrapedtitle)
|
||||
# if tempo:
|
||||
# title = 'Temporada' + ' ' + tempo[0]
|
||||
# else:
|
||||
title = scrapedtitle
|
||||
thumbnail = item.thumbnail
|
||||
plot = item.plot
|
||||
fanart = scrapertools.find_single_match(data, '<img src="([^"]+)"/>.*?</a>')
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="episodiosxtemp",
|
||||
title=title,
|
||||
fulltitle=item.title,
|
||||
url=url,
|
||||
thumbnail=thumbnail,
|
||||
plot=plot, fanart=fanart,
|
||||
temp=str(temp),
|
||||
contentSerieName=item.contentSerieName,
|
||||
context=item.context
|
||||
))
|
||||
temp = temp + 1
|
||||
|
||||
if config.get_videolibrary_support() and len(itemlist) > 0:
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
title='[COLOR yellow]Añadir esta serie a la videoteca[/COLOR]',
|
||||
url=item.url,
|
||||
action="add_serie_to_library",
|
||||
extra="episodios",
|
||||
contentSerieName=item.contentSerieName,
|
||||
extra1=item.extra1,
|
||||
temp=str(temp)
|
||||
))
|
||||
return itemlist
|
||||
else:
|
||||
itemlist = episodiosxtemp(item)
|
||||
if config.get_videolibrary_support() and len(itemlist) > 0:
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
title='[COLOR yellow]Añadir esta serie a la videoteca[/COLOR]',
|
||||
url=item.url,
|
||||
action="add_serie_to_library",
|
||||
extra="episodios",
|
||||
contentSerieName=item.contentSerieName,
|
||||
extra1=item.extra1,
|
||||
temp=str(temp)
|
||||
))
|
||||
return itemlist
|
||||
|
||||
|
||||
def episodios(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
templist = temporadas(item)
|
||||
for tempitem in templist:
|
||||
itemlist += episodiosxtemp(tempitem)
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def get_source(url):
|
||||
logger.info()
|
||||
data = httptools.downloadpage(url, add_referer=True).data
|
||||
data = httptools.downloadpage(item.url).data
|
||||
data = re.sub(r'"|\n|\r|\t| |<br>|\s{2,}', "", data)
|
||||
return data
|
||||
|
||||
|
||||
def episodiosxtemp(item):
|
||||
logger.info()
|
||||
|
||||
logger.info()
|
||||
itemlist = []
|
||||
item.title = 'Temporada %s' % item.temp.zfill(2)
|
||||
patron_temp = '<li class=item\d+><a href=#>%s <\/a><ul><!--initiate accordion-->.*?<!--initiate ' \
|
||||
'accordion-->' % item.title
|
||||
all_data = get_source(item.url)
|
||||
data = scrapertools.find_single_match(all_data, patron_temp)
|
||||
tempo = item.title
|
||||
if 'Temporada' in item.title:
|
||||
item.title = 'temporada-%s'%item.temp.zfill(2)
|
||||
patron = '<li><a href=(.*?)>.*?(Capitulo|Pelicula).*?(\d+).*?<'
|
||||
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
|
||||
for scrapedurl, scrapedtipo, scrapedtitle in matches:
|
||||
url = host + scrapedurl
|
||||
plot = item.plot
|
||||
if scrapedtipo == 'Capitulo' and item.temp != '':
|
||||
title = item.contentSerieName + ' ' + item.temp + 'x' + scrapedtitle
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="findvideos",
|
||||
title=title,
|
||||
fulltitle=item.fulltitle,
|
||||
url=url,
|
||||
thumbnail=item.thumbnail,
|
||||
plot=plot,
|
||||
language=language,
|
||||
contentSerieName=item.contentSerieName,
|
||||
context=item.context
|
||||
))
|
||||
|
||||
if item.title not in scrapedurl and scrapedtipo == 'Capitulo' and item.temp \
|
||||
== '':
|
||||
if item.temp == '': temp = '1'
|
||||
title = item.contentSerieName + ' ' + temp + 'x' + scrapedtitle
|
||||
if '#' not in scrapedurl:
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="findvideos",
|
||||
title=title,
|
||||
fulltitle=item.fulltitle,
|
||||
url=url,
|
||||
thumbnail=item.thumbnail,
|
||||
plot=plot,
|
||||
contentSerieName=item.contentSerieName,
|
||||
context=item.context
|
||||
))
|
||||
|
||||
if 'temporada' not in item.title and item.title not in scrapedurl and scrapedtipo == 'Pelicula':
|
||||
title = scrapedtipo + ' ' + scrapedtitle
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="findvideos",
|
||||
title=title,
|
||||
fulltitle=item.fulltitle,
|
||||
url=url,
|
||||
thumbnail=item.thumbnail,
|
||||
plot=plot,
|
||||
language=language,
|
||||
contentSerieName=item.contentSerieName,
|
||||
context=item.context
|
||||
))
|
||||
|
||||
patronpags = "<div class=pages>.+?<\/div><div class=col-lg-1 col-sm-2 col-xs-2 pages-next>"
|
||||
data2 = scrapertools.find_single_match(data, patronpags)
|
||||
patrontotal = "<a href=.*?>(.*?)<\/a>"
|
||||
matches = scrapertools.find_multiple_matches(data2, patrontotal)
|
||||
itemlist = capitulosxpagina(item,item.url)
|
||||
total = 0
|
||||
for totales in matches:
|
||||
total = int(totales)
|
||||
for x in range(1, total):
|
||||
url = item.url+"page/"+str(x+1)+"/"
|
||||
listitem = capitulosxpagina(item,url)
|
||||
if isinstance(listitem, list):
|
||||
itemlist= itemlist + listitem
|
||||
if config.get_videolibrary_support() and len(itemlist) > 0:
|
||||
itemlist.append(Item(channel=item.channel, title="[COLOR yellow]Añadir esta serie a la videoteca[/COLOR]", url=item.url,
|
||||
action="add_serie_to_library", extra="episodios", show=item.contentSerieName))
|
||||
return itemlist
|
||||
|
||||
def capitulosxpagina(item,url):
|
||||
itemlist = []
|
||||
data = httptools.downloadpage(url).data
|
||||
data = re.sub(r'"|\n|\r|\t| |<br>|\s{2,}', "", data)
|
||||
patron = '<div class=col-sm-4 col-xs-12><a href=(.*?) title=(.*?) class=.*?><img src=(.*?) class.*?>'
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
temp = 1
|
||||
if matches:
|
||||
for scrapedurl,scrapedtitle,scrapedthumbnail in matches:
|
||||
url = scrapedurl
|
||||
serieName = item.contentSerieName
|
||||
title = scrapedtitle.lower()
|
||||
logger.info
|
||||
if serieName.lower() in title:
|
||||
title = title.split(serieName.lower())
|
||||
title = title[1]
|
||||
thumbnail = scrapedthumbnail
|
||||
plot = item.plot
|
||||
fanart = scrapertools.find_single_match(data, '<img src="([^"]+)"/>.*?</a>')
|
||||
if "audio" not in title:
|
||||
if "temporada" in title:
|
||||
title = title.split("temporada")
|
||||
title = title[1]
|
||||
elif "capitulo" in title:
|
||||
title = "01"+title
|
||||
if "capitulo" in title:
|
||||
title = title.replace(" capitulo ","x")
|
||||
if len(title) > 3:
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="findvideos",
|
||||
title=title,
|
||||
fulltitle=item.title,
|
||||
url=url,
|
||||
thumbnail=thumbnail,
|
||||
plot=plot, fanart=fanart,
|
||||
temp=str(temp),
|
||||
contentSerieName=item.contentSerieName,
|
||||
context=item.context
|
||||
))
|
||||
return itemlist
|
||||
|
||||
def findvideos(item):
|
||||
logger.info()
|
||||
|
||||
@@ -12,6 +12,7 @@ from core.item import Item
|
||||
from platformcode import config, logger
|
||||
from channels import filtertools
|
||||
from channels import autoplay
|
||||
from lib import gktools
|
||||
|
||||
IDIOMAS = {'latino': 'Latino'}
|
||||
list_language = IDIOMAS.values()
|
||||
@@ -31,9 +32,11 @@ def mainlist(item):
|
||||
itemlist = list()
|
||||
|
||||
itemlist.append(
|
||||
Item(channel=item.channel, action="lista", title="Series", url=host, thumbnail=thumb_series, page=0))
|
||||
Item(channel=item.channel, action="lista", title="Series", contentSerieName="Series", url=host, thumbnail=thumb_series, page=0))
|
||||
itemlist.append(
|
||||
Item(channel=item.channel, action="lista", title="Live Action", url=host+"/liveaction", thumbnail=thumb_series, page=0))
|
||||
Item(channel=item.channel, action="lista", title="Live Action", contentSerieName="Live Action", url=host+"/liveaction", thumbnail=thumb_series, page=0))
|
||||
#itemlist.append(
|
||||
# Item(channel=item.channel, action="peliculas", title="Películas", contentSerieName="Películas", url=host+"/peliculas", thumbnail=thumb_series, page=0))
|
||||
itemlist = renumbertools.show_option(item.channel, itemlist)
|
||||
autoplay.show_option(item.channel, itemlist)
|
||||
return itemlist
|
||||
@@ -47,7 +50,7 @@ def lista(item):
|
||||
data = httptools.downloadpage(item.url).data
|
||||
data = re.sub(r"\n|\r|\t|\s{2}| ", "", data)
|
||||
patron = '<a href="([^"]+)" '
|
||||
if item.title == "Series":
|
||||
if item.contentSerieName == "Series":
|
||||
patron += 'class="link">.+?<img src="([^"]+)".*?'
|
||||
else:
|
||||
patron += 'class="link-la">.+?<img src="([^"]+)".*?'
|
||||
@@ -84,14 +87,46 @@ def lista(item):
|
||||
url=host+"/pag-"+str(a)
|
||||
if b>10:
|
||||
itemlist.append(
|
||||
Item(channel=item.channel, title="[COLOR cyan]Página Siguiente >>[/COLOR]", url=url, action="lista", page=0))
|
||||
Item(channel=item.channel, contentSerieName=item.contentSerieName, title="[COLOR cyan]Página Siguiente >>[/COLOR]", url=url, action="lista", page=0))
|
||||
else:
|
||||
itemlist.append(
|
||||
Item(channel=item.channel, title="[COLOR cyan]Página Siguiente >>[/COLOR]", url=item.url, action="lista", page=item.page + 1))
|
||||
Item(channel=item.channel, contentSerieName=item.contentSerieName, title="[COLOR cyan]Página Siguiente >>[/COLOR]", url=item.url, action="lista", page=item.page + 1))
|
||||
|
||||
tmdb.set_infoLabels(itemlist)
|
||||
return itemlist
|
||||
|
||||
def peliculas(item):
|
||||
logger.info()
|
||||
|
||||
itemlist = []
|
||||
|
||||
data = httptools.downloadpage(item.url).data
|
||||
data = re.sub(r"\n|\r|\t|\s{2}| ", "", data)
|
||||
patron = '<div class="pel play" dt="(.+?)" .+?><img src="(.+?)" .+? title="(.*?)"><span class=".+?">(.+?)<\/span><a href="(.+?)" class.+?>'
|
||||
matches = scrapertools.find_multiple_matches(data, patron)
|
||||
# Paginacion
|
||||
num_items_x_pagina = 30
|
||||
min = item.page * num_items_x_pagina
|
||||
min=min-item.page
|
||||
max = min + num_items_x_pagina - 1
|
||||
b=0
|
||||
for scrapedplot,scrapedthumbnail, scrapedtitle, scrapedyear, scrapedurl in matches[min:max]:
|
||||
b=b+1
|
||||
url = host + scrapedurl
|
||||
thumbnail = host +scrapedthumbnail
|
||||
context = renumbertools.context(item)
|
||||
context2 = autoplay.context
|
||||
context.extend(context2)
|
||||
itemlist.append(item.clone(title=scrapedtitle+"-"+scrapedyear, url=url, action="findvideos", thumbnail=thumbnail, plot=scrapedplot,
|
||||
show=scrapedtitle,contentSerieName=scrapedtitle,context=context))
|
||||
if b<29:
|
||||
pass
|
||||
else:
|
||||
itemlist.append(
|
||||
Item(channel=item.channel, contentSerieName=item.contentSerieName, title="[COLOR cyan]Página Siguiente >>[/COLOR]", url=item.url, action="peliculas", page=item.page + 1))
|
||||
|
||||
tmdb.set_infoLabels(itemlist)
|
||||
return itemlist
|
||||
|
||||
def episodios(item):
|
||||
logger.info()
|
||||
@@ -163,7 +198,7 @@ def findvideos(item):
|
||||
_x0x = scrapertools.find_single_match(data_new, 'var x0x = ([^;]+);')
|
||||
try:
|
||||
x0x = eval(_x0x)
|
||||
url = resolve(x0x[4], base64.b64decode(x0x[1]))
|
||||
url = base64.b64decode(gktools.transforma_gsv(x0x[4], base64.b64decode(x0x[1])))
|
||||
if 'download' in url:
|
||||
url = url.replace('download', 'preview')
|
||||
title = '%s'
|
||||
@@ -191,27 +226,4 @@ def golink (num, sa, sl):
|
||||
SVR = "https://viteca.stream" if sa == 'true' else "http://serieslan.com"
|
||||
TT = "/" + urllib.quote_plus(sl[3].replace("/", "><")) if num == 0 else ""
|
||||
|
||||
return SVR + "/el/" + sl[0] + "/" + sl[1] + "/" + str(num) + "/" + sl[2] + d + TT
|
||||
|
||||
|
||||
def resolve(value1, value2):
|
||||
reto = ''
|
||||
lista = range(256)
|
||||
j = 0
|
||||
for i in range(256):
|
||||
j = (j + lista[i] + ord(value1[i % len(value1)])) % 256
|
||||
k = lista[i]
|
||||
lista[i] = lista[j]
|
||||
lista[j] = k
|
||||
|
||||
m = 0;
|
||||
j = 0;
|
||||
for i in range(len(value2)):
|
||||
m = (m + 1) % 256
|
||||
j = (j + lista[m]) % 256
|
||||
k = lista[m]
|
||||
lista[m] = lista[j]
|
||||
lista[j] = k
|
||||
reto += chr(ord(value2[i]) ^ lista[(lista[m] + lista[j]) % 256])
|
||||
|
||||
return reto
|
||||
return SVR + "/el/" + sl[0] + "/" + sl[1] + "/" + str(num) + "/" + sl[2] + d + TT
|
||||
Reference in New Issue
Block a user