sneakyovis / onlyfans-dynamic-rules Goto Github PK
View Code? Open in Web Editor NEWConstants needed to execute OnlyFans API requests
License: MIT License
Constants needed to execute OnlyFans API requests
License: MIT License
I dont know if was only my problem, i try implementing in a function like your but doest work. I try right generate sign from official api and work perfectly. I analyze the code but prefix are right maybe conversion from msg to ash1 is change.
Hello. I have not been able to get in touch with you. Can I ask you some questions on api? I am a beginner and can't understand how to make queries on onlyfans.
Why are the values of the static param, and checksum different compared to other similar repos.
The rules are not updating and also main.js is giving error
Hello @SneakyOvis !
I have to ask you for advice about x-bc generate. It always the same after log-in and it looks like it depends on constants, but in article you wrote that it variables as Date.now, 2 x Math.random and userAgent.
I'm trying to generate x-bc with code like:
sha1([(new Date).getTime(), 1e12*Math.random(), 1e12*Math.random(), window.navigator.userAgent].map(btoa).join('.'))
so.. of course it always not the same with original x-bc sign. Can you give me advice what way should i do? Thanks!
Hello Sir Can You Modify This Script And Make It work For Me Please Update It
public static (string, string) kof(string path)
{
string static_param = "jd6jc4asoDCTZuqCM1SLkiCTy5oGFUhy";
var format = "7096:{0}:{1:x}:63f36c1b";
var checksum_indexes = new int[] { 21, 20, 6, 31, 18, 37, 31, 23, 17, 18, 32, 27, 6, 34, 35, 0, 6, 0, 0, 27, 36, 17, 36, 31, 27, 8, 9, 26, 20, 1, 32, 3 };
var checksum_constants = new int[] { 73, -124, 91, -82, -126, -121, -145, 93, 112, -85, -133, -110, -77, 98, 78, -123, -99, -70, 90, -138, 107, -93, 96, -84, -98, -129, -98, 108, 128, 129, -115, -68 };
var checksum_constant = -915;
string time = ((int)DateTime.UtcNow.Subtract(new DateTime(1970, 1, 1)).TotalSeconds).ToString();
string[] param = { static_param, time, path, "0" };
string message = string.Join("\n", param);
byte[] messageBytes = System.Text.Encoding.UTF8.GetBytes(message);
using (System.Security.Cryptography.SHA1 sha1 = System.Security.Cryptography.SHA1.Create())
{
byte[] sha1Bytes = sha1.ComputeHash(messageBytes);
string sha1Sign = BitConverter.ToString(sha1Bytes).Replace("-", "").ToLower();
byte[] sha1SignBytes = System.Text.Encoding.ASCII.GetBytes(sha1Sign);
int checksum = checksum_indexes.Sum(i => sha1SignBytes[i]) + checksum_constant;
string formatString = string.Format(format, sha1Sign, Math.Abs(checksum));
return (formatString, time);
}
}
(string sign, string now) = kof("/api2/v2/users/login");
Hello, I'm making request as it's explained in readme ( also using new rules and copying all other info from browser correctly) but getting error : { error: { code: 401, message: 'Please refresh the page' } }
just leaving a friendly note, your docs of how you reverse engineered the api were super helpful. Even for me as a senior web dev, reverse engineering is a whole different ballgame ^_^ thanks!!
Quick q: how often have you noticed the rules, app token, and/or algorithm change? And I assume user id
doesnt change, but do we need to constantly be getting a new sess
every so often?
output:
{
'app-token': '33d57ade8c02dbc5a333db99ff9ae26a',
static_param: '7eTPrCi3dhXHQvXN7N42mC6Q05eNbooI',
prefix: '6724',
suffix: '63ce9b86',
checksum_constant: 0,
checksum_indexes: []
}
app.post('/create-headers/', async function (req, res) {
const data = req.body;
const html = await getPage('https://www.onlyfans.com');
const code = await getCode(html, '3415.js');
// parse ast
const ast = parser.parse(code);
const newCode = generator(ast).code
// create rules
const context = getSign(newCode, data.path);
const rules = createRules(context.log, context.result.sign);
res.status(200).json(createHeaders(data.path, rules, data.user_agent, data.user_id ));
});
How long did it take you to reverse the original function and figure out what it does ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.