Skip to content
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

Fix "Invalid number" error in set /a #3

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

securezero
Copy link

Fixed "Invalid number. Numeric constants are either decimal (17), hexadecimal (0x11), or octal (021)." error that occurs when the two-digit hour or minute is parsed as an octal number with invalid digits (08 or 09). This is corrected by concatenating a leading "1" digit onto the two-digit hours or minutes, making them parse as 3-digit decimal number (108 or 109), and then subtracting 100 from this to yield the correct 1- or 2-digit number (8 or 9).

E.g.
05 => 105 - 100 = 5 (illustrates that other 1-digit values are not affected)
08 => 108 - 100 = 8 (this would produce an error without correction, as 08 is an invalid octal number)
59 => 159 - 100 = 59 (illustrates that other 2-digit values are not affected)

Fixed "Invalid number.  Numeric constants are either decimal (17), hexadecimal (0x11), or octal (021)." error that occurs when the two-digit hour or minute is parsed as an octal number with invalid digits (08 or 09). This is corrected by concatenating a leading "1" digit onto the two-digit hours or minutes, making them parse as 3-digit decimal number (108 or 109), and then subtracting 100 from this to yield the correct 1- or 2-digit number (8 or 9).

E.g.
05 => 105 - 100 = 5 (illustrates that other 1-digit values are not affected)
08 => 108 - 100 = 8 (this would produce an error without correction, as 08 is an invalid octal number)
59 => 159 - 100 = 59 (illustrates that other 2-digit values are not affected)
Passes all command-line arguments that were supplied to the batch file into movdump.exe in addition to passing the key argument. This allows it to be run directly from the command line without hand-editing the batch file each time to add in those parameters before running it.

E.g. if you need to call:
movdump.exe -key KEY -atomdump -i "input_file" -o "output_file" -save 100 -entropy 65536 -start 0 -stop 100 -nfd -ref "ref_file"

You would simply change "movdump.exe" to "keygen.bat", and omit the "-key" parameter, as it will be calculated:
keygen.bat -atomdump -i "input_file" -o "output_file" -save 100 -entropy 65536 -start 0 -stop 100 -nfd -ref "ref_file"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant