[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip / qa] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/wsr/ - Worksafe Requests


Thread archived.
You cannot reply anymore.


[Advertise on 4chan]


File: snowflake.png (71 KB, 700x365)
71 KB
71 KB PNG
ENT1yWWhLL-Qz9mK


https://en.wikipedia.org/wiki/Snowflake_ID

Previous:
>>1258605
>>>/g/88766257
>>
bump
>>
Why did you create a new thread, when the old one hasn't died yet.
>>
bump
>>
>>1265094
>>
>>1265094
>>
>>1265094
>>
This is your 4th thread in /wsr/ asking this, no one cares just like they didn't care in the /g/ thread. Go ask reddit for this
>>
>>1270245
prove it ;-)
>>
>>1270247
Prove what? That no one cares? This whole thread proves that, you made a new one because no one cared about the other one
>>
>>1270251
I killed the other one to add more details.
Meds.
Once the code is cracked sauce will flow.
>>
>>1265094
>>
>>1265094
>>
>>1265094
>>
>>1265094
>>
>ENT1y...
that doesn't even look like a snowflake.
>>
>>1271821
What's it look like then?
>>
>>1271825
No clue, but a Snowflake is just a long number, not a string of letters and digits. Who told you it's a Snowflake?
>>
>>1271885
The image URL is base64 encoded bytes, a string of letters and digits. But, it's still a snowflake and can be decoded.
>>
>>1265094
>>
>>1263648
where did you get this?
I don't know what that it but it's larger than 64 bits

I guess it's a start, you can try to find an online base64 decode to decode your string and plug the result in this.
You are looking for obtaining a date out of your string?
[code]
perl -MTime::Piece -E '
$num=shift//exit;
($millisec)=sprintf("%064b\n", $num) =~ /^(.{42})/;

$decimal=eval qq{0b$millisec};
$epoch=$decimal+1420070400000;
$datetime=gmtime($epoch/1000)->datetime;

say "millisec\t$millisec";
say "decimal\t\t$decimal";
say "epoch\t\t$epoch";
say "datetime (GMT)\t$datetime"
' 175928847299117063

millisec 000000100111000100000110010110101100000100
decimal 41944705796
epoch 1462015105796
datetime (GMT) 2016-04-30T11:18:25
[/code]
>>
>>1272822
Which part?
And yeah, that doesn't line up with anything. The post is from Aug 29, 2022
>>
>>1272833
>Which part?
which part what? where to "plug it in" you mean?
>>
>>1272835
was referring to
>where did you get this?
>>
>>1272836
this
ENT1yWWhLL-Qz9mK
you want to obtain the fields
internal worker id, internal process iD, and the rightmost one, right? since you already have the date

do you have the time which goes with the date? like hour+min+sec + relative to the timezone
i've tried to decode it knowing its base64 but when I used the resulting value in my little program, it outputed ridiculous date.
So if you hade like all the fields, as is shown in the picture :
2016-04-30 11:18:25.796 UTC
I could have tried to reverse the conversion to obtain the 64 bits number, and then encode it to see if it matches your original
ENT1yWWhLL-Qz9mK
>>
>>1272838
by bruteforcing, meaning trying this for all the numbers that you don't have (eg milliseconds)
>>
>>1272838
https://twitter.com/i/status/1564387311491629059
and https://video.twimg.com/ext_tw_video/1564378065198882816/pu/vid/960x720/ENT1yWWhLL-Qz9mK.mp4

You can see two *regular* snowflakes.
They seem miss-matched, but, the media gets an ID when it's uploaded and the status is when it's posted.

If it's like the image encoding, there should be some lost information, but that's OK.
>>
>>1272841
this
>https://twitter.com/i/status/1564387311491629059
outputs
datetime (GMT) 2026-10-26T21:16:39
and this
>https://video.twimg.com/ext_tw_video/1564378065198882816/pu/vid/960x720/ENT1yWWhLL-Qz9mK.mp4
outputs
datetime (GMT) 2026-10-26T20:39:55
is that what you wanted ?
>>
File: .png (42 KB, 689x526)
42 KB
42 KB PNG
>>1272841
As an example, Feu10U_UAAAJUZM.jpg would decode like in the pic. Since it's bit shifted to produce the b64 garbage string then back. Only, it works.
Starting to see why this would be useful?
>>1272843
Just doesn't make sense. Those are very wrong also.
1564387311491629059 -> 2022-08-29T22:59:34.627Z
1564378065198882816 -> 2022-08-29T22:22:50.139Z
>>
>>1272841
wait
that's the fullouput, I added the 64 bits above
>https://twitter.com/i/status/1564387311491629059
>1564387311491629059
64bits 0001010110110101110100011111100010101000100101100100000000000011
millisec 000101011011010111010001111110001010100010
decimal 372978999970
epoch 1793049399970
datetime (GMT) 2026-10-26T21:16:39

internal worked ID -> 01011
internal process ID -> 00100
the right most one -> 000000000011

>https://video.twimg.com/ext_tw_video/1564378065198882816/pu/vid/960x720/ENT1yWWhLL-Qz9mK.mp4
>1564378065198882816
64bits 0001010110110101110010011000111111010110100101111010000000000000
millisec 000101011011010111001001100011111101011010
decimal 372976795482
epoch 1793047195482
datetime (GMT) 2026-10-26T20:39:55

internal worked ID -> 01011
internal process ID -> 11010
the right most one -> 000000000000
>>
>>1272844
>Starting to see why this would be useful?
no I don't follow you
>>
File: .png (236 KB, 817x317)
236 KB
236 KB PNG
>>1272849
.
>>
>>1272851
damn I see, we could potentially find the tweet from which a picture or media is from, very nice

the little program that I made do what the diagram does, and the date that the progam produce match the output of the diagram, which makes me think I've implemented it correctly
so maybe it is incomplete idk
>>
>>1272844
>Since it's bit shifted to produce the b64 garbage string then back. Only, it works.
What did you mean by this?
>>
File: .png (12 KB, 489x133)
12 KB
12 KB PNG
>>1272862
There are a few bytes at the end that are extra and don't fit the snowflake format.

I misspoke a bit since I was looking at my code from when I was trying to figure out the range I needed to search for. Oops.
>>
>>1272883
So have you solved it yet?
I made my own base64 url decoder looking at the RFC to make sure I was using the right function.
I've found a few articles on snowflake ids but haven't read them yet.
It's a serious brainfuck, and I haven't found anywhere something written that saying the the weird title of the image/video of a tweet is actually the base64 of the tweet's snowflake.

It definitely feels like something is missing.
>>
File: .png (34 KB, 334x334)
34 KB
34 KB PNG
>>1273205
Nope, still only know how to decode the image url.

The image thing is not actually documented anywhere.
https://twittercommunity.com/t/media-key-url-base64-snowflake-what-is-a-media-key-made-of/129194

Maybe it's completely unrelated data that happens to be encoded similarly... who knows.
Dunno why they would do that though.
>>
>>1273211
Ok anon, I've found something.
In the diagram of your thread post, they say that the upper 42 bits (and on the original webpage it is from) is the timestamp of the tweet (in milliseconds), but relative to the 01/01 of 2015, and not relative to 01/01 of 1970 like unix epoch is.
That's why it says to add 142....
But i've remarked that there was a lot of tweet ids that ended up outputting a date around 2024/2026. Which made me think that the 2015 date taken as reference is wrong. So i've fiddlle with it and found a new number of milliseconds (which puts the reference date to around 4 November 2011) and the same algorithm now outputs the correct dates for several tweets I've tested.
I'm making a pastebin.
>>
>>1273275
pastebin.com/X7mZ4LJF
>>
>>1273279
1288834974657
>>
>>1273281
A more accurate delta obtained by manual bisection, looking at the hours and minutes?
>>
https://github.com/twitter-archive/snowflake/blob/b3f6a3c6ca8e1b6847baa6ff42bf72201e2c2231/src/main/scala/com/twitter/service/snowflake/IdWorker.scala#L25
https://github.com/twitter-archive/iago/blob/019a4adfbfa913e6307cdc5a589089e95cfb6285/src/main/scala/com/twitter/parrot/util/UriParser.scala#L72
>>
This is pretty cool, thanks for posting about it
>>
>>1273275
>2015 date taken as reference is wrong
Of course it's wrong, because the 2015 date is only for discord; twitter uses a different starting point, which you can look up on the wikipedia page linked by the OP
>>
File: [¿].png (188 KB, 775x880)
188 KB
188 KB PNG
>>
File: FftJf6SUcAAbAbk.jpg (739 KB, 1200x1200)
739 KB
739 KB JPG
>>
File: FTxI9I8aUAAWo10.jpg (408 KB, 1644x2000)
408 KB
408 KB JPG
>>
for anyone interested

https://pastebin.com/LUg4gi2E

we can see that the snowflake in decimal and the timestamp are different for the tweet status id and its corresponding picture
maybe the picture get a snowflake when it is uploaded, and the tweet gets a different snowflake after that, when he pressed "tweet"/send
>>
File: FTwRTlBUcAABiTu.png (56 KB, 400x524)
56 KB
56 KB PNG
>>1274857
>>1272841
>They seem miss-matched, but, the media gets an ID when it's uploaded and the status is when it's posted.
>>
>>1274874
yes, so there is no way to obtain the tweet id from the base64 strings of a media filename
>>
File: .png (142 KB, 598x442)
142 KB
142 KB PNG
>>1274896
explain this then, dweeb
>>
>>1274901
>tweet id range
there will always be a few seconds between the time of the media and the time of the tweet, that means you the tweet you're looking for is 1 among 10 to 100 thousands other tweets
that's a bit much to seach manually
>>
>>1274903
>>1272851
>>
>>1274904
I guess you the API can tell you if there is an image, what its name, and then you can check if the id are equals
the image give you an upper bound, but what about the lower bound?
>>
>>1275060
The image is the lower bound. Most posts are made within a couple seconds of the image being uploaded.

Most tweets get no interaction, you can filter 99% of them out.
>>
File: Ff6yDsRacAMqqYm.jpg (2.17 MB, 1800x2348)
2.17 MB
2.17 MB JPG
>>
File: FfGEDqzVUAA8rj7.jpg (211 KB, 1748x846)
211 KB
211 KB JPG
>>
>>1265094
>>
>>1265094
>>
File: FgcUeElXkAAU6gB.jpg (258 KB, 1280x900)
258 KB
258 KB JPG
>>
File: Fgj-7E2aEAAA1Rn.jpg (2.42 MB, 1491x2239)
2.42 MB
2.42 MB JPG
>>
>>1265094
>>
>>1265094
>>
File: FgaQF3UVEAIyGW1.jpg (342 KB, 2048x1874)
342 KB
342 KB JPG
>>
File: Fg0YJypX0AMhdYb.jpg (340 KB, 1440x1711)
340 KB
340 KB JPG
>>
File: Fdl_xAbVUAc1SuM.jpg (452 KB, 1654x2048)
452 KB
452 KB JPG
>>
>>1265094
>>
File: FhHnvQzacAI6-sU.jpg (1.18 MB, 4096x3861)
1.18 MB
1.18 MB JPG
>>
File: FhSP4x9agAAmuqp.jpg (157 KB, 1400x788)
157 KB
157 KB JPG
>>
>>1265094
You gonna continue to bump and delete?
https://archived.moe/wsr/thread/1263648/#1265094
>>
why are you still bumping? people have posted solutions already
>>
>>1283825
They have not.
>>
>>1263890
Autism
>>
File: 1593946057108774912_1.jpg (777 KB, 3073x4096)
777 KB
777 KB JPG
>>
>>1283825
>>1284135
>>
>>1283825
If it's solved, simply decode this: ronOc4XFDrT7aVN0
>>
still up? lmao

>>1285799
jesus fucking christ, describe precisely what you want and stop making anon infer what you want
describe the input. output and their types
or fuck off and ask on /g/ already
>>
>>1286245
What's the problem? You said it was solved.
>>
>>1286247
Not me.
You still can't describe exactly the specification you want, can't you?
>>
>>1286250
The exact process is unknown, hence the thread.
Obviously the snowflake from the string, and timestamp that the snowflake includes is what is wanted.
No offense, but everything is included in the OP, even the asking on /g/ part.
>>
>>1286256
I can't find the /g/ thread neither on desu or on archived.moe
>snowflake from the string
>>1274857
but that's only for the media, not the original tweet
and we already determined that the snowflake from the media is different that the one from the tweet, that they are not linked together, and that you can't know the original tweet except by using the tweeter API and basically select a time range and search
You can't do better than that unless you have access to tweeter's database obviously.
>>
>>1286263
>but that's only for the media, not the original tweet
That's all I'm asking for.
The string from the video files isn't the same as the one for images.
>>
>>1286267
but the pastebin works, no?
>>
>>1286271
That's for images, not videos.
>>
>>1286273
post examples of images working and videos not working
>>
File: .png (6 KB, 562x149)
6 KB
6 KB PNG
>>1286277
>>
>>1286279
can you post several to make some tests?
>>
>>1286289
https://pastebin.com/raw/mZUv02HT
>>
>>1286293
What's the first field again?
The tweet id of the tweet containing the videos?
>>
>>1286302
Yep!
>>
>>1265094
he's still bumping and deleting
>>
>>1287214
true
>>
no



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.