Comments (3)
Is there a way to work directly with the file without deobfuscating it?
@KinGhost-90
I've given some thought to your question and realized that it actually might be possible to work directly with p.js
- We load
p.js
and use it as intended.- When loaded, the script creates a global
KPSDK
Object with 2 methods.configure()
, which configures the SDK with Kasada-protected API endpoints.isReady()
, which returns a boolean representing the SDK's state of readiness.
- After successful configuration, Kasada replaces the Fetch API to a modified one of their own.
- Kasada's modified Fetch applies their dynamically generated
x-kpsdk-*
headers to the requests sent to the configured endpoints.
- Kasada's modified Fetch applies their dynamically generated
- When loaded, the script creates a global
- Then, we make requests to those endpoints and capture the
x-kpsdk-*
headers. - Voilà, a solver working directly with the
p.js
file!
This is just my theorized concept based on current knowledge, and it needs testing before it is implemented.
from kpsdk-solver.
- The internal variables of
p.js
are scoped to an IIFE (Immediately Invoked Function Expression) and are therefore inaccessible at the global scope.- String manipulation can be useful in this case.
- It is generally not recommended to read large files using
fs.readFileSync()
due to its impact on performance and memory consumption.- Thus, we need to compress and minify the script.
- Deobfuscating
p.js
and minifying it afterward apparently takes less storage compared to minifyingp.js
directly. Hence, the creation ofp_deobf_modified.js
So, in short, it is not really feasible for kpsdk-solver to work with p.js
without deobfuscation at the moment.
from kpsdk-solver.
Ok thanks for your answer, I think I will also look into it for myself because it could be very interesting to be able to work directly with a file that is not deobfuscated.
I also noticed that the x-kpsdk-* header is not working at the moment. the script generates them well but it does not work when used for example to generate a twitch integrity token
from kpsdk-solver.
Related Issues (9)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kpsdk-solver.