Skip to content

Commit

Permalink
New signed headers
Browse files Browse the repository at this point in the history
  • Loading branch information
UltimaHoarder committed May 4, 2021
1 parent 7f3362f commit 0d9390f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions apis/api_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ def multiprocessing(max_threads=None):


class session_manager():
def __init__(self, original_sessions=[], headers2: dict = {}, session_rules=None, session_retry_rules=None) -> None:
def __init__(self, original_sessions=[], headers: dict = {}, session_rules=None, session_retry_rules=None) -> None:
self.sessions = self.copy_sessions(original_sessions)
self.pool = multiprocessing()
self.max_threads = self.pool._processes
self.kill = False
self.headers = headers2
self.headers = headers
self.session_rules = session_rules
self.session_retry_rules = session_retry_rules

Expand Down
12 changes: 6 additions & 6 deletions apis/onlyfans/onlyfans.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,19 @@ def create_signed_headers(link: str, auth_id: int):
path = urlparse(link).path
query = urlparse(link).query
path = path if not query else f"{path}?{query}"
static_param = "Sx7FEcC7r5uKuCIzVljwS8gnZGhNprM5"
static_param = "rhtNVxJh2LD3Jul5MhHcAAnFMysnLlct"
a = [static_param, time2, path, str(auth_id)]
msg = "\n".join(a)
message = msg.encode("utf-8")
hash_object = hashlib.sha1(message)
sha_1_sign = hash_object.hexdigest()
sha_1_b = sha_1_sign.encode("ascii")
checksum = sum([sha_1_b[15], sha_1_b[37], sha_1_b[6], sha_1_b[9], sha_1_b[13], sha_1_b[34], sha_1_b[17], sha_1_b[14], sha_1_b[1], sha_1_b[37], sha_1_b[14], sha_1_b[18], sha_1_b[24], sha_1_b[28], sha_1_b[1], sha_1_b[31],
sha_1_b[13], sha_1_b[14], sha_1_b[15], sha_1_b[19], sha_1_b[9], sha_1_b[29], sha_1_b[30], sha_1_b[23],
sha_1_b[16], sha_1_b[13], sha_1_b[28], sha_1_b[35],
sha_1_b[15], sha_1_b[23], sha_1_b[28], sha_1_b[39]])-112
checksum = sum([sha_1_b[31], sha_1_b[13], sha_1_b[8], sha_1_b[3], sha_1_b[25], sha_1_b[8], sha_1_b[33], sha_1_b[25], sha_1_b[1], sha_1_b[23], sha_1_b[37], sha_1_b[11], sha_1_b[2], sha_1_b[29], sha_1_b[9], sha_1_b[7],
sha_1_b[29], sha_1_b[30], sha_1_b[18], sha_1_b[25], sha_1_b[18], sha_1_b[21], sha_1_b[10], sha_1_b[37],
sha_1_b[28], sha_1_b[35], sha_1_b[31], sha_1_b[5],
sha_1_b[13], sha_1_b[31], sha_1_b[2], sha_1_b[9]]) + 1110
headers = {}
headers["sign"] = "5:{}:{:x}:6091065f".format(
headers["sign"] = "6:{}:{:x}:609184ae".format(
sha_1_sign, abs(checksum))
headers["time"] = time2
return headers
Expand Down

2 comments on commit 0d9390f

@kotori2
Copy link
Contributor

@kotori2 kotori2 commented on 0d9390f May 5, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They are changing that sh1t so fast...

@alechardyxxx
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks dude, I've been trying to figure this out for a day and couldn't find shit in the js... previously they accepted whatever sha1 in there for the past few weeks at least.

Please sign in to comment.