Skip to content

Instantly share code, notes, and snippets.

@rubenvarela
Created April 11, 2022 21:44
Show Gist options
  • Save rubenvarela/8df264517c103103cdb196fbbe31a45a to your computer and use it in GitHub Desktop.
Save rubenvarela/8df264517c103103cdb196fbbe31a45a to your computer and use it in GitHub Desktop.
levels.fyi - returning bad salaryData.json

I see online, in multiple places, people saying that levels.fyi data is on a JSON at,

https://www.levels.fyi/js/salaryData.json

This may have been how it was built originally but now, while it still responds with a JSON, it's not accurate.

First, we can see the file hasn't been modified since Jan 13, 2022.

$ curl -I "https://www.levels.fyi/js/salaryData.json"
HTTP/2 200
content-type: application/json
content-length: 4358528
date: Mon, 11 Apr 2022 21:33:39 GMT
cache-control: public, max-age=18000
content-encoding: gzip
last-modified: Thu, 13 Jan 2022 17:28:17 GMT
etag: "65f39bf5178fc63e0092a87ac3758e01"
server: AmazonS3
x-cache: Miss from cloudfront
via: 1.1 702877149e1cd7ac6989f8956c31e220.cloudfront.net (CloudFront)
x-amz-cf-pop: ORD53-C3
x-amz-cf-id: htFGysZZJiy-oFSnfihbxHoXL1Zols8082OqwHDwTzuBQYkQDMAvzw== 

And besides it being stale, if we download the file,

curl "https://www.levels.fyi/js/salaryData.json" --output save.test

then do the bare minimum,

$ file save.test

You'll see,

save.test: gzip compressed data, was "bad_salaryData.json", last modified: Thu Jan 13 17:20:36 2022, from Unix, original size modulo 2^32 27379898

As you can see there, the original filename was bad_salaryData.json and the file hasn't been modified since Jan 13, 2022.

While I understand this can be useful for playing, careful relying on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment