Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
lichenggang
/
tas_token_server
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
3da83a22
authored
Apr 07, 2020
by
lichenggang
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
获得corestaff正确的token
parent
73f224f8
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
2 deletions
lib/corestaff.py
utils/proxy_util.py
lib/corestaff.py
View file @
3da83a22
...
...
@@ -6,6 +6,7 @@ import traceback
from
requests
import
sessions
import
token_lib
from
utils.proxy_util
import
proxies
PLATFORM
=
"corestaff"
LEVEL
=
"H"
...
...
@@ -40,8 +41,8 @@ class DGTokenCrawler(token_lib.BaseTokenCrawler):
while
1
:
try
:
with
sessions
.
Session
()
as
session
:
one
=
session
.
request
(
'GET'
,
url
,
headers
=
headers
,
timeout
=
10
)
two
=
session
.
request
(
'GET'
,
url
,
headers
=
headers
,
timeout
=
10
)
one
=
session
.
request
(
'GET'
,
url
,
headers
=
headers
,
proxies
=
proxies
,
timeout
=
10
)
two
=
session
.
request
(
'GET'
,
url
,
headers
=
headers
,
proxies
=
proxies
,
timeout
=
10
)
if
two
.
status_code
==
200
:
jes
=
one
.
cookies
.
get
(
'JSESSIONID'
)
token
.
append
(
jes
)
...
...
utils/proxy_util.py
0 → 100644
View file @
3da83a22
#!/usr/bin/env python
# -*- coding:utf-8 -*-
proxyHost
=
"http-proxy-t3.dobel.cn"
proxyPort
=
"9180"
proxyUser
=
"LIEXINHTT1"
proxyPass
=
"oK97IIl298"
proxyMeta
=
"http://
%(user)
s:
%(pass)
s@
%(host)
s:
%(port)
s"
%
{
"host"
:
proxyHost
,
"port"
:
proxyPort
,
"user"
:
proxyUser
,
"pass"
:
proxyPass
,
}
proxies
=
{
"http"
:
proxyMeta
,
"https"
:
proxyMeta
,
}
\ No newline at end of file
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