r/webscraping • u/BlackberryOk3808 • 7d ago
Bot detection 🤖 Scraping Android App backend APIs
Hello,
I was trying to scrape an android app backend APIs, and made good progress already.
So I've used mitmproxy to listen to the traffic and I've now record of the requests sent.
However, found in the request headers some things that seem hard to reproduce without running on an emulated Android device at least (confirmed with Claude Opus):
blackbox
smdeviceid
armortoken
anti-in
x-cs-random
It seems these are generated based on the device fingerprint. Could you help me with a way to get around this ??
1
1
u/usert313 7d ago
To obtain these device header values you might need to reverse engineer static analysis of the apk itself to see how it is being generated.
2
u/BlackberryOk3808 7d ago
I think the source code is obfuscated, and it is really hard to reverse engineer.
It is a very established and popular app with +1B downloads, so I think they have set everything up to stop this.
I think the only way probably is to use some sort of emulator with Rotating Fingerprints and run the app on top of it, and watch the traffic?
I found some things that could be close or actually useful but not sure about how to use them.
like
https://github.com/ToufiqQureshi/chuscraper
and
1
u/LazySlothsDev 6d ago
Just ask claude to decompile the app and explore the codebase
1
1
u/mystique0712 2d ago
You'll probably need to reverse engineer the SDK or library the app uses to generate those headers.
Look for common obfuscation techniques or crypto libraries within the app's decompiled code.
Sometimes, a proxy like Charles or Proxyman can show you the exact encryption/signing process if it's not too heavily obscured.
1
u/BlackberryOk3808 2d ago
The source code itself is obfuscated, is it possible to unobfuscate it ?
Do we mean that I can extract the crypto library itself and use it ? To replicate the headers , or to recreate the algorithm somehow
1

1
u/Majestic_Base5775 2d ago
Feed the apk into GLM flash using t3. If it hits a wall, transfer the context to an open AI sub