Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
V
vazil-eduline-skipper
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Gyeongho Park
vazil-eduline-skipper
Commits
81eda10f
Commit
81eda10f
authored
May 31, 2024
by
Gyeongho Park
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Improve] 쿠키 처리 개선
parent
2ab6f4a4
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
15 deletions
+29
-15
app.js
app.js
+1
-1
index.js
routes/index.js
+28
-14
No files found.
app.js
View file @
81eda10f
...
...
@@ -38,7 +38,7 @@ app.use(function(err, req, res, next) {
// render the error page
// res.status(err.status || 500);
// res.render('error');
res
.
status
(
err
orcode
.
c001
.
status
).
json
(
errorcode
.
c001
)
res
.
status
(
err
.
status
||
500
).
json
(
err
)
});
...
...
routes/index.js
View file @
81eda10f
...
...
@@ -7,9 +7,7 @@ const origin = 'https://' + host
const
referer
=
host
+
'/lms/plugin/player/ecom_player.php'
const
contentType
=
'application/x-www-form-urlencoded; charset=UTF-8'
const
updateUrl
=
origin
+
'/lms/plugin/player/ecom_player_update.php'
const
cookie
=
'bg_id=25056279-3354-44c8-b767-55ffafb425f8; _gcl_au=1.1.1028567537.1701416329; _fbp=fb.1.1701416329030.1182959737; PHPSESSID=w4~rnl3tff3uurck4m00nkfl99e22; 2a0d2363701f23f8a75028924a3af643=NTkuMjEuMzQuMjE1; _fwb=179n2hi7H5zEnDJJXuDwvAw.1702016217827; _gid=GA1.2.520838398.1702016219; popup_3=done; f33d2ed86bd82d4c22123c9da444d8ab=MTcwMjAxNjI3NQ%3D%3D; 96b28b766b7e0699aa91c9ff3d890663=aHR0cHM6Ly9uaWNlLmNoZWNrcGx1cy5jby5rci8%3D; bg_scrollY=7688; play_head=%7B%22wr_id%22%3A%221999977%22%2C%22p_id%22%3A%224dae5685c329240daa96f1e6dba733a6%22%2C%22s_id%22%3A%22ujed%22%2C%22wr_order%22%3A%221%22%7D; save_id=vaz55; wcs_bt=s_53d0704a39a1:1702016802; _ga=GA1.2.1111176735.1701416329; _ga_YTEBTSNC3S=GS1.1.1702016218.2.1.1702016803.56.0.0; _ga_3LZR51WJST=GS1.1.1702016218.2.1.1702016803.0.0.0; play=%7B%22wr_id%22%3A%221999977%22%2C%22p_id%22%3A%224dae5685c329240daa96f1e6dba733a6%22%2C%22s_id%22%3A%22ujed%22%2C%22wr_order%22%3A%221%22%2C%22sample_mode%22%3Afalse%7D; move_prev=false; page_time=%7B%22key%22%3A%226572b9f331b08%22%2C%22time%22%3A'
/* GET home page. */
router
.
get
(
'/'
,
function
(
req
,
res
,
next
)
{
res
.
render
(
'index'
,
{
title
:
'Vazil Eduline Skipper'
});
});
...
...
@@ -17,7 +15,7 @@ router.get('/', function(req, res, next) {
router
.
post
(
'/skip'
,
async
(
req
,
res
,
next
)
=>
{
try
{
const
{
p_id
,
s_id
,
wr_id
}
=
req
.
body
const
{
PHPSESSID
,
key
,
p_id
,
s_id
,
wr_id
}
=
req
.
body
let
responses
=
[]
...
...
@@ -27,19 +25,28 @@ router.post('/skip', async (req, res, next) => {
end
:
false
}
const
formData
=
new
FormData
()
formData
.
append
(
'p_id'
,
p_id
)
formData
.
append
(
's_id'
,
s_id
)
formData
.
append
(
'wr_order'
,
22
)
formData
.
append
(
'wr_page'
,
(
i
+
1
))
formData
.
append
(
'wr_id'
,
wr_id
)
let
rand
=
parseInt
((
Math
.
random
()
*
10000
)
+
1000000
)
let
add
=
parseInt
(
Math
.
random
()
*
100000
)
let
startTimestamp
=
((
parseInt
(
Date
.
now
())
-
rand
)
+
''
).
substring
(
0
,
10
)
let
endTimestamp
=
((
parseInt
(
Date
.
now
())
-
(
rand
-
add
))
+
''
).
substring
(
0
,
10
)
console
.
log
(
i
+
' 번째 요청 '
,
startTimestamp
,
endTimestamp
)
console
.
log
(
i
+
' 번째 요청 '
,
startTimestamp
)
const
playCookie
=
encodeURIComponent
(
JSON
.
stringify
({
wr_id
:
wr_id
,
p_id
:
p_id
,
s_id
:
s_id
,
wr_order
:
22
,
sample_mode
:
false
}));
const
pageTimeCookie
=
encodeURIComponent
(
JSON
.
stringify
({
key
:
key
?
key
:
'66592ddb19920'
,
time
:
startTimestamp
}));
let
cookie
=
''
cookie
+=
'PHPSESSID='
+
(
PHPSESSID
?
PHPSESSID
:
'w6~gaf4ngqb42nslt97tuqbcegph1'
)
+
';'
cookie
+=
'play='
+
playCookie
+
';'
cookie
+=
'page_time='
+
pageTimeCookie
const
config
=
{
headers
:
{
...
...
@@ -50,7 +57,14 @@ router.post('/skip', async (req, res, next) => {
}
}
config
.
headers
[
'Cookie'
]
=
cookie
+
startTimestamp
+
'%7D'
config
.
headers
[
'Cookie'
]
=
cookie
const
formData
=
new
FormData
()
formData
.
append
(
'p_id'
,
p_id
)
formData
.
append
(
's_id'
,
s_id
)
formData
.
append
(
'wr_order'
,
22
)
formData
.
append
(
'wr_page'
,
(
i
+
1
))
formData
.
append
(
'wr_id'
,
wr_id
)
await
axios
.
post
(
updateUrl
,
formData
,
config
)
.
then
(
res
=>
{
console
.
log
(
'start clear'
,
res
.
data
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment