Coder Social home page Coder Social logo

Comments (33)

DubitPlatform avatar DubitPlatform commented on August 17, 2024 2

I've tried with the latest tac copied from the site and get a close but slightly different signature to the one from Chrome. Top value is from Chrome, following two from the generator but with different agents set. Despite copying the Agents from the request in Chrome dev tools still not the same, but close. Any ideas?

  • nEmWTgAgEBNjtmmxrPGlPpxJIVAAMJf
  • nEmWTgAgEBNjtmmx81ilPpxJIVAAMJf
  • nEmWTgAgEBNjtmmxT7mlPpxJIVAAMJf

from tiktok-signature.

mnatsakanyank avatar mnatsakanyank commented on August 17, 2024 1

Did anyone found a solution to this?

from tiktok-signature.

mnatsakanyank avatar mnatsakanyank commented on August 17, 2024 1

So whoever is interested, I will share my findings.
This approach is not going to work anymore, because now sign() function requires a real browser. What they doing, they are rendering something in browser canvas and getting hash based on it. so if there is no browser they don't get the hash and hence generated signature is invalid. So I would suggest using a puppeteer where you can try to inspect requests and get a signature token from there.

from tiktok-signature.

carcabot avatar carcabot commented on August 17, 2024

Hi,

It seems that the signature code is still identical. I can still generate a working signature for trending page.

Greetings.

from tiktok-signature.

Sommerzeit avatar Sommerzeit commented on August 17, 2024

Hi there!
I'm getting similar results as @DubitPlatform. It doesn't matter whether you check the current trending endpoint ( https://m.tiktok.com/share/item/list?secUid=&id=&type=5&count=30&minCursor=0&maxCursor=0&shareUid= ) or the list of a specific user: the signature is slighty different and not working.

And yes, I always corrected the global.tac according to what Tik Tok outputs in their HTML :)

And could you elaborate on how you deobfuscated their code in the first place? It would make if a lot easier for us to deliver fixes for this repo (in case they are really needed and we are not doing something complety wrong)

from tiktok-signature.

eliranmoyal avatar eliranmoyal commented on August 17, 2024

@Sommerzeit
I'll try to explain what i think the process @carcabot did

first I found the signature is in common.js file (looked for q$sign)
click on the pretty print button in the bottom left to make the code look better.
I found this:

    duD4: function(e, t) {
        var n;
        Function((n = "v[x++]=\x10v[--x]\x10t.charCodeAt(b++)-32\x10function \x10return \x10))\x10++\x10.substr\x10var \x10.length\x10()\x10,b+=\x10;break;case \x10;break}".split("\x10"),
        '\x13e(e,a,r){\x14(b[e]||(b[e]=t("x,y","\x14x "+e+" y"\x15)(r,a)}\x13a(e,a,r){\x14(k[r]||(k[r]=t("x,y","\x14new x[y]("+Array(r+1).join(",x[\x16y]")\x17(1)+")"\x15)(e,a)}\x13r(e,a,r){\x18n,t,s={},b=s.d=r?r.d+1:0;for(s["$"+b]=s,t=0;t<b;t\x16)s[n="$"+t]=r[n];for(t=0,b=s\x19=a\x19;t<b;t\x16)s[t]=a[t];\x14c(e,0,s)}\x13c(t,b,k){\x13u(e){v[x\x16]=e}\x13f\x1a{\x14g=\x12,t\x17ing(b\x1bg)}\x13l\x1a{try{y=c(t,b,k)}catch(e){h=e,y=l}}for(\x18h,y,d,g,v=[],x=0;;)switch(g=\x12){case 1:u(!\x11)\x1c4:\x10f\x1a\x1c5:u(\x13(e){\x18a=0,r=e\x19;\x14\x13\x1a{\x18c=a<r;\x14c&&u(e[a\x16]),c}}(\x11\x15\x1c6:y=\x11,u(\x11(y\x15\x1c8:if(g=\x12,l\x1a\x1bg,g=\x12,y===c)b+=g;else if(y!==l)\x14y\x1c9:\x10c\x1c10:u(s(\x11\x15\x1c11:y=\x11,u(\x11+y)\x1c12:for(y=f\x1a,d=[],g=0;g<y\x19;g\x16)d[g]=y.charCodeAt(g)^g+y\x19;u(String.fromCharCode.apply(null,d\x15\x1c13:y=\x11,h=delete \x11[y]\x1c14:\x10\x12\x1c59:u((g=\x12)?(y=x,v.slice(x-=g,y\x15:[])\x1c61:u(\x11[\x12])\x1c62:g=\x11,k[0]=65599*k[0]+k[1].charCodeAt(g)>>>0\x1c65:h=\x11,y=\x11,\x11[y]=h\x1c66:u(e(t[b\x16],\x11,\x11\x15\x1c67:y=\x11,d=\x11,u((g=\x11).x===c?r(g.y,y,g.z):g.apply(d,y\x15\x1c68:u(e((g=t[b\x16])<"<"?(b--,f\x1a):g+g,\x11,\x11\x15\x1c70:u(!1)\x1c71:\x10n\x1c72:\x10+f\x1a\x1c73:u(parseInt(f\x1a,36\x15\x1c75:if(\x11){b\x16\x1dcase 74:g=\x12<<16>>16\x1bg\x1c76:u(k[\x12])\x1c77:y=\x11,u(\x11[y])\x1c78:g=\x12,u(a(v,x-=g+1,g\x15\x1c79:g=\x12,u(k["$"+g])\x1c81:h=\x11,\x11[f\x1a]=h\x1c82:u(\x11[f\x1a])\x1c83:h=\x11,k[\x12]=h\x1c84:\x10!0\x1c85:\x10void 0\x1c86:u(v[x-1])\x1c88:h=\x11,y=\x11,\x10h,\x10y\x1c89:u(\x13\x1a{\x13e\x1a{\x14r(e.y,arguments,k)}\x14e.y=f\x1a,e.x=c,e.z=k,e}\x1a)\x1c90:\x10null\x1c91:\x10h\x1c93:h=\x11\x1c0:\x14\x11;default:u((g<<16>>16)-16)}}\x18n=this,t=n.Function,s=Object.keys||\x13(e){\x18a={},r=0;for(\x18c in e)a[r\x16]=c;\x14a\x19=r,a},b={},k={};\x14r'.replace(/[\x10-\x1f]/g, function(e) {
            return n[15 & e.charCodeAt(0)]
        })))()('g,$@drbms!l!n \u0418b/s"g,&Usz`dlms#g,.}jcb{|zFbxjx}~ms$g,(lfi~ah`{ms%g,)gk}ejo{\x7fcms&g,&qnfme|ms\',!^s(,)|doikgauus),,j\x7fabSysaWzrrs*,(|fY\x7f~d`hs+,&jbfn~cs,,\'nfmosCks-,*icm\x7fM`ttSgs.,&eoi{K\x7fs/,)z\x7fi\x7fy|f~vs0l#l*ms10s2yWl ._b&s o ]1l l Jb<k$.aj;l .Tb<k$.gj/l .^b<k&i"-4j!\x1f+& s3yPo ]3s!l!l Hd>&l!l Bd>&+l!l <d>&+l!l 6d>&+l!l &+ s4y=o o ]7q"21o l q"18o ]4l 2d>& s6{s5yMo o ]8q"21o ]2Ld<l 4d#>>>b|s!o l q"18o ]4l!& s7yIo o ]6q"21o ]4o ]2Jd<l 6d#>>>b|&o ]3l &+ s8y\u01fd,`\x04*&3#-r\x1d\x03:\x1b\tt}a\x026\'%`b\r\x1ff\nkop\v\b\x1f3%\bU-(\x07\t\x161=%;\x19\x17\x03)\x1a;\x1c\x01\r\rO?.>\x19\x1a/\t=\x1as!$ s"0s$l o ],ml$3+d">=k\xddl vo ].mxl$v1+s$[!c\u012fb&@d<l vo ].mxl$v1+s$[!c\u012fb&8d<b|l vo ].mxl$v1+s$[!c\u012fb&b|s#l"l!vo ]/mxl#i%9tz40b&Bd>[!c+s"l"l!vo ]/mxl#i$5j40b&<d>[!c+s"l"l!vo ]/mxl#\u0ff0b&6d>[!c+s"l"l!vo ]/mxl#._b&[!c+s"j\uff52l o ],ml$b-0b>k\xd1l vo ].mxl$v1+s$[!c\u012fb&@d<l o ],ml$b>k6l vo ].mxl$[!c\u012fb&8d<j!0b|s#l"l!vo ]/mxl#i%9tz40b&Bd>[!c+s"l"l!vo ]/mxl#i$5j40b&<d>[!c+s"l"l o ],ml$b>k6l!vo ]/mxl#\u0ff0b&6d>[!cj#$!=+s"l"$!=+s"l" s9y\u0136o ]%v,-n|jqewVxp{rvmmx,&eff\x7fkx[!cs"l",%roc|a.Pal",&nbanb\x7f@al"v,*mnxNaadtjg[!mx$"2d[!cs#l#,$bjhs,*;?|u.|uc{ual#v,(n`fgXhv{mx$$\u9f98\u0e11\u0e20\uacbd2<[#c}l#,*ycmiaxR}ga2al#,+xdby@vwav`M1al#,)zbd{Nac\x7fc,$hlkbal#v,#bvfmx88802[%c}l#v,&uszfanmx[ c}l"v,)}eOmyoZB]mx[ cs!0s$l$Pb<k4l l!o ],mb%^l$1+s$j\x05l  s:y:(1o ]:i\'1ps9wxb& ) %{s /  s;y>0s"l"l!o ],mb<k+l"^l"1+s"j\bl  s<y\xb6o ]!n s l vr\'setDatex1[!c}l vr(setMonthx5[!c}0l v,1vwg@|{rbvt~S{xlEUmx[ cb-s!l vr(setMonthx;[!c}0l v,1vwg@|{rbvt~S{xlEUmx[ cb-s"gr$Mathvr#minxl!l"["c s=y\u010f(\u0105o ]%v,-n|jqewVxp{rvmmx,&eff\x7fkx[!cs l v,*mnxNaadtjgmx,%rceoe[!cs!l!v,,khzJhew}g|yymx,9N_Y[QA{ECWD{WCILLXN^rGAV^[!cs"l!v,,khz_qcs~qasemxl",5@XZYJQ^XBHZnemq{rceoem[!cs#l!v,,khz_qcs~qasemxl",7BVT[HWXZ@rdlgawcuw~oikam[!cs$l#$!/+l$+ ) &{s $   s>y\u0129[ s o ]&,\'wd|mbb~ms!l!v!k#}[ s"0s#l#l"o ],mb<k\xe9(\xdel"l#ms$[ s%0s&l&l$o ],mb<k\\l$vr$itemxl&[!ckCl%vr$pushxl$vr$itemxl&[!cr$type[!c}l&1+s&j\uffd7l$r$name$ +s&l$r\'versionk3l&l$r\'version$ ++s&l&l$r(filename$ ++s&l&l%vr$joinx$ [!c+s&l vr$pushxl&[!c})  l#1+s#j\uff4al vr$joinx$!_[!c s?y\u1c6b,)deec~~nst,*yjb~#|uc{u,%vcuao[#s gr&Objectn s!gr&Objectn s"l %s#l#u&k\u0101s$o ]%v,-n|jqewVxp{rvmmx,$wugi[!cs%l%,)`dei\x7fF[]],-`cb}|\x7f~yx{{tpal%,%vr~dlm,(nfd\x7f_dtj,$37v\x7fal%,%vr~dlm,*ldbyHn}x~jl$ao ]%,$fjb~mv,+j|}katRzzxqmxl%[!c}l!l$l%r+offsetWidthal"l$l%r,offsetHeightao ]%,$fjb~mv,+yi`ayuRzzxqmxl%[!c}j\uff39,+Jbiocu1_|zz,%Dtnie,+J~doc0S~rw~,,M\x7fgn|1Zvvgs`,(I{cj`-C[,,M\x7fgn|1\\rfgy`,5Td~yu:Ishp{EE\x02np\x05dHDM,0Qc{rx5Cyqzu\x7fy=SL,8Zpnhho{~M\x01tFVD\x06tIGY\vaB@@,,Nbad0P|g}dcv,1S}|\x7fxwy8Vv\x7f<NjfLD,\'Dieci~d,\'Didhyel,,Olcmbxs3Ytb\x7f,\'Dmg~~~t,.Mj~egam5Qxlqsx,2Qvzacea9IxtrqsBNMH,*Idadm/Cp|`,-Nabyr2@u{e7UJ,(Kfd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tj,$37v\x7fal),%vr~dlm,*ldbyHn}x~jl&$!,+l(+ao ]%,$fjb~mv,+j|}katRzzxqmxl)[!c}l)r+offsetWidthl!l(md#!==v!k;}l)r,offsetHeightl"l(md#!==s*o ]%,$fjb~mv,+yi`ayuRzzxqmxl)[!c}l*k>l$vr$pushxl#vo ]-mxl&[!c[!c}j"j\ufeffj\ufef0l$vr$joinx$!,[!c s@ysul d\',typeofo ])d#===v!k)}l zd#===k#$  ul d\',typeof,\'egffnmcd#===k-l k%$!1j#$!0 l  sAyC(:o ]\',.}jcb{|zFbxjx}~m!! ) %{s t  sByA(8o ]\',,`bmn|Bf|ftqrm!! ) %{s t  sCy>(5o ]\',)`doiukkTSm!! ) %{s t  sDy6o ]!n v,\'`m}^bahmx[ c sEyJo ]Ao ]Dz[ c&o ]Ao ]Cz[ c&+o ]Ao ]Bz[ c&+ sFy`o ]\',&udzloems l ,%roc|amo ](+l ,&nbanb\x7fm+o ](+l ,*id`b|Kuaf{m+ sGyUo ]\',&udzloems l ,*k}mdbXyuf{mo ](+l ,+jzlgcXt{t|am+ sHy\xc7gr\'Promisey\xb8,*mnxOo{dt`jo ]&d"ink\x9bo ]&v,*mnxOo{dt`jmx[ cvr$thenxyuo"] l ,(kakykd`hmo ](+l ,,oeo}wx|t@|{rm+o ](+l ,/kybq{ugq~v~Nrqxm+o ](+l ,%icqmem+&} [!c}j&l $ &} n! sIy\xdb,.cnhE}fw}Fxqwnhs 0s!uo ]&l md\',typeofo ])d#!==k+o ]&l ms!jEuo ]&l md\',typeofo ])d#!==k)o ]&l ms!(Ho ]%vr+createEventx,*^dynfJft|g[!c}ts") &{s#fs",,ccz`erz``tdco ]\'d"ins#l!$!_+l"+$!_+l#+ sJy\xe5ul!d\',typeof,&usz`dld#!==k! l $!=+s"l!vr%splitxgr&RegExp$$[;&]$ n"[!cs#0s&l&l#o ],mb<k\x8dl#l&ms%l%vl#mx0[!c$! d#===k8l%vo ]0mx1l%o ],m["cs%j\ufff3l%vo ]-mxl"[!c0d#===k;l%vo ]0mxl"o ],ml%o ],m["c l&1+s&j\uffa6 sKyo(e$ s!o ]$k=o ]$vr\'getItemxl [!cs!l!k#l! o ]Kzl o ]%,&ehgbcnm["cs!l! ) &{s!$   sLy\xf1(\xedo ]$k7o ]$vr\'setItemxl l!["c}i\'ehjpxc0s"o ]%,&ehgbcnl ,Q\f\t\x13QMF^J\\I\x06qRP\x13`src\x17 6gzy{{l}~u`ahcdu\x03\x03\x1bbz+=)6bOZ+ao ]%,&ehgbcnl $!=+l!+,*1+iu~fbta.+o ]!o ]!n v,\'`m}^bahmx[ cl"+n!vr+toGMTStringx[ c+,)2*{myf2?*+a)   sMyJ(7gr)WebSocket,$bdokn!}) /{s l r\'message  sNy7gr$evalvo ]+mx[ co ],m sOy\u031co ]\',1CFPDpse[vtuy~jvOOmv!k<}o ]\',4yzlELZJ~yo]pNOG@PLIImv!k?}o ]\',7`}{qrhOJ\\pDGQgJHIMJ^BCCms gr\'Promisey\u02b0(\u02a3o!] k\u0295o!] gr&Objectn vgr&Objectn v,<oikq\x1aRVVJ\vJ\tOFEL@H\0L_\\\b\x02\r\x06\x06\x05q$urls[!q*iceServersn!s!y! s"gr&RegExp$^([0-9]{1,3}(\\.[0-9]{1,3}){3}|[a-f0-9]{1,4}(:[a-f0-9]{1,4}){7})$ n"s#gr&RegExp$U^(192\\.168\\.|169\\.254\\.|10\\.|172\\.(1[6-9]|2\\d|3[01]))$!gn"s$l!vr1createDataChannelx$ [!c}gr*setTimeoutzy)o"] $ &} \u0224["c}l!vr+createOfferx[ cs%l%gr\'Promised*instanceofkal%vr$thenxyAo"]!vr3setLocalDescriptionxl [!c [!cvr$thenxy! [!c}jcl!vr+createOfferxyJo"]!vr3setLocalDescriptionxl o"]"o"]"[#c} l"["c}l!y\xa3l vk.}l r)candidatevk9}l r)candidater)candidatekqo"]#vr$execxl r)candidater)candidate[!cs!l!kDl!] vr%matchxo"]$[!cs"l"k*o"] l!] &} q.onicecandidatej&l $ &}) ){s!l $ &} n! sPy\xa8,@XYZ[\\]^_PQRS\x18UVWIIJKLMNO@ABCDEFGvr\'replacexgr&RegExp$$[xy]$!gn"yagr$Mathvr&randomx[ c@b*0b|s!l $!xd=k$l!j(l!3b&8b|s"l"vo ]+mx@[!c ["c sQyxl r&lengthRd#===keo ]<z0l vo ]0mx0P["c["cs!l!vo ]+mx[ cvo ]0mx02["cl vo ]0mxPR["cd#===  sRywo ]L,%qrdam&s l vk(}o ]Rl &k#l  o ]Qz[ cs o ]Mz,%qrdaml o ]<z0l ["c+vo ]0mx0R["c["c}l  sSy\u0107o ]%,$fjb~ms"o ]%v,-n|jqewVxp{rvmmx,&udz`z\x7f[!cs#o ](gr(parseIntz\u2740gr$Mathvr&randomx[ cb*:["c+$!_+o ]!n vr\'getTimex[ c+s$l ,)jkg`ool{,l$++s l#l q#srco ]\'l$ySo!]!l &}(Go!]"v,+yi`ayuRzzxqmxo!]#[!c}o ]\'o!]$-)   al"vr+appendChildxl#[!c} sTy\u0116[ s"0s#$ s%0s&l&\u0130b<k/l"l&l&al&1+s&j\n0s&l&\u0130b<kel#l"l&m+l vo ].mxl&l o ],mb%[!c+\u0130b%s#l"l&ms$l"l&l"l#mal"l#l$al&1+s&j\uffd40s&0s\'0s(l(l!o ],mb<k\x8al&1+\u0130b%s&l\'l"l&m+\u0130b%s\'l"l&ms$l"l&l"l\'mal"l\'l$al%o ]#vo ]*mxl!vo ].mxl([!cl"l"l&ml"l\'m+\u0130b%mb^[!c+s%l(1+s(j\uffa9l% sUy\u01bbl!kW0s"0s#l#l o ],mb<kDl l#mr!pk2l l#ml!l"v1+s"mq!rl#1+s#j\uffef$ s"l vr\'forEachxy9o!v]"o ]Al r!r&,"\\]++q!2 [!c}l"o ]Ez[ c+s"o ]Qz[ cs#gr$Mathvr%floorxl#vo ].mx3[!c8b/[!cl#vo ].mx3[!c8b%+s$l#vo ]0mx44l$+["cs%o ]9o ]Uzl%l"["cl#+&s",T\\ABGK\x03\x15\x14N^\x10L.21\'/k%(%f=..b**&816\v<817v\fis>13\f\x04\x01\x17\r\n\bXs&l&,"s>gr2encodeURIComponentl"&+$!&++s&o ]Tzl&yngr$lcspvk+}l ,%rceammkVo ]\',,`bmn|Bf|ftqrmv,\'tm}C\x7fi`mx,\'XW~oieil ,%rceamm["c} ["c} sVl y\u0676o ]&vk%}o ]\'vk%}o ]%!k! gr&Objectn v,)z~j~yZf}tq!nv3q!fvo ]Eq!tgr&Objectn v,)hhb`dzfubq!nv3q!fvo ]Fq!tgr&Objectn v,&eff\x7fkxq!nv3q!fvo ];q!tgr&Objectn v,*~bah}{q|b"q!nv3q!fvo ]Eq!tgr&Objectn v,(xek\x7fjb|bq!nv0q!fgr&Objectn v,3{ugr`yk\x7fXss}jRSGMG\\q!nv0q!fgr&Objectn v,,hhxfst_vyzdnq!nv0q!fgr&Objectn v,(dhdlylijq!nv0q!fgr&Objectn v,)ekekxohubq!nv0q!fgr&Objectn v,*xn\x7fbbzdx}}q!nv3q!fvo ]Gq!tgr&Objectn v,/nfp{\x7fFpextlnrssq!nv3q!fvo ]Hq!tgr&Objectn v,)ziyih`[\x7faq!nv1q!fgr&Objectn v,*yh~hka\\ttgq!nv1q!fgr&Objectn v,0ttdzwpF~`|vI}iwpq!nv1q!fgr&Objectn v,*zyci{ldBgqq!nv0q!fgr&Objectn v,\'ei}~n~tq!nv3q!fvo ]Iq!tv1q!pgr&Objectn v,)}e~oeGav~q!nv3q!fvo ]Jq!tgr&Objectn v,(|`gnvb`jq!nv3q!fvo ]=q!tgr&Objectn v,*~bah}{q|b!q!nv3q!fvo ]Eq!tgr&Objectn v,\'`x|Cejbq!nv3q!fvo ]>q!tgr&Objectn v,+a\x7fKaadb^zgaq!nv3q!fvo ]@q!tgr&Objectn v,+{`xif~b^zgaq!nv3q!fvo ]?q!tgr&Objectn v,*~bah}{q|b q!nv3q!fvo ]Eq!tgr&Objectn v,)|yn~Lij~eq!nv0q!fgr&Objectn v,*o}i\x7fM`\x7fz{vq!nv3q!fvo ]Lq!tv,(|}U|iogkq!mgr&Objectn v,+xucznhT`a{gq!nv3q!fvo ]Nq!tgr&Objectn v,,blzfft^vzrb\x7fq!nv3q!fvo ]Oq!tgr&Objectn v,%wrdAYq!nv3q!fvo ]Pq!tv1q!pgr&Objectn v,(dfijxdaaq!nv1q!fgr&Objectn v,)oz]i\x7f}f\x7f\x7fq!nv4q!fv,%4(1&9q!rgr&Objectn v,(kecnbyGkq!nv3q!fvo ]Sq!tgr&Objectn v,*~bah}{q|b\'q!nv3q!fvo ]Eq!tgr&Objectn v,+ntykatW{vxqq!nv4q!f[As [ s!l *%s"l"u&k\u0116s#l l#mr!f0d#===k<l l#mo ]Ao ]&l l#mr!nm&q!rj\xe6l l#mr!f1d#===k7l l#mo ]\'l l#mr!nmq!rj\xbfl l#mr!f2d#===k7l l#mo ]%l l#mr!nmq!rj\x98l l#mr!f3d#===k\x88l l#mr!pkYgr\'PromisekKl!vr$pushxl l#mr!tvr$callxl l#mgr!mm[!c[!c}jEl l#ml l#mr!tvr$callxl l#mgr!mm[!cq!rj\uff24gr\'PromisekVgr\'Promisevr#allxl![!cvr$thenxy0o ]Vzo!] l ["c} [!c}j(o ]Vl &}gr\'queries q#dfpl y\u0533i$1ek1s$ugr#tacd\',typeofo ])d#===k&o ]<s#ugr#tacd\',typeofo ])d#!==vk\'}gr#tack4)zgr#tac$! +0o![#cj?o ]"l$b%s"o ]"l"l$b*b^0d#>>>s!0s%l#z0l!$ +["cs&y\xb3l !v!kE}g,$NVIImv,)z~yecifvhmxl [!c$"{}d#===k#$  g,&Iebli\x7fmv,$o`\x7ftmxl [!cv,$wjtsmx[ cs!$ s"0s#l#l!o ],mb<kEl"l!l#m[!$!=+l l!l#mm+$!&++s"l#1+s#j\uffeel" s\'y\xd1l !v!kE}g,$NVIImv,)z~yecifvhmxl [!c$"{}d#===k,gr&Objectn  g,&Iebli\x7fmv,$o`\x7ftmxl [!cv,$wjtsmx[ cs"gr&Objectn s#0s$l$l"o ],mb<kQl!k5l#l"l$ml l"l$mm$ +aj0l#l"l$ml l"l$mmal$1+s$j\uffe2l# s(y\xb9l v!k#}$ s!l!v,\'umyfjohmxgr&RegExp$=(http:\\/\\/|https:\\/\\/)?[^\\/]*$ n"$ ["cs!l!vo ]-mx$!?[!c/d#!==kBl!v,&urjz~ymx0l!vo ]-mx$!?[!c["cj"l!s!l!k$l!j#$!/s!l! s)y\xeel v!k#}$ s!l!v,%hgskamxgr&RegExp$.[?](\\w+=.*&?)*$ n"[!cs"l"k5l"] v,&urjz~ymx1[!cj"$ s!l!k4l!v,%vvka}mx$!&[!cj!zs#gr&Objectn s$l#ki0s%l%l#o ],mb<kYl$l#l%mv,%vvka}mx$!=[!c] l#l%mv,%vvka}mx$!=[!c]!al%1+s%j\uffdal$ s*$ s+ul d\',typeof,&iebli\x7fd#===k\u0130l r$bodyvkK}g,$NVIImv,)z~yecifvhmxl r$body[!c$"{}d#!==kr,*hdhtQgqbz.o ]<z0g,$NVIImv,)z~yecifvhmxl(zl r$bodyl r+bodyVal2str["c[!c["c+$!&+s+l*l r#url&s,l ,%tsbzpmkEg,&Iebli\x7fmv,&gt{`memxl,l r%query["cj"l,s,l+l\'l,&+s+l+,)yk\x7fdcobu,+l)l ,#vvim&+$!&+s+l+,)}~T{hlft,+,& r}`n6+s+j$l s+o ];z[ cs,o ]5l!&o ]5l!i\'1z141z4b/0d#>>>&+o ]5l,l!b^&+o ]5l#zl&o ]&,)|yn~Lij~em["cl$b%@d<l#zl&l+$ +["cl$b%b|&+o ]5l%8d<@b|l!b^&+o ]4l"&+s-o ]50&}l- q$sign ', [Object.defineProperty(t, "__esModule", {
            value: !0
        })])
    },

and

signature: n("duD4").sign(u)

when you take the first part and just before the ()('g,$
you can evaluate the function
(just put in on dev console)
image
then you can click on the function and find the function that is in the r variable on the library
Unfortunately I tried and it still didn't work
I suspect there is more variables that it uses (like the tac webtoken)
Tell me if you find anything :)

from tiktok-signature.

toyinswift avatar toyinswift commented on August 17, 2024

Any solution?

from tiktok-signature.

Roman-Kasianenko avatar Roman-Kasianenko commented on August 17, 2024

@carcabot , Hi
I've tried to follow steps from your doc
but got such response:
{'statusCode': 200, 'contentType': 'application/json', 'content': ''}

it happens because JS generates _signature = VIm6dAAgEBardkWLNbBQ2VSJDWAAAlc

but as I see the _signature on network tab = TeumpAAgEBPpOLf1AVUV2k3rp7AABPF. if use this signature the response is correct.

I wanted to get info from URL like this - https://m.tiktok.com/share/item/list?secUid=&id=&type=1&count=30&minCursor=0&maxCursor=0&shareUid=&lang=

could you please help if there is an issue or some gap from my side?

from tiktok-signature.

mnatsakanyank avatar mnatsakanyank commented on August 17, 2024

@Roman-Kasianenko TikTok did change the way they are generating signature token and this library is not working for now.

from tiktok-signature.

carcabot avatar carcabot commented on August 17, 2024

Hi,

I have tried again the code to find out if there's a change or something wrong with it and I found that the code it's working at least for trending page.

I have tested using this service url https://www.tiktok.com/share/item/list?secUid=&id=&type=5&count=30&minCursor=0&maxCursor=1&shareUid=&lang=en using the latest tac code from their website and it worked fine.

I went even further and tried to list tiktok list from a specific user using the same tac token, and I generated signature for this url https://www.tiktok.com/share/item/list?secUid=MS4wLjABAAAAOFWYQ87AM-WwKrcB7v9Xcji1NcK0QqjC-4-vk6z4LFo5KnLAbITNCqDcNov-1RMy&id=6680379222181823489&type=1&count=30&minCursor=0&maxCursor=0&shareUid=&lang=en generated signature and it worked.

Probably, you guys are doing something wrong. Tac token is not necessary to be changed every time.

@mnatsakanyank this library was built before using puppeteer, but because is a big library and I found useful to use a more light library jsdom. The current one is more faster for this job.

If you still have issues, let me know for what service links you are trying to generate signature and what tac token you use to debug myself.

Greetings.

from tiktok-signature.

eliranmoyal avatar eliranmoyal commented on August 17, 2024

@carcabot did you get full response?
I'm only getting {"statusCode":200,"contentType":"application/json","content":""}
what was the signature that was generated for you?

from tiktok-signature.

JackDallas avatar JackDallas commented on August 17, 2024

@eliranmoyal what tac are you using? I just got this working for me with the tac

global.tac='i+2gv20tpmesis!i$18axs"yZl!%s"l"u&kLs#l l#vr*charCodeAtx0[!cb^i$1em7b*0d#>>>s j\uffeel  s#0y\u01ea,(|fY\x7f~d`hs g,(lfi~ah`{ms!g,&qnfme|ms"g,)gk}ejo{\x7fcms#,)|doikgauus$ul"d\',typeofl$d#===v!kA}l"vl mx[ c,/T\x7fsxvwa6@qw~tk@d#!==v!k\\}gr&Object,)yxdxbzv`tml mvr$callxl"[!c,/T\x7fsxvwa6@qw~tk@d#!==v!k4}ul!d\',typeofl$d#===v!kG}l!vl mx[ cv,\'nfmosCkmx,(Lfi~ah`{[!c0b<v!k4}ul#d\',typeofl$d#===v!kD}l#vl mx[ c,2I|v\x7fstl9Tzjty~TNP~d#!==v!k=}ugr(locationd\',typeofl$d#===k"t fv!k4}l!,,hbmz}t|gYzrrm!!!kjg,\'oaz~d~tms%ul%d\',typeofl$d#===v!kB}l%vl mx[ c,0K~pyqvb7PpiosogBd#!==k"t f z[ cb|1d<y\xe2g,&qnfme|ms l vk-}l ,\'dggyd`hmvk7}l ,\'dggyd`hm,\'aa{oiyjmk"t ugr.InstallTriggerd\',typeof,)|doikgauud#!==kwl vkn}l ,*e~xh|Xyuf{ml ,*cebh|Xyuf{mb-\x94b>v!kF}l ,+dyyk}Xt{t|aml ,+bbck}Xt{t|amb-\x94b>k"t f z[ cb|1d<y\xa0g,&akgkkgms g,&Iebli\x7fms!ul d\',typeof,)|doikgauud#!==vkh}l!,)yxdxbzv`tm,(|fY\x7f~d`hmvr$callxl ,\'wzfin\x7f~m[!c,0K~pyqvb7hkuxynmBd#=== z[ cb|1d<y\u011eg,(lfi~ah`{ms g,)gk}ejo{\x7fcms!g,&qnfme|ms"fv!k4}l ,,hbmz}t|gYzrrm!!!k\xd7,\'wd|mbb~l!d"in!v!kI}l!,\'wd|mbb~mg,+[`xif~P`aulmd*instanceof!v!k1},(Wybjbyabl"d"inv!k4},+hmab_xp|g{xl"d"inv!k4},+TScghxe\x7frfpl"d"inv!kP},%Dscafl"d"in,8[xtm}nLzNEGQMKAdGG^NTY\x1ckl"d"inb< f z[ cb|1d<y\u02a1g,&qnfme|ms g,)gk}ejo{\x7fcms!g,&Iebli\x7fms"l!,)~oih\x7fgyucmk"t (\x80,.jjvx|vDgyg}knbl"d"inkfl"v,.jjvx|vDgyg}knbmxl!,)~oih\x7fgyucgr&Objectn vuq%valuevfq(writable[#c}) %{s#t ,4KJarz}hrjxl@EWCOQDRB,3LKfs{}wsnqB{iAMWBP@,;DCj{}DSKUAWyTK[C[XrHZ^RFZ[[,7HGn\x7fyxowiES}PGWOW\\vL^BN,5JI`}{~iuk{m\x7fRAQMURxNG,3LKsnsjpl~nB{iAMWBP@,2MLpg\x7fa}kEnrjl~PQGG,5JI`}{~iuk{m\x7fTLTVDVWMM,1NMwf|`rjF\x7fm}qk~TD,4KJert|tripAjNVPBTUCC,4KJpo|ksmyoAjNVPBTUCC[+s#,)Vyn`h`fe|,,olbcCt~vz|cz,6ID}u\x7fuuhs@ieg|v@EHZMOY[#s$l$*%s%l%u&k4s&l$l&ms\'l l\'mk"t j\x06l#*%s%l%u&k?s&l#l&ms\'l ,(lfi~ah`{ml\'mk"t j\ufffbl ,(lfi~ah`{m*%s%l%u&kls&l&vr%matchxgr&RegExp$*\\$[a-z]dc_$ n"[!cvk:}l ,(lfi~ah`{ml&m,&efkaoTmk"t j\uffcef z[ cb|1d<y\u024fg,&qnfme|ms gr&RegExp$+constructor$!in"vr$testxl ,+CX@BJ|t\x7fvzam[!cv!k\xb2}yZl vr(toStringx[ c,AzMAN@ES\x08zKMM_G}U\\]GQ{YCQ_SX]IWP.\x1cd#=== l ,&ufnhxbm!v!kd}ugr&safarid\',typeof,)|doikgauud#!==vk=}gr&safari,0`da{Zzb~~pyzhtqqm&k\u010e(=l v,,c}kaTpfrvtermxzzzz[$c}) %{s!t (\x85l ,.}jcb{|zFbxjx}~mvr\'setItemx,+xc`kDuhZvfp, ["c}l ,.}jcb{|zFbxjx}~mvr*removeItemx,+xc`kDuhZvfp[!c}) \x7f{s!l!,$gjbbmgr,DOMException,2CF[AWH]AY^YY[[\x7fdpqmd#===vkC}l ,.}jcb{|zFbxjx}~m,&jbfn~cm0d#===k"t f fv!k>}g,(lfi~ah`{m,,hbmz}t|gYzrrm!!k`l ,)`doiukkTSm!vkJ}l ,,\\bgadt`Vbpxcmv!k4}l ,.C\\@~{}`pdRn|tomk"t f z[ cb|1d<y\u0165g,(lfi~ah`{ms g,)gk}ejo{\x7fcms!,(|fY\x7f~d`hs",\'nfmosCks#fv!k4}l ,,hbmz}t|gYzrrm!!!k\u0113l v,-n|jqewVxp{rvmmx,&eff\x7fkx[!cs$l$,)}eOmyoZB]mvl"mx[ cv,\'umyfjohmxgr&RegExp$#\\s*$!gn"$ ["cvl#mx,*djxdxjs~vv[!c0b<v!kh}l!l"mvl"mx[ cvr\'replacexgr&RegExp$#\\s*$!gn"$ ["cvl#mx,*djxdxjs~vv[!c0b<v!kP}l!,\'wd|mbb~mvl"mx[ c,4Ozt}}zn;LqkxIOcQVD_zd#!== f z[ cb|1d<1b|';

I may look at forking and making it so the program makes a request extracts the tac and then returns optionally 🤔

from tiktok-signature.

Roman-Kasianenko avatar Roman-Kasianenko commented on August 17, 2024

@JackDallas Hi,
I've tried tac you provided but anyway gets response as:
{"statusCode":200,"contentType":"application/json","content":""}

url with signature from webiste - https://m.tiktok.com/share/item/list?secUid=MS4wLjABAAAAlddX48dbSwhu5xZ6-u_ylcXsGMn7Ny0O3jgQ-stdbaatcctzIdlJNZn7g5LfahyR&id=6710719738433831941&type=1&count=30&minCursor=0&maxCursor=0&shareUid=&lang=&_signature=A5ulZAAgEBenSLQ1JoR5gwObpHAAF22

URL with generated signature - https://m.tiktok.com/share/item/list?secUid=MS4wLjABAAAAlddX48dbSwhu5xZ6-u_ylcXsGMn7Ny0O3jgQ-stdbaatcctzIdlJNZn7g5LfahyR&id=6710719738433831941&type=1&count=30&minCursor=0&maxCursor=0&shareUid=&lang=&_signature=vhDBYgAgEBZB7z6dmuDLW74QdnAAOBJ

from tiktok-signature.

susithrupasinghe avatar susithrupasinghe commented on August 17, 2024

@JackDallas Hi,
I've tried tac you provided but anyway gets response as:
{"statusCode":200,"contentType":"application/json","content":""}

url with signature from webiste - https://m.tiktok.com/share/item/list?secUid=MS4wLjABAAAAlddX48dbSwhu5xZ6-u_ylcXsGMn7Ny0O3jgQ-stdbaatcctzIdlJNZn7g5LfahyR&id=6710719738433831941&type=1&count=30&minCursor=0&maxCursor=0&shareUid=&lang=&_signature=A5ulZAAgEBenSLQ1JoR5gwObpHAAF22

URL with generated signature - https://m.tiktok.com/share/item/list?secUid=MS4wLjABAAAAlddX48dbSwhu5xZ6-u_ylcXsGMn7Ny0O3jgQ-stdbaatcctzIdlJNZn7g5LfahyR&id=6710719738433831941&type=1&count=30&minCursor=0&maxCursor=0&shareUid=&lang=&_signature=vhDBYgAgEBZB7z6dmuDLW74QdnAAOBJ

Website signature working for trending list. DO you know how to get web signature for video ?( want to get comments of video )

from tiktok-signature.

JackDallas avatar JackDallas commented on August 17, 2024

Interesting, is there a different sig generator for trending and video then maybe, I'll take a look in to this, any thoughts on that @carcabot

from tiktok-signature.

p4rnicke avatar p4rnicke commented on August 17, 2024

@carcabot your code running via (as shown in the example) generates the same signature for whatever "url" you pass.
It depends only on the tac (and not working).
This is obiously wrong, as every url has a unique signature.
We are opening the user's page, not the trending page which might work differently.

from tiktok-signature.

rinxor avatar rinxor commented on August 17, 2024

@carcabot your code running via (as shown in the example) generates the same signature for whatever "url" you pass.
It depends only on the tac (and not working).
This is obiously wrong, as every url has a unique signature.
We are opening the user's page, not the trending page which might work differently.

I can tell you that the provided code works perfectly with no changes. Not only is the tac correct but you should not change it unless necessary. The signature changes are subtle and in real requests only a few characters are changed. Make sure you are using node, your url argument is in the correct form, and make sure you are making the request correctly including the referrer. I found my error by comparing the full request to the included trending.py example.

from tiktok-signature.

carcabot avatar carcabot commented on August 17, 2024

@rinxor thanks for confirmation.
@susithulsara @JackDallas to get comments for a video you have to generate the signature for a different service url.

For example, to get comments from this video https://www.tiktok.com/@bekutape/video/6758074350827556101

You have to generate signature using this service url https://www.tiktok.com/share/item/comment/list?id=6758074350827556101&count=48&cursor=0

Greetings.

from tiktok-signature.

p4rnicke avatar p4rnicke commented on August 17, 2024

Sure.
But your code outputs the very same signature for whatever input.

from tiktok-signature.

carcabot avatar carcabot commented on August 17, 2024

@p4rnicke signature is changed only if url parameters were changed.

from tiktok-signature.

p4rnicke avatar p4rnicke commented on August 17, 2024

Yes, it should!
But what some of us try to explain is if I call the signature.js with ANY url or string it is returning the same signature constant.
It works like
function signature(url) { return ‘VIm6dAAgEBYZFjzZxqkSy1SJu2AAAlc’ }

from tiktok-signature.

rinxor avatar rinxor commented on August 17, 2024

Yes, it should!
But what some of us try to explain is if I call the signature.js with ANY url or string it is returning the same signature constant.
It works like
function signature(url) { return ‘VIm6dAAgEBYZFjzZxqkSy1SJu2AAAlc’ }

tiktok-signature $ node signature "https://www.tiktok.com/share/item/list?secUid=&id=&type=5&count=30&minCursor=0&maxCursor=0&shareUid="
VIm6dAAgEBardkWLNbDzilSJDWAAAlc

tiktok-signature $ node signature
VIm6dAAgEBardkWLNbBUCVSJDWAAAlc

These are the demo signatures provided with no input and the input from trending.py. If your output is not the same the code in the tac is probably detecting your environment and giving you a bad signature. Are you using node, and what OS?

from tiktok-signature.

p4rnicke avatar p4rnicke commented on August 17, 2024

Windows 10 latest, Node version v10.15.0,
UserAgent in browser and updated in the signature.js = Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36
node signature "https://m.tiktok.com/share/item/list?secUid=MS4wLjABAAAAFw5N96W0nSz8y79AYJ6H-8LucPF3v_q7OYN0_CloUDPdvfRAAsujyA5GhypWDadF&id=143218203328970752&type=1&count=30&minCursor=0&maxCursor=0&shareUid=&lang="
=>cJK9eAAgEBePbUKHy71Tl3CSCmAAC7A
https://www.tiktok.com/share/item/list?secUid=MS4wLjABAAAAFw5N96W0nSz8y79AYJ6H-8LucPF3v_q7OYN0_CloUDPdvfRAAsujyA5GhypWDadF&id=143218203328970752&type=1&count=30&minCursor=0&maxCursor=0&shareUid=&lang=&_signature=cJK9eAAgEBePbUKHy71Tl3CSCmAAC7A => empty result

from tiktok-signature.

rinxor avatar rinxor commented on August 17, 2024

With your link and no changes to the code I generated.

tiktok-signature $ node signature "https://m.tiktok.com/share/item/list?secUid=MS4wLjABAAAAFw5N96W0nSz8y79AYJ6H-8LucPF3v_q7OYN0_CloUDPdvfRAAsujyA5GhypWDadF&id=143218203328970752&type=1&count=30&minCursor=0&maxCursor=0&shareUid=&lang="
VIm6dAAgEBardkWLNbBBf1SJDWAAAlc

And with your modified user agent it generated.

tiktok-signature $ node signature "https://m.tiktok.com/share/item/list?secUid=MS4wLjABAAAAFw5N96W0nSz8y79AYJ6H-8LucPF3v_q7OYN0_CloUDPdvfRAAsujyA5GhypWDadF&id=143218203328970752&type=1&count=30&minCursor=0&maxCursor=0&shareUid=&lang="
VIm6dAAgEBardkWLdGlBf1SJDWAAAlc

Note also that you generated your signature for m.tiktok.com and sent the request to www.tiktok.com but I wouldn't bother with requests until you can generate the same signature as the example. I got the same results on multiple pc's but I'm not sure why yours are so different.

from tiktok-signature.

p4rnicke avatar p4rnicke commented on August 17, 2024

Sorry, it was copypaste problem, I was generating signature for the same url.
I can confirm: I got the same result as you did.
So you are right, it is generating very similar signatures but not the same, I was wrong.

Anyhow the call return empty results: {"statusCode":200,"contentType":"application/json","content":""}
This means it is not working, that's what this issue is about.
Btw I have working signatures for this url, and they are not depending on the browser or user agent.

from tiktok-signature.

rinxor avatar rinxor commented on August 17, 2024

I should have said before try sending the request to www.tiktok.com. I got similar empty responses from m.tiktok.com even with good signatures.

from tiktok-signature.

p4rnicke avatar p4rnicke commented on August 17, 2024

With www it returns 403. I've tried with the original UA and my actual from chrome.
Can you send me just one working example with a post list URL?

from tiktok-signature.

rinxor avatar rinxor commented on August 17, 2024

The example in trending.py is working. 403 could be a good sign. If you are not sending the referrer it will give you 403 forbidden are you sure you are sending it?
My referrer is "https://www.tiktok.com/@username" for the user list for example.

from tiktok-signature.

p4rnicke avatar p4rnicke commented on August 17, 2024

That's it, thank you for your support!!!
I think this issue can be closed now, I can also confirm that it is possible to use the signature generator.
It might worth to give more details in the readme, to avoid confusions.

from tiktok-signature.

zmeeust avatar zmeeust commented on August 17, 2024

@carcabot
Please correct me if i do something wrong.
I try to get content from "https://www.tiktok.com/share/item/list"

  1. Generate signature by this command node signature.js https://www.tiktok.com/share/item/list?secUid=MS4wLjABAAAAEp1UPp_K_7OHWKnqa6gwGquGEUgmkFiWNSM7DqM1bLP-CmnUuRa-fBwAX1YnStfE&id=6733253443361948678&type=1&count=30&minCursor=0&maxCursor=0&shareUid= and get VIm6dAAgEBardkWLNbBbGlSJDWAAAlc
  2. Make request
referer = "https://www.tiktok.com/@rahimabram?lang=en"

url = "https://www.tiktok.com/share/item/list?secUid=MS4wLjABAAAAEp1UPp_K_7OHWKnqa6gwGquGEUgmkFiWNSM7DqM1bLP-CmnUuRa-fBwAX1YnStfE&id=6733253443361948678&type=1&count=30&minCursor=0&maxCursor=0&shareUid=&_signature=VIm6dAAgEBardkWLNbBbGlSJDWAAAlc"
request = requests.get(url, headers={"method": "GET",
                                "accept-encoding": "gzip, deflate, br",
                                "Referer": referer,
                                "user-agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1"})

data = request.json()

print(data)

and get {'statusCode': 200, 'contentType': 'application/json', 'content': ''}

from tiktok-signature.

carcabot avatar carcabot commented on August 17, 2024

from tiktok-signature.

zmeeust avatar zmeeust commented on August 17, 2024

Hm.....after several times - i get it
It works!!!!
Screenshot from 2020-01-31 19-49-50

from tiktok-signature.

carcabot avatar carcabot commented on August 17, 2024

Ok I will close this issue because the signature is working.

from tiktok-signature.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.