-
Notifications
You must be signed in to change notification settings - Fork 223
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
New Task: Added Hashcat Command Validation #672
base: master
Are you sure you want to change the base?
Conversation
When creating new task, the hashcat command is parsed and validated by Optparse.js and Optparse Hashtopolis plugin. Task name is marked as required as well.
Added support of Combinator Attack validation
Added Optparse Hashtopolis Plugin version to 0.2 to add support of Combinator attack command validation. |
Modified the display of "Estimated time" to display a number of years if days are over 365 days. |
Also updated Hashtopolis plugin version to v1.1.1
Thanks for the contribution!
Please let me know if there is anything not clear or if you are not sure how you should change some parts, I will try to help with that, or implement it afterwards. |
Agree with your points and concerns.
I will try to work on the first 2 points. Hope I can help you to improve Hashtopolis. |
Thanks for looking into it. Regarding the new attack mode. As far as I remember correctly, in 6.1.1 release this was not implemented, it was added since and is available on the master branch on the repository. |
Correct me if I am wrong, but it seems the parser does not correctly parse attack commands that have multiple consecutive spaces in it. Hashcat does accept such commands. |
Show estimated total runtime of a supertask, allowing the user to interactively size a supertask by adding or removing subtasks * Allow adding and removing subtasks to supertask * Parse hashcat command to compute runtime per subtask. Gratefully uses the code submitted by shivanraptor in hashtopolis#672 * Save line count of dictionary files and rule files in database * Compute runtime per subtask of supertask, depending on benchmark values entered by the user * Works for -a0 and -a3 hashcat attacks. Adds 'Unknown' to runtime estimate when not every subtask runtime could be estimated * Feature includes custom charsets for masks in -a3 attacks
if($days > 365.25) { // taken leap year into consideration | ||
$years = floor($days / 365.25); | ||
$days = $days % 365.25; | ||
$return = number_format($years) . "y " . $days . "d "; |
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.
Would this not yield the same results?
if ($seconds >= 86400*365.25) {
return .= gmdate("Y", $seconds)."y ";
}
if ($seconds >= 86400) {
return .= gmdate("d", $seconds)."d ";
}
return $return.gmdate("H:i:s", $seconds);
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.
There are typos. In both lines within the if
clause, the return
should be $return
instead. No offence, but your suggested code works exactly the same as my code, isn't it?
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.
A lot less math is involved and it's in line with other code, using the same functions
@@ -382,4 +383,37 @@ <h2>New task</h2> | |||
</div> | |||
</div> | |||
</form> | |||
<script src="https://cdn.jsdelivr.net/gh/shivanraptor/[email protected]/lib/optparse.js"></script> | |||
<script src="https://cdn.jsdelivr.net/gh/shivanraptor/[email protected]/lib/optparse.hashtopolis.js"></script> |
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.
external library might need to be made internal?
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.
Right, the author said so too. I'm going to update the pull request.
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.
Added the changes at commit 5e4b955
Fixed also some HTML minor problems
When creating a new task, the
hashcat
command is parsed and validated by Optparse.js and Optparse Hashtopolis plugin.The task name is marked as required as well, and the total length of the command is checked (now limited to 200) to avoid database field truncation.