debug.exe questions | hex replace

  • Thread starter Thread starter Dennis
  • Start date Start date
D

Dennis

well.. i found this:
http://groups.google.de/groups?hl=de&lr=&ie=UTF-8&oe=UTF-8&[email protected]

this is exactly what i´m searching for.

testet the given script:
@echo off
echo eACCD 00 ff > ~script.txt
echo w >> ~script.txt
echo q >> ~script.txt
debug c:\hit-it.fil < ~script.txt > nul
del ~script.txt

problem here is, that my file is bigger than 64kbyte and the offset
is much higher than feff, it´s like 0x34aaah..

is there a way to push the workspace to a higher offset? i mean.. is
it possible to work with 30001-3feff instead of 0001-feff?
i like the simple way, debug.exe uses, to replace hex values, and it´s
perfekt, that it´s an onboard (not 3rd party) tool..

currently i´m searching for the offset using gsar.exe. but i don´t
want
to use 3rd party tools, is it possible to search for an offset with
debug.exe?

thx for any help!

dennis
 
Dennis said:
this is exactly what i´m searching for.

testet the given script:
@echo off
echo eACCD 00 ff > ~script.txt
echo w >> ~script.txt
echo q >> ~script.txt
debug c:\hit-it.fil < ~script.txt > nul
del ~script.txt

problem here is, that my file is bigger than 64kbyte and the offset
is much higher than feff, it´s like 0x34aaah..

@echo off
echo Bj@jzh`0X-`/PPPPPPa(DE(DM(DO(Dh(Ls(Lu(LX(LeZRR]EEEUYRX2Dx=>patch.com
echo 0DxFP,0Xx.t0P,=XtGsB4o@$?PIyU WwX0GwUY Wv;ovBX2Gv0ExGIuht6>>patch.com
echo ?@}IKuNWZp~r~lpkH@sRIfw`{ECCuqosux{O_KK?q`{Se{kRkgvLokf?Cd>>patch.com
echo ?B@D??r@1zD?@OPUj~lBlzJeCc@suKMNep@vyM?@xAwMeTZpPoL~sq@w`o>>patch.com
echo sat`LB?tjj`{@zAHhH?wL?susJ`c`L~Kt@w[}eGc~~~~Lj~=LjB~0x>>patch.com

patch 0002a010 F66C66FFFF00F4E5AFF5F582 <infile >outfile

:: infile must no be outfile
:: replace the bytes at 0x0002a010 with F66C66FFFF00F4E5AFF5F582
:: you can insert spaces at any position, but the first 8 hex
:: characteres are used as the address, so an identical command is:

patch 00 02 a0 10 F6 6C 66 FF FF 00 F4 E5 AF F5 F5 82 <infile >outfile2

del patch.com
 
Herbert Kleebauer said:
Dennis said:
this is exactly what i´m searching for.

testet the given script:
@echo off
echo eACCD 00 ff > ~script.txt
echo w >> ~script.txt
echo q >> ~script.txt
debug c:\hit-it.fil < ~script.txt > nul
del ~script.txt

problem here is, that my file is bigger than 64kbyte and the offset
is much higher than feff, it´s like 0x34aaah..

@echo off
echo Bj@jzh`0X-`/PPPPPPa(DE(DM(DO(Dh(Ls(Lu(LX(LeZRR]EEEUYRX2Dx=>patch.com
echo 0DxFP,0Xx.t0P,=XtGsB4o@$?PIyU WwX0GwUY Wv;ovBX2Gv0ExGIuht6>>patch.com
echo ?@}IKuNWZp~r~lpkH@sRIfw`{ECCuqosux{O_KK?q`{Se{kRkgvLokf?Cd>>patch.com
echo ?B@D??r@1zD?@OPUj~lBlzJeCc@suKMNep@vyM?@xAwMeTZpPoL~sq@w`o>>patch.com
echo sat`LB?tjj`{@zAHhH?wL?susJ`c`L~Kt@w[}eGc~~~~Lj~=LjB~0x>>patch.com

patch 0002a010 F66C66FFFF00F4E5AFF5F582 <infile >outfile

:: infile must no be outfile
:: replace the bytes at 0x0002a010 with F66C66FFFF00F4E5AFF5F582
:: you can insert spaces at any position, but the first 8 hex
:: characteres are used as the address, so an identical command is:

patch 00 02 a0 10 F6 6C 66 FF FF 00 F4 E5 AF F5 F5 82 <infile >outfile2

del patch.com

thx a lot, this is a very usefull script(tool).
 
Back
Top