Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
K
koishi-plugin-hisoutensoku-jammer
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
koishi-plugin-hisoutensoku-jammer
Commits
46d57369
Commit
46d57369
authored
Mar 04, 2022
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
send with interval
parent
9ae09bec
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
dev/index.ts
dev/index.ts
+1
-1
src/index.ts
src/index.ts
+2
-2
No files found.
dev/index.ts
View file @
46d57369
...
...
@@ -26,6 +26,6 @@ app.plugin(DatabasePlugin);
app
.
plugin
(
ExtrasInDev
);
// Target plugin
app
.
plugin
(
TargetPlugin
,
{
}
as
any
);
app
.
plugin
(
TargetPlugin
,
{
attackTimeout
:
120000
}
);
app
.
start
();
src/index.ts
View file @
46d57369
...
...
@@ -204,7 +204,7 @@ export default class HisoutensokuJammerPlugin implements OnApply {
const
currentTime
=
moment
();
while
(
moment
().
diff
(
currentTime
)
<=
this
.
config
.
attackTimeout
)
{
const
attacker
=
new
Attacker
(
address
,
port
,
1000
);
let
err
;
let
err
:
string
;
try
{
err
=
await
attacker
.
attack
();
}
catch
(
e
)
{
...
...
@@ -214,8 +214,8 @@ export default class HisoutensokuJammerPlugin implements OnApply {
this
.
log
.
warn
(
`Attack of
${
address
}
:
${
port
}
failed:
${
err
}
`
);
}
else
{
this
.
log
.
info
(
`Attack of
${
address
}
:
${
port
}
succeeded.`
);
await
new
Promise
<
void
>
((
resolve
)
=>
setTimeout
(
resolve
,
10
));
}
await
new
Promise
<
void
>
((
resolve
)
=>
setTimeout
(
resolve
,
10
));
}
this
.
log
.
info
(
`Attack of
${
address
}
:
${
port
}
finished.`
);
return
true
;
...
...
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