Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function _0xe35c(d, e, f) {
- var g = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+/".split("");
- var h = g.slice(0, e);
- var i = g.slice(0, f);
- var j = d.split("").reverse().reduce(function (a, b, c) {
- if (h.indexOf(b) !== -1) return a += h.indexOf(b) * (Math.pow(e, c))
- }, 0);
- var k = "";
- while (j > 0) {
- k = i[j % f] + k;
- j = (j - (j % f)) / f
- }
- return k || "0"
- }
- var d = "57"
- var e = "8"
- var f = "10"
- document.write(_0xe35c(d, e, f))
- ##################################################
- ### python
- ##################################################
- from functools import reduce
- d = '57'
- e = 8
- f = 10
- def _0xe35c(d, e, f) :
- g = list("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+/")
- h = g[0:e]
- i = g[0:f]
- listd = list(d)[::-1]
- def red(a,b,c=0):
- indx = h.index(b)
- if indx!=-1:
- wyn = int(float(indx) *(math.pow(int(e),c)))
- a+=(wyn)
- return a
- j = reduce(red,listd,0)
- k = ''
- while j>0:
- k = i[j % f] + k
- j = (j - (j % f)) / f
- return k if k else "0"
- ax=_0xe35c(d, e, f)
Advertisement
Add Comment
Please, Sign In to add comment