Spaces:
Running
Running
Hashir Kashif
commited on
Commit
·
52f5919
1
Parent(s):
1dbf826
editing99999990999asasdasdasdasasdasddasdasdasdasasdasdasdasdasasdasdasdsadd
Browse files- app.py +6 -0
- cookieFix.py +26 -0
- cookiesLocal.txt +7 -10
app.py
CHANGED
@@ -103,6 +103,11 @@ def parseCookieFile(cookiefile):
|
|
103 |
else:
|
104 |
return cookies
|
105 |
|
|
|
|
|
|
|
|
|
|
|
106 |
|
107 |
def getNetflixInfo(cookiefile):
|
108 |
cookies = parseCookieFile(cookiefile)
|
@@ -146,6 +151,7 @@ def getNetflixInfo(cookiefile):
|
|
146 |
newCookieFile = "../Membership/" + cookieFileName
|
147 |
shutil.move(
|
148 |
cookiefile, newCookieFile)
|
|
|
149 |
ftp,ssh_client = sftp_connect()
|
150 |
files = ftp.put(newCookieFile,"./domains/hashir672.serv00.net/public_html/Membership/"+cookieFileName)
|
151 |
|
|
|
103 |
else:
|
104 |
return cookies
|
105 |
|
106 |
+
def fixCookie(cookiefile):
|
107 |
+
for line in fileinput.FileInput(cookiefile,inplace=1):
|
108 |
+
if re.match("======",line):
|
109 |
+
break
|
110 |
+
print(line.replace("\n",""))
|
111 |
|
112 |
def getNetflixInfo(cookiefile):
|
113 |
cookies = parseCookieFile(cookiefile)
|
|
|
151 |
newCookieFile = "../Membership/" + cookieFileName
|
152 |
shutil.move(
|
153 |
cookiefile, newCookieFile)
|
154 |
+
fixCookie(newCookieFile)
|
155 |
ftp,ssh_client = sftp_connect()
|
156 |
files = ftp.put(newCookieFile,"./domains/hashir672.serv00.net/public_html/Membership/"+cookieFileName)
|
157 |
|
cookieFix.py
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import re
|
2 |
+
import fileinput
|
3 |
+
def fixCookie(cookiefile):
|
4 |
+
for line in fileinput.FileInput(cookiefile,inplace=1):
|
5 |
+
if re.match("======",line):
|
6 |
+
break
|
7 |
+
print(line.replace("\n",""))
|
8 |
+
|
9 |
+
|
10 |
+
|
11 |
+
# cookies=[]
|
12 |
+
|
13 |
+
# with open("./cookiesLocal.txt", 'r+') as fp:
|
14 |
+
# for line in fp:
|
15 |
+
# if not re.match(r'^\#', line):
|
16 |
+
# lineFields = line.strip().split('\t')
|
17 |
+
# try:
|
18 |
+
|
19 |
+
# cookies[lineFields[5]] = lineFields[6]
|
20 |
+
# fp.write(line)
|
21 |
+
|
22 |
+
# except:
|
23 |
+
# print("Invalid cookie")
|
24 |
+
# pass
|
25 |
+
|
26 |
+
# print(str(cookies))
|
cookiesLocal.txt
CHANGED
@@ -1,11 +1,8 @@
|
|
1 |
# Netscape HTTP Cookie File
|
2 |
-
.netflix.com TRUE / FALSE
|
3 |
-
.netflix.com TRUE / FALSE
|
4 |
-
.
|
5 |
-
.netflix.com TRUE / FALSE
|
6 |
-
.
|
7 |
-
.netflix.com TRUE / FALSE
|
8 |
-
.netflix.com TRUE / FALSE
|
9 |
-
.netflix.com TRUE / FALSE 1703915056 SecureNetflixId v%3D2%26mac%3DAQEAEQABABSOLOiZoD_rFM9Ec4o2VJuBHu_dbbDaXkE.%26dt%3D1672379056149
|
10 |
-
.netflix.com TRUE / FALSE 1672380982 profilesNewSession 0
|
11 |
-
.netflix.com TRUE / FALSE 1703915215 memclid 99b3d1d7-9ea2-440a-b02c-65328df1e5fd
|
|
|
1 |
# Netscape HTTP Cookie File
|
2 |
+
.netflix.com TRUE / FALSE 1730077353 OptanonAlertBoxClosed 2023-10-29T01:02:33.665Z
|
3 |
+
.netflix.com TRUE / FALSE 1730077477 OptanonConsent isGpcEnabled=0&datestamp=Sun+Oct+29+2023+02%3A04%3A37+GMT%2B0100+(Mitteleurop%C3%A4ische+Normalzeit)&version=202301.1.0&isIABGlobal=false&hosts=&consentId=abd9331e-1568-44cd-8ce6-072c32644243&interactionCount=1&landingPath=NotLandingPage&groups=C0001%3A1%2CC0002%3A1%2CC0003%3A1%2CC0004%3A1&geolocation=DE%3BNI&AwaitingReconsent=false
|
4 |
+
.netflix.com TRUE / FALSE 1733101477 dsca customer
|
5 |
+
.netflix.com TRUE / FALSE 1730077477 nfvdid BQFmAAEBELH7oLMMcP4qNIw1f_9gpPZgFwmkdq5V-P-a1Hq1ZFqW60KFEHpUYb6xJjGt5ZBK_GFLa1W9rJaSLTd6GVhqKRmEWQFowHVUjMlVhx8Ebhdrv4yf266zxSi06G0wJyw3KzY-A8WdFbgjGtGc5g0Q4_Et
|
6 |
+
.netflix.com TRUE / FALSE 1730143165 NetflixId ct%3DBQAOAAEBEFu9CsuEjjvziEwCyUANCn2B8IVAP2tWnbHE_b40ge9zNC4QTDk_kFWa2F4B72Xsz4UQjqb1indL4_N6vSa6CuGrMFT2GelG4OIW2wVJJBVbi8YWTQKMXL8edFhlIeFMuPvoqP0qlTnjHVI1hEogMJtJwZAds8qXYw7IxPL0pJc4RD6nxxezOOoHtP_TMWahGIhsPO_6Ojtx_31sTACOYKB1lnN0e0WYUHhFK5m8dXDO3X1VoOqxDRN5-94v13jK4TBkL35A9tFahDZX4mckoXrOAyDhMpl6IAh4dRhFtyDfiDHcBY-l-DSkX8P4Nhx6jFbKVJ7qRpT_nz7HNppBLq5BDbYc_1ufS79J1BChrcsLnLFrWZVKzOPs01GXLW24OMxpKfxsSZBcJP8oN405fA1UEIcTMix5pr-dsrPO-TrYJ5EllR-UAWEZQnMz8CGWG43EiXm67eI37jV59THe6xG4PorwNQK5KaeXlYktp9k8xh-SdZ3GG77KGyhV9JW6voK-VqxQvQn-DwQ8DDaVudy2wM2NKcYZ0F7zXxirJldvLe9rfxhPySxdqvTaI3AcNRlktC0rNG29CYrckDamyFB0lmvkIi1pa10kiCWhMKTr9qNR42XFluEgSaTmOyqTmsJs4UUIBziNqXTler37BSj2VJyEd0h0T5ck_BOCOuewm1A.%26bt%3Ddbl%26ch%3DAQEAEAABABRbxjyeE5FREGIwE5rtAlzHocxHFoqwwtE.%26v%3D2%26mac%3DAQEAEAABABR1CnxvONylg1xtOagmcZxKYMU6JjZBVts.
|
7 |
+
.netflix.com TRUE / FALSE 1730143165 SecureNetflixId v%3D2%26mac%3DAQEAEQABABRNCFUUuYxsITZ_DxMYxMg5xmcRF3aEUOY.%26dt%3D1698607163380
|
8 |
+
.netflix.com TRUE / FALSE 1706383166 hasSeenCookieDisclosure true
|
|
|
|
|
|