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
5d293e9d
Commit
5d293e9d
authored
Sep 14, 2023
by
wang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
对比修复
parent
d2a4ce9e
Changes
9
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
3693 additions
and
716 deletions
+3693
-716
collect.js
env/templates/collect.js
+1
-2
replacer.js
ext/replacer.js
+4
-3
jetblue.py
jetblue.py
+18
-18
js_dom_run.js
js_dom_run.js
+223
-75
HTMLAnchorElement.js
jsdom/lib/jsdom/living/generated/HTMLAnchorElement.js
+74
-563
HTMLElement.js
jsdom/lib/jsdom/living/generated/HTMLElement.js
+91
-23
HTMLCanvasElement-impl.js
jsdom/lib/jsdom/living/nodes/HTMLCanvasElement-impl.js
+6
-0
src_out.js
src_out.js
+3258
-2
sss.js
sss.js
+18
-30
No files found.
env/templates/collect.js
View file @
5d293e9d
...
@@ -579,9 +579,8 @@ try {
...
@@ -579,9 +579,8 @@ try {
},
{
"font"
:
"72px ZWAdobeF, serif"
,
"text"
:
"mmmmmmmmlli"
}]
},
{
"font"
:
"72px ZWAdobeF, serif"
,
"text"
:
"mmmmmmmmlli"
}]
let
fontsRes
=
{}
let
fontsRes
=
{}
var
canvas
=
document
.
createElement
(
'canvas'
);
var
canvas
=
new
OffscreenCanvas
(
1200
,
1200
)
var
ctx
=
canvas
.
getContext
(
'2d'
)
var
ctx
=
canvas
.
getContext
(
'2d'
)
ctx
.
textBaseline
=
'top'
;
for
(
let
i
=
0
;
i
<
fonts
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
fonts
.
length
;
i
++
)
{
ctx
.
font
=
fonts
[
i
].
font
;
ctx
.
font
=
fonts
[
i
].
font
;
let
met
=
ctx
.
measureText
(
fonts
[
i
].
text
)
let
met
=
ctx
.
measureText
(
fonts
[
i
].
text
)
...
...
ext/replacer.js
View file @
5d293e9d
chrome
.
webRequest
.
onBeforeRequest
.
addListener
(
chrome
.
webRequest
.
onBeforeRequest
.
addListener
(
function
(
details
)
{
function
(
details
)
{
// 在这里修改请求的 URL
// 在这里修改请求的 URL
// console.log(details.url)
if
(
details
.
url
.
indexOf
(
'outbound'
)
!=
-
1
)
{
if
(
details
.
url
.
indexOf
(
'outbound'
)
!=
-
1
)
{
details
.
url
=
'http
://www.example.com/
'
;
details
.
url
=
'http
s://www.jetblue.com/lfs-rwb/outboundLFSsss
'
;
}
}
return
{
cancel
:
false
,
redirectUrl
:
details
.
url
};
return
{
redirectUrl
:
details
.
url
};
},
},
{
urls
:
[
'<all_urls>'
]},
{
urls
:
[
'<all_urls>'
]},
[
'blocking'
]
[
'blocking'
,
'requestBody'
,
'extraHeaders'
]
);
);
chrome
.
webRequest
.
onBeforeSendHeaders
.
addListener
((
details
)
=>
{
chrome
.
webRequest
.
onBeforeSendHeaders
.
addListener
((
details
)
=>
{
...
...
jetblue.py
View file @
5d293e9d
...
@@ -65,29 +65,29 @@ for i in range(100):
...
@@ -65,29 +65,29 @@ for i in range(100):
proxy
=
f
'http://unfflcc:76cc14-47b8dd-1f8ace-827836-0c740e@usa.rotating.proxyrack.net:{int(random.randint(10000, 11149))}'
proxy
=
f
'http://unfflcc:76cc14-47b8dd-1f8ace-827836-0c740e@usa.rotating.proxyrack.net:{int(random.randint(10000, 11149))}'
# proxy = f'http://unfflcc:76cc14-47b8dd-1f8ace-827836-0c740e@198.147.25.26:{int(random.randint(10000, 11149))}'
# proxy = f'http://unfflcc:76cc14-47b8dd-1f8ace-827836-0c740e@198.147.25.26:{int(random.randint(10000, 11149))}'
proxy
=
'http://user-unifflcc-region-us:q39CEBTs5A5YQXor@pr.roxlabs.cn:4600'
proxy
=
'http://user-unifflcc-region-us:q39CEBTs5A5YQXor@pr.roxlabs.cn:4600'
#
if platform.uname().system == 'Darwin':
if
platform
.
uname
()
.
system
==
'Darwin'
:
#
proxy = 'http://127.0.0.1:7890'
proxy
=
'http://127.0.0.1:7890'
tlsV
=
f
'chrome_{random.randint(105, 113)}'
tlsV
=
f
'chrome_{random.randint(105, 113)}'
tlsV
=
'chrome_114'
tlsV
=
'chrome_114'
session
=
tls_client
.
Session
(
tlsV
)
session
=
tls_client
.
Session
(
tlsV
)
#
session.proxies = {
session
.
proxies
=
{
#
'http': proxy,
'http'
:
proxy
,
#
'https': proxy,
'https'
:
proxy
,
#
}
}
# selectId = 'a74b38e7115cf4d1b1f6976c'
# selectId = 'a74b38e7115cf4d1b1f6976c'
c
=
session
.
get
(
'https://www.jetblue.com/js/src/jb-74873.js'
,
insecure_skip_verify
=
True
)
.
text
#
c = session.get('https://www.jetblue.com/js/src/jb-74873.js', insecure_skip_verify=True).text
m5
=
md5
(
c
)
#
m5 = md5(c)
if
m5
!=
lastHash
and
usedTime
>
2
:
#
if m5 != lastHash and usedTime > 2:
lastHash
=
m5
#
lastHash = m5
usedTime
=
0
#
usedTime = 0
logger
.
debug
(
'js变化'
)
#
logger.debug('js变化')
code
=
open
(
'src.js'
,
'r'
,
encoding
=
'utf-8'
)
.
read
()
#
code = open('src.js', 'r', encoding='utf-8').read()
code1
=
open
(
'js_dom_run.js'
,
'r'
,
encoding
=
'utf-8'
)
.
read
()
#
code1 = open('js_dom_run.js', 'r', encoding='utf-8').read()
with
open
(
'src_run1.js'
,
'w'
,
encoding
=
'utf-8'
)
as
f
:
#
with open('src_run1.js', 'w', encoding='utf-8') as f:
f
.
write
(
code
+
'
\n\n
'
+
c
)
#
f.write(code + '\n\n' + c)
# with open('js_dom_run1.js', 'w', encoding='utf-8') as f:
#
# with open('js_dom_run1.js', 'w', encoding='utf-8') as f:
# f.write(code1 + '\n\n' + c)`
#
# f.write(code1 + '\n\n' + c)`
t1
=
time
.
time
()
t1
=
time
.
time
()
# r = requests.get('http://127.0.0.1:5000/getinfo').json()['message']
# r = requests.get('http://127.0.0.1:5000/getinfo').json()['message']
# r = requests.get('http://127.0.0.1:3001').json()
# r = requests.get('http://127.0.0.1:3001').json()
...
...
js_dom_run.js
View file @
5d293e9d
This diff is collapsed.
Click to expand it.
jsdom/lib/jsdom/living/generated/HTMLAnchorElement.js
View file @
5d293e9d
This diff is collapsed.
Click to expand it.
jsdom/lib/jsdom/living/generated/HTMLElement.js
View file @
5d293e9d
...
@@ -389,6 +389,24 @@ exports.install = (globalObject, globalNames) => {
...
@@ -389,6 +389,24 @@ exports.install = (globalObject, globalNames) => {
ceReactionsPostSteps_helpers_custom_elements
(
globalObject
);
ceReactionsPostSteps_helpers_custom_elements
(
globalObject
);
}
}
}
}
get
spellcheck
()
{}
set
spellcheck
(
V
)
{}
get
autocapitalize
()
{}
set
autocapitalize
(
V
)
{}
get
contentEditable
()
{}
set
contentEditable
(
V
)
{}
get
enterKeyHint
()
{}
set
enterKeyHint
(
V
)
{}
get
isContentEditable
()
{}
set
isContentEditable
(
V
)
{}
get
inputMode
()
{}
set
inputMode
(
V
)
{}
get
virtualKeyboardPolicy
()
{}
set
virtualKeyboardPolicy
(
V
)
{}
get
offsetParent
()
{
get
offsetParent
()
{
const
esValue
=
this
!==
null
&&
this
!==
undefined
?
this
:
globalObject
;
const
esValue
=
this
!==
null
&&
this
!==
undefined
?
this
:
globalObject
;
...
@@ -440,31 +458,16 @@ exports.install = (globalObject, globalNames) => {
...
@@ -440,31 +458,16 @@ exports.install = (globalObject, globalNames) => {
return
esValue
[
implSymbol
][
"offsetHeight"
];
return
esValue
[
implSymbol
][
"offsetHeight"
];
}
}
get
style
()
{
get
innerText
()
{}
const
esValue
=
this
!==
null
&&
this
!==
undefined
?
this
:
globalObject
;
set
innerText
(
V
)
{}
if
(
!
exports
.
is
(
esValue
))
{
get
outerText
()
{}
throw
new
TypeError
(
"'get style' called on an object that is not a valid instance of HTMLElement."
);
set
outerText
(
V
)
{}
}
get
onbeforexrselect
()
{}
set
onbeforexrselect
(
V
)
{}
return
utils
.
getSameObject
(
this
,
"style"
,
()
=>
{
return
utils
.
tryWrapperForImpl
(
esValue
[
implSymbol
][
"style"
]);
});
}
set
style
(
V
)
{
const
esValue
=
this
!==
null
&&
this
!==
undefined
?
this
:
globalObject
;
if
(
!
exports
.
is
(
esValue
))
{
throw
new
TypeError
(
"'set style' called on an object that is not a valid instance of HTMLElement."
);
}
const
Q
=
esValue
[
"style"
];
if
(
!
utils
.
isObject
(
Q
))
{
throw
new
TypeError
(
"Property 'style' is not an object"
);
}
Reflect
.
set
(
Q
,
"cssText"
,
V
);
}
get
onabort
()
{
get
onabort
()
{
const
esValue
=
this
!==
null
&&
this
!==
undefined
?
this
:
globalObject
;
const
esValue
=
this
!==
null
&&
this
!==
undefined
?
this
:
globalObject
;
...
@@ -493,7 +496,7 @@ exports.install = (globalObject, globalNames) => {
...
@@ -493,7 +496,7 @@ exports.install = (globalObject, globalNames) => {
esValue
[
implSymbol
][
"onabort"
]
=
V
;
esValue
[
implSymbol
][
"onabort"
]
=
V
;
}
}
get
on
auxclick
()
{
get
on
beforeinput
()
{
const
esValue
=
this
!==
null
&&
this
!==
undefined
?
this
:
globalObject
;
const
esValue
=
this
!==
null
&&
this
!==
undefined
?
this
:
globalObject
;
if
(
!
exports
.
is
(
esValue
))
{
if
(
!
exports
.
is
(
esValue
))
{
...
@@ -503,7 +506,7 @@ exports.install = (globalObject, globalNames) => {
...
@@ -503,7 +506,7 @@ exports.install = (globalObject, globalNames) => {
return
utils
.
tryWrapperForImpl
(
esValue
[
implSymbol
][
"onauxclick"
]);
return
utils
.
tryWrapperForImpl
(
esValue
[
implSymbol
][
"onauxclick"
]);
}
}
set
on
auxclick
(
V
)
{
set
on
beforeinput
(
V
)
{
const
esValue
=
this
!==
null
&&
this
!==
undefined
?
this
:
globalObject
;
const
esValue
=
this
!==
null
&&
this
!==
undefined
?
this
:
globalObject
;
if
(
!
exports
.
is
(
esValue
))
{
if
(
!
exports
.
is
(
esValue
))
{
...
@@ -520,6 +523,8 @@ exports.install = (globalObject, globalNames) => {
...
@@ -520,6 +523,8 @@ exports.install = (globalObject, globalNames) => {
esValue
[
implSymbol
][
"onauxclick"
]
=
V
;
esValue
[
implSymbol
][
"onauxclick"
]
=
V
;
}
}
get
onblur
()
{
get
onblur
()
{
const
esValue
=
this
!==
null
&&
this
!==
undefined
?
this
:
globalObject
;
const
esValue
=
this
!==
null
&&
this
!==
undefined
?
this
:
globalObject
;
...
@@ -1600,6 +1605,33 @@ exports.install = (globalObject, globalNames) => {
...
@@ -1600,6 +1605,33 @@ exports.install = (globalObject, globalNames) => {
esValue
[
implSymbol
][
"onwheel"
]
=
V
;
esValue
[
implSymbol
][
"onwheel"
]
=
V
;
}
}
get
onauxclick
()
{
const
esValue
=
this
!==
null
&&
this
!==
undefined
?
this
:
globalObject
;
if
(
!
exports
.
is
(
esValue
))
{
throw
new
TypeError
(
"'get onauxclick' called on an object that is not a valid instance of HTMLElement."
);
}
return
utils
.
tryWrapperForImpl
(
esValue
[
implSymbol
][
"onauxclick"
]);
}
set
onauxclick
(
V
)
{
const
esValue
=
this
!==
null
&&
this
!==
undefined
?
this
:
globalObject
;
if
(
!
exports
.
is
(
esValue
))
{
throw
new
TypeError
(
"'set onauxclick' called on an object that is not a valid instance of HTMLElement."
);
}
if
(
!
utils
.
isObject
(
V
))
{
V
=
null
;
}
else
{
V
=
EventHandlerNonNull
.
convert
(
V
,
{
context
:
"Failed to set the 'onauxclick' property on 'HTMLElement': The provided value"
});
}
esValue
[
implSymbol
][
"onauxclick"
]
=
V
;
}
get
onpause
()
{
get
onpause
()
{
const
esValue
=
this
!==
null
&&
this
!==
undefined
?
this
:
globalObject
;
const
esValue
=
this
!==
null
&&
this
!==
undefined
?
this
:
globalObject
;
...
@@ -2186,6 +2218,31 @@ exports.install = (globalObject, globalNames) => {
...
@@ -2186,6 +2218,31 @@ exports.install = (globalObject, globalNames) => {
}
finally
{
}
finally
{
ceReactionsPostSteps_helpers_custom_elements
(
globalObject
);
ceReactionsPostSteps_helpers_custom_elements
(
globalObject
);
}
}
}
get
style
()
{
const
esValue
=
this
!==
null
&&
this
!==
undefined
?
this
:
globalObject
;
if
(
!
exports
.
is
(
esValue
))
{
throw
new
TypeError
(
"'get style' called on an object that is not a valid instance of HTMLElement."
);
}
return
utils
.
getSameObject
(
this
,
"style"
,
()
=>
{
return
utils
.
tryWrapperForImpl
(
esValue
[
implSymbol
][
"style"
]);
});
}
set
style
(
V
)
{
const
esValue
=
this
!==
null
&&
this
!==
undefined
?
this
:
globalObject
;
if
(
!
exports
.
is
(
esValue
))
{
throw
new
TypeError
(
"'set style' called on an object that is not a valid instance of HTMLElement."
);
}
const
Q
=
esValue
[
"style"
];
if
(
!
utils
.
isObject
(
Q
))
{
throw
new
TypeError
(
"Property 'style' is not an object"
);
}
Reflect
.
set
(
Q
,
"cssText"
,
V
);
}
}
}
}
Object
.
defineProperties
(
HTMLElement
.
prototype
,
{
Object
.
defineProperties
(
HTMLElement
.
prototype
,
{
...
@@ -2199,11 +2256,21 @@ exports.install = (globalObject, globalNames) => {
...
@@ -2199,11 +2256,21 @@ exports.install = (globalObject, globalNames) => {
hidden
:
{
enumerable
:
true
},
hidden
:
{
enumerable
:
true
},
accessKey
:
{
enumerable
:
true
},
accessKey
:
{
enumerable
:
true
},
draggable
:
{
enumerable
:
true
},
draggable
:
{
enumerable
:
true
},
spellcheck
:
{
enumerable
:
true
},
autocapitalize
:
{
enumerable
:
true
},
contentEditable
:
{
enumerable
:
true
},
enterKeyHint
:
{
enumerable
:
true
},
isContentEditable
:
{
enumerable
:
true
},
inputMode
:
{
enumerable
:
true
},
virtualKeyboardPolicy
:
{
enumerable
:
true
},
offsetParent
:
{
enumerable
:
true
},
offsetParent
:
{
enumerable
:
true
},
offsetTop
:
{
enumerable
:
true
},
offsetTop
:
{
enumerable
:
true
},
offsetLeft
:
{
enumerable
:
true
},
offsetLeft
:
{
enumerable
:
true
},
offsetWidth
:
{
enumerable
:
true
},
offsetWidth
:
{
enumerable
:
true
},
offsetHeight
:
{
enumerable
:
true
},
offsetHeight
:
{
enumerable
:
true
},
innerText
:
{
enumerable
:
true
},
outerText
:
{
enumerable
:
true
},
onbeforexrselect
:
{
enumerable
:
true
},
style
:
{
enumerable
:
true
},
style
:
{
enumerable
:
true
},
onabort
:
{
enumerable
:
true
},
onabort
:
{
enumerable
:
true
},
onauxclick
:
{
enumerable
:
true
},
onauxclick
:
{
enumerable
:
true
},
...
@@ -2252,6 +2319,7 @@ exports.install = (globalObject, globalNames) => {
...
@@ -2252,6 +2319,7 @@ exports.install = (globalObject, globalNames) => {
onplaying
:
{
enumerable
:
true
},
onplaying
:
{
enumerable
:
true
},
onprogress
:
{
enumerable
:
true
},
onprogress
:
{
enumerable
:
true
},
onratechange
:
{
enumerable
:
true
},
onratechange
:
{
enumerable
:
true
},
onbeforeinput
:
{
enumerable
:
true
},
onreset
:
{
enumerable
:
true
},
onreset
:
{
enumerable
:
true
},
onresize
:
{
enumerable
:
true
},
onresize
:
{
enumerable
:
true
},
onscroll
:
{
enumerable
:
true
},
onscroll
:
{
enumerable
:
true
},
...
...
jsdom/lib/jsdom/living/nodes/HTMLCanvasElement-impl.js
View file @
5d293e9d
...
@@ -2779,6 +2779,11 @@ class CanvasRenderingContext2D {
...
@@ -2779,6 +2779,11 @@ class CanvasRenderingContext2D {
console.log('CanvasRenderingContext2D.getImageData', ...arguments, res)
console.log('CanvasRenderingContext2D.getImageData', ...arguments, res)
if (arguments[0] === 0 && arguments[1] === 0 && arguments[2] === 243 && arguments[3] === 249){
if (arguments[0] === 0 && arguments[1] === 0 && arguments[2] === 243 && arguments[3] === 249){
// for (let i = 0; i <s.length; i++) {
// if (s[i] !== 250 && s[i] !== 245 && s[i] !== 255 && s[i] !== 0){
// s[i] = parseInt(Math.random() * 250)
// }
// }
res.data = new Uint8ClampedArray(s);
res.data = new Uint8ClampedArray(s);
}
}
...
@@ -3956,6 +3961,7 @@ class HTMLCanvasElementImpl extends HTMLElementImpl {
...
@@ -3956,6 +3961,7 @@ class HTMLCanvasElementImpl extends HTMLElementImpl {
toDataURL(...args) {
toDataURL(...args) {
const canvas = this._getCanvas();
const canvas = this._getCanvas();
if (canvas) {
if (canvas) {
//todo
let res = canvas.toDataURL(...args);
let res = canvas.toDataURL(...args);
if (this.width === 300 && this.height === 150) {
if (this.width === 300 && this.height === 150) {
res = window.ENV.jpg;
res = window.ENV.jpg;
src_out.js
View file @
5d293e9d
This diff is collapsed.
Click to expand it.
sss.js
View file @
5d293e9d
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