flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
revolution 19 Jul 2019, 12:10
There shouldn't be any difference.
Which debugger are you using? How are you starting the program for debugging? |
|||
![]() |
|
int0x50 19 Jul 2019, 12:19
x64dbg.
|
|||
![]() |
|
edfed 19 Jul 2019, 12:24
hum... maybe under the debugger you don't pass all the command line....
in cmd, you will pass the full command, including the executable name. in the debugger, it's maybe possible this token is not present. if it's that, the solution would be to ignore the first token only if it's equal the executable name. |
|||
![]() |
|
revolution 19 Jul 2019, 13:14
You can do a comparison by simply printing the full string returned by GetCommandLineA and look for any differences.
|
|||
![]() |
|
DimonSoft 19 Jul 2019, 14:15
Seems to be the case of which parameters CreateProcess ends up being passed by different means of running the program. Since you skip everything until the first space whenever command line parameters get passed through a separate parameter to CreateProcess the first space becomes the one after your 11111 parameter.
|
|||
![]() |
|
bitRAKE 19 Jul 2019, 19:23
When I use x64dbg and change the commandline, it will provide the executable name as the first parameter by default - there is no need to leave it unchanged unless one wants the same effect of using the shell. The shell execution interface is a subset of what CreateProcess/x64dbg allows.
|
|||
![]() |
|
int0x50 20 Jul 2019, 03:45
cmd.exe adds extra space between the program name and the first argument. that's the reason my validation failed. The debugger does not do this, hence my validation worked.
Now whenever I run it in cmd.exe, I have to add ' inc esi '. Remark this line whenever I debug it. thank you all. |
|||
![]() |
|
revolution 20 Jul 2019, 05:09
If the user types two or more spaces between arguments then it will fail also.
|
|||
![]() |
|
int0x50 21 Jul 2019, 08:58
revolution, exactly. I am trying to figure out how to solve this problem. I think I have to traverse till i get a character.
|
|||
![]() |
|
revolution 21 Jul 2019, 11:51
int0x50 wrote: I think I have to traverse till i get a character. You can make it a function call to make the code easier to understand. |
|||
![]() |
|
Furs 22 Jul 2019, 11:49
You also need to handle quotes and stuff if you don't want to confuse the user, the "rules" are not that straightforward. Better use CommandLineToArgvW.
|
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.