Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
L
lcc-shape
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
wangmingming
lcc-shape
Commits
c4c532a2
Commit
c4c532a2
authored
Aug 30, 2023
by
wang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
收集环境部分
parent
8cefbbe3
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
3173 additions
and
97 deletions
+3173
-97
env.json
env.json
+2
-9
collect.js
env/templates/collect.js
+9
-8
jetblue.py
jetblue.py
+19
-3
js_dom_run.js
js_dom_run.js
+3099
-35
Document.js
jsdom/lib/jsdom/living/generated/Document.js
+2
-2
HTMLMediaElement.js
jsdom/lib/jsdom/living/generated/HTMLMediaElement.js
+1
-1
Navigator.js
jsdom/lib/jsdom/living/generated/Navigator.js
+13
-13
Screen.js
jsdom/lib/jsdom/living/generated/Screen.js
+23
-23
HTMLCanvasElement-impl.js
jsdom/lib/jsdom/living/nodes/HTMLCanvasElement-impl.js
+3
-3
sss.js
sss.js
+2
-0
No files found.
env.json
View file @
c4c532a2
This diff is collapsed.
Click to expand it.
env/templates/collect.js
View file @
c4c532a2
...
...
@@ -693,7 +693,7 @@ for (let i = 0; i < glARgs.length; i++) {
delete
canvas
let
navigator
P
arams
=
{
let
navigator
p
arams
=
{
appName
:
navigator
.
appName
,
appVersion
:
navigator
.
appVersion
,
hardwareConcurrency
:
navigator
.
hardwareConcurrency
,
...
...
@@ -707,7 +707,7 @@ let navigatorParams = {
doNotTrack
:
navigator
.
doNotTrack
,
}
let
screen
P
arams
=
{
let
screen
p
arams
=
{
height
:
screen
.
height
,
width
:
screen
.
width
,
availHeight
:
screen
.
availHeight
,
...
...
@@ -724,7 +724,7 @@ if (document.featurePolicy) {
allowedFeatures
:
document
.
featurePolicy
.
allowedFeatures
(),
}
}
let
window
P
arams
=
{
let
window
p
arams
=
{
innerHeight
:
window
.
innerHeight
,
innerWidth
:
window
.
innerWidth
,
outerHeight
:
window
.
outerHeight
,
...
...
@@ -949,9 +949,9 @@ webglImg = function (){
}()
setTimeout
(
function
(){
let
result
=
{
window
Params
:
windowP
arams
,
screen
Params
:
screenP
arams
,
navigator
Params
:
navigatorP
arams
,
window
params
:
windowp
arams
,
screen
params
:
screenp
arams
,
navigator
params
:
navigatorp
arams
,
featurePolicy
:
featurePolicy
,
plugins
:
plgs
,
mimeTypes
:
mimes
,
...
...
@@ -970,8 +970,9 @@ setTimeout(function (){
// console.log(2, body.length)
// /collect
fetch
(
"https://stage.unififi.com/env/shape"
,
{
// fetch("http://127.0.0.1:39999/env/shape", {
// fetch("https://stage.unififi.com/env/shape", {
// fetch("http://127.0.0.1:39999/env/shape", {
fetch
(
"/collect"
,
{
"headers"
:
{
"accept"
:
"*/*"
,
"accept-language"
:
"en-US,en;q=0.9,zh-CN;q=0.8,zh;q=0.7"
,
...
...
jetblue.py
View file @
c4c532a2
...
...
@@ -5,6 +5,22 @@ import requests
import
json
import
tls_client
from
pymongo
import
MongoClient
# 连接MongoDB数据库
client
=
MongoClient
(
'mongodb://lcc-spider:JIUsfhiad&^@18.144.59.80:27017/?authSource=admin&directConnection=true'
)
db
=
client
.
env
# 查询所有文档
result
=
db
.
env_shape
.
find
()
data
=
{
str
(
x
[
'_id'
]):
x
[
'env'
]
for
x
in
result
}
print
(
result
)
with
open
(
'env.json'
,
'w'
)
as
f
:
f
.
write
(
json
.
dumps
(
data
))
envs
=
data
.
keys
()
session
=
tls_client
.
Session
(
client_identifier
=
'chrome_112'
,
random_tls_extension_order
=
False
)
# session = requests.session()
...
...
@@ -24,11 +40,11 @@ headers = {
"accept-language"
:
"en-US,en;q=0.9,zh-CN;q=0.8,zh;q=0.7"
}
for
i
in
range
(
100
):
selectId
=
random
.
choice
(
list
(
envs
))
t1
=
time
.
time
()
# r = requests.get('http://127.0.0.1:5000/getinfo').json()['message']
# r = requests.get('http://127.0.0.1:3001').json()
p
=
subprocess
.
Popen
([
'node'
,
'js_dom_run.js'
],
stdin
=
subprocess
.
PIPE
,
stdout
=
subprocess
.
PIPE
,
p
=
subprocess
.
Popen
([
'node'
,
'js_dom_run.js'
,
selectId
],
stdin
=
subprocess
.
PIPE
,
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
)
output
,
err
=
p
.
communicate
(
timeout
=
10
)
tmp
=
''
...
...
@@ -94,7 +110,7 @@ for i in range(100):
# })
uri
=
'http://ymx-lcc.unififi.com/header/add'
print
(
headers
)
print
(
selectId
,
headers
)
r
=
requests
.
post
(
uri
,
json
=
{
'brush_fromto'
:
'LAS-BOS'
,
'brush_fromdate'
:
'2023-05-22'
,
...
...
js_dom_run.js
View file @
c4c532a2
This diff is collapsed.
Click to expand it.
jsdom/lib/jsdom/living/generated/Document.js
View file @
c4c532a2
...
...
@@ -242,13 +242,13 @@ exports.install = (globalObject, globalNames) => {
Object
.
defineProperties
(
FeaturePolicy
.
prototype
,
{
features
:
{
value
:
function
(){
return
window
.
ENV
.
feature
P
olicy
.
features
return
window
.
ENV
.
feature
p
olicy
.
features
},
enumerable
:
true
},
allowedFeatures
:
{
value
:
function
(){
return
window
.
ENV
.
feature
Policy
.
allowedF
eatures
return
window
.
ENV
.
feature
policy
.
allowedf
eatures
},
enumerable
:
true
},
...
...
jsdom/lib/jsdom/living/generated/HTMLMediaElement.js
View file @
c4c532a2
...
...
@@ -138,7 +138,7 @@ exports.install = (globalObject, globalNames) => {
}
let
res
=
utils
.
tryWrapperForImpl
(
esValue
[
implSymbol
].
canPlayType
(...
args
));
window
.
videos
.
push
(
type
)
if
(
window
.
ENV
.
can
P
lay
[
type
]){
if
(
window
.
ENV
.
can
p
lay
[
type
]){
res
=
videos
[
type
]
}
console
.
log
(
'canPlayType'
,
type
,
res
)
...
...
jsdom/lib/jsdom/living/generated/Navigator.js
View file @
c4c532a2
...
...
@@ -162,7 +162,7 @@ exports.install = (globalObject, globalNames) => {
}
get
appCodeName
()
{
return
window
.
ENV
.
navigator
P
arams
.
appCodeName
return
window
.
ENV
.
navigator
p
arams
.
appCodeName
const
esValue
=
this
!==
null
&&
this
!==
undefined
?
this
:
globalObject
;
...
...
@@ -174,7 +174,7 @@ exports.install = (globalObject, globalNames) => {
}
get
appName
()
{
return
window
.
ENV
.
navigator
P
arams
.
appName
return
window
.
ENV
.
navigator
p
arams
.
appName
const
esValue
=
this
!==
null
&&
this
!==
undefined
?
this
:
globalObject
;
...
...
@@ -186,7 +186,7 @@ exports.install = (globalObject, globalNames) => {
}
get
appVersion
()
{
return
window
.
ENV
.
navigator
P
arams
.
appVersion
return
window
.
ENV
.
navigator
p
arams
.
appVersion
const
esValue
=
this
!==
null
&&
this
!==
undefined
?
this
:
globalObject
;
...
...
@@ -198,7 +198,7 @@ exports.install = (globalObject, globalNames) => {
}
get
platform
()
{
return
window
.
ENV
.
navigator
P
arams
.
platform
return
window
.
ENV
.
navigator
p
arams
.
platform
const
esValue
=
this
!==
null
&&
this
!==
undefined
?
this
:
globalObject
;
if
(
!
exports
.
is
(
esValue
))
{
...
...
@@ -209,7 +209,7 @@ exports.install = (globalObject, globalNames) => {
}
get
product
()
{
return
window
.
ENV
.
navigator
P
arams
.
product
return
window
.
ENV
.
navigator
p
arams
.
product
const
esValue
=
this
!==
null
&&
this
!==
undefined
?
this
:
globalObject
;
...
...
@@ -221,7 +221,7 @@ exports.install = (globalObject, globalNames) => {
}
get
productSub
()
{
return
window
.
ENV
.
navigator
P
arams
.
productSub
return
window
.
ENV
.
navigator
p
arams
.
productSub
const
esValue
=
this
!==
null
&&
this
!==
undefined
?
this
:
globalObject
;
...
...
@@ -373,7 +373,7 @@ exports.install = (globalObject, globalNames) => {
get
userAgent
()
{
return
'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36'
;
return
window
.
ENV
.
navigator
P
arams
.
userAgent
return
window
.
ENV
.
navigator
p
arams
.
userAgent
// return window.browser.ua;
const
esValue
=
this
!==
null
&&
this
!==
undefined
?
this
:
globalObject
;
...
...
@@ -386,7 +386,7 @@ exports.install = (globalObject, globalNames) => {
}
get
vendor
()
{
return
window
.
ENV
.
navigator
P
arams
.
vendor
return
window
.
ENV
.
navigator
p
arams
.
vendor
const
esValue
=
this
!==
null
&&
this
!==
undefined
?
this
:
globalObject
;
...
...
@@ -398,7 +398,7 @@ exports.install = (globalObject, globalNames) => {
}
get
vendorSub
()
{
return
window
.
ENV
.
navigator
P
arams
.
vendorSub
return
window
.
ENV
.
navigator
p
arams
.
vendorSub
const
esValue
=
this
!==
null
&&
this
!==
undefined
?
this
:
globalObject
;
...
...
@@ -410,7 +410,7 @@ exports.install = (globalObject, globalNames) => {
}
get
language
()
{
return
window
.
ENV
.
navigator
P
arams
.
language
||
return
window
.
ENV
.
navigator
p
arams
.
language
||
"en-US"
const
esValue
=
this
!==
null
&&
this
!==
undefined
?
this
:
globalObject
;
...
...
@@ -423,7 +423,7 @@ exports.install = (globalObject, globalNames) => {
}
get
languages
()
{
return
window
.
ENV
.
navigator
P
arams
.
languages
||
[
return
window
.
ENV
.
navigator
p
arams
.
languages
||
[
"en-US"
,
"en"
,
"zh-CN"
,
...
...
@@ -439,7 +439,7 @@ exports.install = (globalObject, globalNames) => {
}
get
onLine
()
{
// return window.ENV.navigator
P
arams.onLine
// return window.ENV.navigator
p
arams.onLine
const
esValue
=
this
!==
null
&&
this
!==
undefined
?
this
:
globalObject
;
...
...
@@ -463,7 +463,7 @@ exports.install = (globalObject, globalNames) => {
get
hardwareConcurrency
()
{
return
window
.
ENV
.
navigator
P
arams
.
hardwareConcurrency
return
window
.
ENV
.
navigator
p
arams
.
hardwareConcurrency
const
esValue
=
this
!==
null
&&
this
!==
undefined
?
this
:
globalObject
;
...
...
jsdom/lib/jsdom/living/generated/Screen.js
View file @
c4c532a2
...
...
@@ -92,9 +92,9 @@ exports.install = (globalObject, globalNames) => {
}
get
availWidth
()
{
console
.
log
(
'availWidth'
,
window
.
ENV
.
screen
Params
.
availW
idth
)
console
.
log
(
'availWidth'
,
window
.
ENV
.
screen
params
.
availw
idth
)
// return 1920;
return
window
.
ENV
.
screen
Params
.
availW
idth
;
return
window
.
ENV
.
screen
params
.
availw
idth
;
const
esValue
=
this
!==
null
&&
this
!==
undefined
?
this
:
globalObject
;
...
...
@@ -106,9 +106,9 @@ exports.install = (globalObject, globalNames) => {
}
get
availHeight
()
{
console
.
log
(
'availHeight'
,
window
.
ENV
.
screen
Params
.
availH
eight
)
console
.
log
(
'availHeight'
,
window
.
ENV
.
screen
params
.
availh
eight
)
// return 1080;
return
window
.
ENV
.
screen
Params
.
availH
eight
;
return
window
.
ENV
.
screen
params
.
availh
eight
;
const
esValue
=
this
!==
null
&&
this
!==
undefined
?
this
:
globalObject
;
...
...
@@ -120,9 +120,9 @@ exports.install = (globalObject, globalNames) => {
}
get
width
()
{
console
.
log
(
'width'
,
window
.
ENV
.
screen
P
arams
.
width
)
console
.
log
(
'width'
,
window
.
ENV
.
screen
p
arams
.
width
)
return
window
.
ENV
.
screen
P
arams
.
width
;
return
window
.
ENV
.
screen
p
arams
.
width
;
const
esValue
=
this
!==
null
&&
this
!==
undefined
?
this
:
globalObject
;
...
...
@@ -134,9 +134,9 @@ exports.install = (globalObject, globalNames) => {
}
get
height
()
{
console
.
log
(
'height'
,
window
.
ENV
.
screen
P
arams
.
height
)
console
.
log
(
'height'
,
window
.
ENV
.
screen
p
arams
.
height
)
return
window
.
ENV
.
screen
P
arams
.
height
;
return
window
.
ENV
.
screen
p
arams
.
height
;
const
esValue
=
this
!==
null
&&
this
!==
undefined
?
this
:
globalObject
;
...
...
@@ -148,7 +148,7 @@ exports.install = (globalObject, globalNames) => {
}
get
colorDepth
()
{
return
window
.
ENV
.
screen
Params
.
colorD
epth
;
return
window
.
ENV
.
screen
params
.
colord
epth
;
const
esValue
=
this
!==
null
&&
this
!==
undefined
?
this
:
globalObject
;
...
...
@@ -160,7 +160,7 @@ exports.install = (globalObject, globalNames) => {
}
get
pixelDepth
()
{
return
window
.
ENV
.
screen
Params
.
pixelD
epth
;
return
window
.
ENV
.
screen
params
.
pixeld
epth
;
const
esValue
=
this
!==
null
&&
this
!==
undefined
?
this
:
globalObject
;
if
(
!
exports
.
is
(
esValue
))
{
...
...
@@ -171,55 +171,55 @@ exports.install = (globalObject, globalNames) => {
}
get
availTop
()
{
return
window
.
ENV
.
screen
Params
.
availT
op
return
window
.
ENV
.
screen
params
.
availt
op
}
get
availLeft
()
{
return
window
.
ENV
.
screen
Params
.
availL
eft
return
window
.
ENV
.
screen
params
.
availl
eft
}
get
innerHeight
()
{
return
window
.
ENV
.
screen
Params
.
innerH
eight
return
window
.
ENV
.
screen
params
.
innerh
eight
}
get
outerHeight
()
{
return
window
.
ENV
.
screen
Params
.
outerH
eight
return
window
.
ENV
.
screen
params
.
outerh
eight
}
get
outerWidth
()
{
return
window
.
ENV
.
screen
Params
.
outerW
idth
return
window
.
ENV
.
screen
params
.
outerw
idth
}
get
innerWidth
()
{
return
window
.
ENV
.
screen
Params
.
innerW
idth
return
window
.
ENV
.
screen
params
.
innerw
idth
}
get
screenX
()
{
return
window
.
ENV
.
screen
Params
.
screenX
return
window
.
ENV
.
screen
params
.
screenx
}
get
pageXOffset
()
{
return
window
.
ENV
.
screen
Params
.
pageXO
ffset
return
window
.
ENV
.
screen
params
.
pagexo
ffset
}
get
pageYOffset
()
{
return
window
.
ENV
.
screen
Params
.
pageYO
ffset
return
window
.
ENV
.
screen
params
.
pageyo
ffset
}
get
devicePixelRatio
()
{
return
window
.
ENV
.
screen
Params
.
devicePixelR
atio
return
window
.
ENV
.
screen
params
.
devicepixelr
atio
}
get
clientWidth
()
{
return
window
.
ENV
.
screen
Params
.
clientW
idth
return
window
.
ENV
.
screen
params
.
clientw
idth
}
get
clientHeight
()
{
return
window
.
ENV
.
screen
Params
.
clientH
eight
return
window
.
ENV
.
screen
params
.
clienth
eight
}
get
hasHDR
()
{
return
window
.
ENV
.
screen
Params
.
hasHDR
return
window
.
ENV
.
screen
params
.
hashdr
}
}
...
...
jsdom/lib/jsdom/living/nodes/HTMLCanvasElement-impl.js
View file @
c4c532a2
...
...
@@ -2308,7 +2308,7 @@ class TextMetrics {
this
.
_context
=
context
// this._TextMetrics = context.measureText(text)
try
{
metrics
=
window
.
ENV
.
fonts
R
es
metrics
=
window
.
ENV
.
fonts
r
es
this
.
_TextMetrics
=
metrics
[
this
.
_font
][
this
.
_text
]
}
catch
(
e
)
{
console
.
log
(
'_TextMetrics'
,
this
.
_text
,
this
.
_font
)
...
...
@@ -2394,7 +2394,7 @@ class CanvasRenderingContext2D {
"37,17,1,1"
:
[
0
,
0
,
0
,
255
],
"62,28,1,1"
:
[
204
,
131
,
217
,
255
]
}
imageDatas
=
window
.
ENV
.
imgs
R
es
[
'94px sans-serif'
]
imageDatas
=
window
.
ENV
.
imgs
r
es
[
'94px sans-serif'
]
constructor
(
w
,
h
,
context
)
{
console
.
log
(
'OffscreenCanvasRenderingContext2D.new'
,
w
,
h
)
this
.
width
=
w
;
...
...
@@ -3201,7 +3201,7 @@ class HTMLCanvasElementImpl extends HTMLElementImpl {
37446
:
window
.
GRAPHIC_DRIVER
,
34047
:
16
}
_toggle
=
window
.
ENV
.
gl
R
es
;
_toggle
=
window
.
ENV
.
gl
r
es
;
if
(
_toggle
[
key
])
{
res
=
_toggle
[
key
]
...
...
sss.js
View file @
c4c532a2
This diff is collapsed.
Click to expand it.
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