-
-
Notifications
You must be signed in to change notification settings - Fork 713
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#8721 having some trouble #5769
base: main
Are you sure you want to change the base?
Conversation
…t resume is not working. It might be that we can just use the start logic.
@thc202 Hey, sorry to bother you, but we got pretty stuck trying to figure out the best way to fix this. We are stuck trying to get resumeScan to work in attackThread. It seems like it should just match 1 to 1 in the spider thing but it doesn't seem to be working that way. Sorry this whole file is a mess at the moment, we just have been trying to add comments in places to try to fix things but the main issue right now is in AttackThread.java If you have any guidance on the matter, it would be really helpful. I think we are missing something to link the resumeScan function to the corrresponding component in the spider dependency. |
private boolean pauseAttack = false; | ||
private boolean resumeAttack = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you have two variables for this? Either it's paused or not. Trying to keep track of 4 possible values is just a headache
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was trying to find a good trigger for unpausing and I wasn't sure how to best have it trigger. Right now there is a check to see if it is stopped which triggers the stopscan feature and I needed things for pause and resume scan. The issue though was if I just check if pauseAttack is false, I risk causing trouble in the code where it will try to resume scan.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn’t paused false be the same as resumed true?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, starting out, both are false. This means it is just starting. But once the pause button is pressed, pause is true and resume is false and ideally pausing happens. Then, when resume happens, pause is false but resume is true which ideally should cause the app to resume instead of using start.
@@ -263,6 +263,7 @@ private JToggleButton getPauseScanButton() { | |||
new ImageIcon(getClass().getResource("/resource/icon/16/131.png"))); | |||
pauseScanButton.setEnabled(false); | |||
pauseScanButton.addActionListener(e -> pauseScan()); | |||
// something is amiss |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are you futzing with token gen?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're trying to figure out other places that pause the Scan to try and see what can imitated with the resumescan feature. So we have a couple comments to mark things of interest
if (pauseAttack) { | ||
LOGGER.debug("Attack paused manually"); | ||
// extension.notifyProgress(Progress.paused); | ||
return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These pause checks outside the "wait loops" should wait instead of return (which would behave like stopping).
@@ -121,7 +142,15 @@ public void run() { | |||
if (this.stopAttack) { | |||
spiderScan.stopScan(); | |||
break; | |||
} else if (this.pauseAttack) { | |||
spiderScan.pauseScan(); | |||
break; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't break here nor in the resume.
if (stopAttack) { | ||
LOGGER.debug("Attack stopped manually"); | ||
extension.notifyProgress(Progress.stopped); | ||
return; | ||
} | ||
|
||
if (pauseAttack) { | ||
LOGGER.debug("Attack paused manually"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use error and you will even see them in the output tab :)
#5769 (comment) I think the/a problem is #5769 (comment) since that would make the (quick start) scan continue when paused. |
Overview
Briefly describe the purpose, goals, and changes or improvements made in this pull request.
Related Issues
Specify any related issues or pull requests by linking to them.
Checklist
./gradlew spotlessApply
for code formattingFor more details, please refer to the developer rules and guidelines.