doskitXPx86

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Message
Author
foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: doskitXP32x86

#31 Post by foxidrive » 22 Jul 2012 21:36

I see a raw disk directory, with files here: http://www.ed-dyreen.com/public/doskit/

Liviu
Expert
Posts: 470
Joined: 13 Jan 2012 21:24

Re: doskitXP32x86

#32 Post by Liviu » 23 Jul 2012 10:04

foxidrive wrote:I see a raw disk directory, with files here: http://www.ed-dyreen.com/public/doskit/

That's quite odd, I am getting a 404 (not found) on both your link and just the public/ one.

The domain resolves to "pinging ed-dyreen.com [194.116.202.20]" here. Are you seeing the same IP? This just to eliminate possible DNS registration/propagation issues.

Liviu

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: doskitXP32x86

#33 Post by foxidrive » 23 Jul 2012 10:30

Pings successfully here at the same IP address.

Code: Select all

Pinging www.ed-dyreen.com [194.116.202.20] with 32 bytes of data:


There could possibly be some geo-ip restrictions in place. Try it on a proxy server: http://www.vtunnel.com/

with the proxy server (and direct) and using ed-dyreen.com I see a fully fledged web page there now.

But using the proxy server and ed-dyreen.com/public/doskit/ I get this:

Not Found

The requested URL /public/doskit/ was not found on this server.


but directly I see a raw disk directory of files.


I can't post more than 2 URLs according to the forum so I changed a couple.

Liviu
Expert
Posts: 470
Joined: 13 Jan 2012 21:24

Re: doskitXP32x86

#34 Post by Liviu » 23 Jul 2012 11:22

foxidrive wrote:Try it on a proxy server

Curiouser and curiouser... vtunnel did not work for me, but http://www.1proxy.de/ did, for both the public/ and public/doskit/ directories. Not sure if Ed blacklisted us, US is blocking Ed ;-) or (most likely) his host has messed up some routing tables.

Liviu

Ed Dyreen
Expert
Posts: 1569
Joined: 16 May 2011 08:21
Location: Flanders(Belgium)
Contact:

Re: doskitXP32x86

#35 Post by Ed Dyreen » 11 Oct 2012 13:35

'
Site off-line, expected to be on-line again sometime in the future. Sorry

Topic closed

Squashman
Expert
Posts: 4471
Joined: 23 Dec 2011 13:59

Re: doskitXP32x86

#36 Post by Squashman » 23 Apr 2014 17:48

Ed Dyreen wrote:'
Site off-line, expected to be on-line again sometime in the future. Sorry

Topic closed


When might that be. :D

Ed Dyreen
Expert
Posts: 1569
Joined: 16 May 2011 08:21
Location: Flanders(Belgium)
Contact:

Re: doskitXP32x86

#37 Post by Ed Dyreen » 12 Feb 2015 20:02

Squashman wrote:
Ed Dyreen wrote:'
Site off-line, expected to be on-line again sometime in the future. Sorry

Topic closed


When might that be. :D
Actually, I quit this project somewhere in 2013 due to the fact that it was getting too slow to be useful. Around that time I got pretty good with VBS and since it's a 100 times faster, I saw no reason to continue this project.

Lately I was looking for ways to protect and obfuscate my programs. In high level languages this is difficult due to the fact they are so abstract, and well known. Programs written in Java or any other High level programming language are easily understood if one obtains the source-code.

Then I remembered good old DOS. Since DOS batch programming is in essence one trick after another I realized it's usefulness. I was looking for ways to hide the fact that I was hiding. I realized it would be almost impossible, even for an expert to detect hidden functionality in the code.

But I had to tackle performance issues. When a batch file grows in size and functions, performance of the CALL command drops dramatically. To counter this, I tried to replace most functions with macro's. I then realized when more memory is used, performance of SETLOCAL ENDLOCAL also drops dramatically.

I then started doing memory dumps from macro's to minimize actual memory. Although now I had to use an extra call to load the macro when it was needed, I now believe I have a good balance.

However my library still only works on XP, and some functions are language dependent, so it's usefulness to other people is doubtful. Anyways I will soon upload, share and unlock this topic just for the fun of it.

But to give you an idea of a memory dump. It is so beautifully complex and obfuscated, even I wouldn't decipher it easily.

Code: Select all

:: (arrayPut_:enaDelayed) '6765' bytes on file, '3597' bytes in memory.
:: (
%=   =%for %%# in ("") do set ^"arrayPut_=for %%!""!? in ^(1,2^) do if %%!""!?==2 ^(set º=^^^!*:§=§0^^^!%$n1c%
%=      =%set º=^^^!º:^"=^"^"^^^!%$n1c%
%=      =%set ^"º=^^^!º:^^^^=^^^^^^^^^^^^^^^^^^^!^"%$n1c%
%=      =%for /F ^"usebacktokens=1-3eol=¦delims=¦^" %%!""!r in ^('^^^!pathext^^^!¦^^^!path^^^!'^) do ^(set pathext=;^&set path=%$n1c%
%=      =%call set ^"º=%%!""!^^^^º:^^^^^^^!=§#^^^^^^^!%%!""!^"%$n1c%
%=      =%set pathext=%%!""!r^&set path=%%!""!s^)%$n1c%
%=      =%set ^"º=^^^!º:§#=^^^^^^^^^^^^^^^!^"%$n1c%
%=      =%set º=^^^!º:^"^"=^"^^^!%$n1c%
%=      =%set º=^^^!º:\%$bs%*=\*^^^!%$n1c%
%=      =%set º=^^^!º:\*=§4^^^!%$n1c%
%=      =%set º=^^^!º:?=§6^^^!%$n1c%
%=      =%set ?=^&for %%!""!? in ^(^^^!º^^^!^) do set ?=^^^!?^^^!¦%%!""!?%$n1c%
%=      =%if ^"^^^!?^^^!^"==^"¦^^^^^^^^^^^^^^^!^" set ?=###^"^"%$n1c%
%=      =%set ?=^^^!?:§6=?^^^!%$n1c%
%=      =%set ?=^^^!?:§4=\%$bs%*^^^!%$n1c%
%=      =%set ?=^^^!?:§0=§^^^!^)^&for /F ^"tokens=1-26delims=¦^" %%!""!a in ^(^"^^^!?:~3^^^!^"^) do ^(for %%!""!? in ^(1,2^) do if %%!""!?==2 ^(for %%!""!? in ^(^^^!~^^^!^) do ^(if ^^^!§inline^^^!.==. echo^(%$n1c%
%=      =%set/A$debug+=1,£e=0,§inline=1%$n1c%
%=      =%set $trace=%%!""!~?%$n1c%
%=      =%set $debug[^^^!$debug^^^!]=%%!""!~?%$n1c%
%=      =%set $%%!""!~?.p=^^^!*^^^!^&if ^^^!*:~0^^^^,1^^^!==^^^^^^^^^^^^^^^! set $%%!""!~?.p=^^^!*:~1^^^!%$n1c%
%=      =%set $r=£e^)^)else set ~=arrayPut_%$n1c%
%=      =%for %%!""!? in ^(1,2^) do if %%!""!?==2 ^(for /F ^"usebacktokens=1-3eol=¦delims=¦^" %%!""!r in ^('^^^!pathext^^^!¦^^^!path^^^!'^) do ^(set pathext=;^&set path=%$n1c%
%=      =%set ?=^^^!~:~1^^^!%$n1c%
%=      =%set ?=^^^!?:§=§0^^^!%$n1c%
%=      =%set ?=^^^!?:^"=^"^"^^^!%$n1c%
%=      =%set ^"?=^^^!?:^^^^=§9^^^!^"^&call set ^"?=%%!""!^^^^?:^^^^^^^!=§3%%!""!^"%$n1c%
%=      =%set ?=^^^!?:^"^"=^"^^^!%$n1c%
%=      =%set ?=^^^!?:\%$bs%*=\*^^^!%$n1c%
%=      =%set ?=^^^!?:\*=§4^^^!%$n1c%
%=      =%set ?=^^^!?:?=§6^^^!%$n1c%
%=      =%set ?=^^^!?:,,=§1,^"^",^^^!%$n1c%
%=      =%set ~=^&for %%!""!? in ^(^^^!?^^^!^) do set ^"?=%%!""!?^"^&set ~=^^^!~^^^!,^^^!?^^^!^&if ^^^!?:~-1^^^!==' ^(set ó=^&set ô=^&set ò=%$n1c%
%=      =%set ?=^^^!~:~2,-1^^^!%$n1c%
%=      =%for %%!""!? in ^(^^^!?^^^!^) do set ~=%%!""!?^&for %%!""!? in ^(ó,ô,ò^) do if ^^^!%%!""!?^^^!.==. if defined ~ set %%!""!?=^^^!~:§1=^^^!^&set ~=%$n1c%
%=      =%set ó=^^^!ó:§0=§^^^!%$n1c%
%=      =%set #=^&if defined ò set #=1%$n1c%
%=      =%for %%!""!? in ^(ô,ò^) do ^(set *=^&if ^^^!%%!""!?:~0^^^^,1^^^!==^^^^^" if ^^^!%%!""!?:~-1^^^!==^^^^^" set *=1%$n1c%
%=      =%if ^^^!*^^^!==1 ^(set %%!""!?=^^^!%%!""!?:~1,-1^^^!%$n1c%
%=      =%if defined %%!""!? set %%!""!?=^^^!%%!""!?:^"^"=^^^^^"^^^!^)else set º=^^^!%%!""!?:§0=§^^^!^&if defined ^^^!º^^^! ^(for %%!""!@ in ^(^^^!º^^^!^) do set %%!""!?=^^^!%%!""!@^^^!%$n1c%
%=      =%set %%!""!?=^^^!%%!""!?:§=§0^^^!^)else set %%!""!?=^)%$n1c%
%=      =%if ^^^!ô^^^!.==. if defined ò ^(set ô=^^^!ò^^^!^)else if ^^^!#^^^!.==. for %%!""!? in ^(1,2^) do if %%!""!?==2 ^(call ^"^^^!$function.fullPathFile^^^!^" panic_ ^^^!~^^^!^^^^^^^!^&set/A£e=errorlevel%$n1c%
%=      =%exit ^^^!£e^^^!^)else set ~=2%$n1c%
%=      =%if defined ô for %%!""!? in ^(^"^^^!$lf^^^!^"^) do ^(set ô=^^^!ô:%%!""!~?=§2^^^!%$n1c%
%=      =%set ô=^^^!ô:^"=^"^"^^^!%$n1c%
%=      =%set ^"ô=^^^!ô:^^^^=§9^^^!^"%$n1c%
%=      =%call set ^"ô=%%!""!^^^^ô:^^^^^^^!=§3%%!""!^"%$n1c%
%=      =%set ô=^^^!ô:\%$bs%*=\*^^^!%$n1c%
%=      =%set ô=^^^!ô:\*=§4^^^!%$n1c%
%=      =%set ô=^^^!ô:?=§6^^^!%$n1c%
%=      =%set ^"ô=^^^!ô:§9=^^^^^^^!^"%$n1c%
%=      =%call set ^"ô=%%!""!^^^^ô:§3=^^^^^^^!%%!""!^"%$n1c%
%=      =%set ô=^^^!ô:^"^"=^"^^^!%$n1c%
%=      =%set ô=^^^!ô:§2=%%!""!~?^^^!%$n1c%
%=      =%set ô=^^^!ô:§4=\%$bs%*^^^!%$n1c%
%=      =%set ô=^^^!ô:§6=?^^^!%$n1c%
%=      =%set ô=^^^!ô:§0=§^^^!^)%$n1c%
%=      =%if ^^^!$debug.sub^^^!==^^^!$trace^^^! echo^(^>con^&^>con^<nul set/p= set '^^^!ó^^^!=^^^!ô^^^!'^^^^^^^^^^^^^^^!%$n1c%
%=      =%set ^^^!ó^^^!=^^^!ô^^^!^)%$n1c%
%=      =%set pathext=%%!""!r^&set path=%%!""!s^)^)else set ~=^^^^^^^^^^^^^^^!'v,^"%%!""!a^"','l,%%!""!b,^"^"'%$n1c%
%=      =%echo^(^&^<nul set/p= ^^^!$trace^^^!^^^^^(%%!""!a;%%!""!~b^^^^^)%$n1c%
%=      =%set/A$debug-=2,%%!""!a+=1%$n1c%
%=      =%echo^(^&^<nul set/p=  %%!""!a[^^^!%%!""!a^^^!]: '^^^!l^^^!'%$n1c%
%=      =%set %%!""!a[^^^!%%!""!a^^^!]=^^^!l^^^!%$n1c%
%=      =%set $r=^^^!$r^^^!,%%!""!a,%%!""!a[^^^!%%!""!a^^^!]%$n1c%
%=      =%echo^(^&^(if ^^^!£e:~0^^^^,1^^^!==- ^(set ?=^^^!£e:~1^^^!^)else set ?=^^^!£e^^^!%$n1c%
%=      =%for %%!""!@ in ^(^"£error[^^^!?^^^!]^"^) do if ^^^!?^^^! neq 0 ^(^<nul set/p= [error:^^^!£e^^^!] ^^^!%%!""!~@^^^! ^^^^^^^^^^^^^^^!^)else ^<nul set/p= [^^^!%%!""!~@^^^!:^^^!£e^^^!]^)^&for %%!""!? in ^(1,2^) do if %%!""!?==2 ^(for /F ^"usebacktokens=1-4eol=¦delims=¦^" %%!""!i in ^('%%!""!^^^!^"^"^^^!1¦%%!""!^^^!^"^"^^^!2¦%%!""!^^^!^"^"^^^!3¦%%!""!^^^!^"^"^^^!~4'^) do for /F ^"usebacktokens=1-3eol=¦delims=¦^" %%!""!r in ^('^^^!pathext^^^!¦^^^!path^^^!'^) do ^(set pathext=;^&set path=%$n1c%
%=      =%set ¤=^&for %%!""!? in ^(^^^!º^^^!^) do if ^^^!¤^^^!.==. set/A¤=0%%!""!~? 2^>nul^&^&call set º=%%!""!º:*^^^!¤^^^!=%%!""!^|^|set/A¤=1%$n1c%
%=      =%set _=^&for %%!""!? in ^(^^^!º^^^!^) do ^(set ?=^^^!%%!""!~?^^^!^&if defined ? ^(set ?=^^^!?:%%!""!=%%!""!i^^^!%$n1c%
%=      =%for /F %%!""!r in ^(^"^^^!$cr^^^! ^"^) do set ?=^^^!?:%%!""!r=%%!""!k^^^!%$n1c%
%=      =%set ?=^^^!?:^^^^!$lf!!$lf!=%%!""!l^^^!%$n1c%
%=      =%set ?=^^^!?:%%!""!=%%!""!i^^^!^)%$n1c%
%=      =%set _=^^^!_^^^!%%!""!l%%!""!~?#=^^^!?^^^!^)%$n1c%
%=      =%set _=^^^!_:^"=%%!""!j^^^!%$n1c%
%=      =%set ^"_=^^^!_:^^^^=%%!""!9^^^!^"^&call set ^"_=%%!""!^^^^_:^^^^^^^!=^"^"%%!""!^"%$n1c%
%=      =%for /F delims^^^^= %%!""!r in ^(^"^^^!_:~3^^^!^"^) do ^(for /l %%!""!i in ^(1,1,^^^!¤^^^!^) do endlocal%$n1c%
%=      =%set ?=^^^!^&setlocal enableDelayedExpansion%$n1c%
%=      =%set _=%%!""!r%$n1c%
%=      =%call set ^"_=%%!""!^^^^_:^"^"=^"^"^^^^^^^!%%!""!^"^&if ^^^!?^^^!.==. ^(set ^"_=^^^!_:%%!""!9=^^^^^^^^^^^!^"^&set ^"_=^^^!_:^"^"=^^^^^^^!^"%$n1c%
%=      =%set _=^^^!_:%%!""!j=^^^^^"^^^!^)else set ^"_=^^^!_:%%!""!9=^^^^^^^!^"^&set _=^^^!_:^"^"=^^^!%$n1c%
%=      =%for %%!""!@ in ^(^"^^^!$lf^^^!^"^) do set _=^^^!_:%%!""!l=%%!""!~@^^^!%$n1c%
%=      =%set _=^^^!_:%%!""!i=%%!""!^^^!%$n1c%
%=      =%for %%!""!? in ^(^"^^^!$function.fullPathFile^^^!^"^) do for /F ^"tokens=1,*eol=#delims=#^" %%!""!r in ^(^"^^^!_^^^!^"^) do ^(endlocal%$n1c%
%=      =%if ^^^!.==. ^(set _=%%!""!s^^^!%$n1c%
%=      =%if defined _ ^(set _=^^^!_:%%!""!l=^^^^!$lf!!$lf!^^^!%$n1c%
%=      =%for /F %%!""!r in ^(^"^^^!$cr^^^! ^"^) do set _=^^^!_:%%!""!k=%%!""!r^^^!%$n1c%
%=      =%set _=^^^!_:%%!""!i=%%!""!^^^!%$n1c%
%=      =%^)%$n1c%
%=      =%set ^"%%!""!r=^^^!_:~1^^^!^"^^^!^)else ^(set a1=%%!""!r^&set b1%%!""!s^&set c1=%$n1c%
%=      =%call %%!""!? §return.notDelayed^)%$n1c%
%=      =%setlocal enableDelayedExpansion^)%$n1c%
%=      =%endlocal^)%$n1c%
%=      =%set pathext=%%!""!r^&set path=%%!""!s^)^)else set º=$r,^^^!$r^^^!^)else setlocal enableDelayedExpansion^&set *=^^^^^^^^^^^^^^^!" !
:: )
No I didn't write that manually :roll: , this is the actual definition:

Code: Select all

::----------------------------------------------------------------------------------------------------------------
( %macroStart_% arrayPut_, enableDelayedExpansion )
::----------------------------------------------------------------------------------------------------------------
:: last updated       : 2014^06^29
:: support            : naDelayed, delayedChars, call/dosKey/file macro
::
set ^"$usage.%$macro%=^
%=   =% use: ( %%arrayPut_%% #name, val,# )%$n1c%
%=   =% err: unaffected, panic otherwise"
:: (
%=   =%for %%# in ("") do set ^"%$macro%=!onDelim_!(!setLocal_!!$macro!%$n1c%
%=      =%!paramL_!'v,"%%a"','l,%%b,""'%$n1c%
%=      =%!necho_! ^^^!$trace^^^!%e7%(%%a;%%~b%e7%)%$n1c%
%$c1%
%=      =%set/A$debug-=2,%%a+=1%=                -setLocal_, -§setDosKeyMacro_ =%%$n1c%
%=      =%!necho_!  %%a[^^^!%%a^^^!]: '^^^!l^^^!'%$n1c%
%=      =%set %%a[^^^!%%a^^^!]=^^^!l^^^!%$n1c%
%=      =%set $r=^^^!$r^^^!,%%a,%%a[^^^!%%a^^^!]%$n1c%
%$c1%
%=   =%!exception.nPrintL!^&!endlocalL_!$r,^^^!$r^^^!)else setlocal enableDelayedExpansion^&set *=%e15%!"
:: )
( %macroEnd% )
( %macroFileDump_% %$macro% )
That means I now can export batch files using memory dumps, without having to include the source. This adds flexibility, performance and obfuscation. Orange Batch asked for a "load on demand" option, without having to load the entire library. Now 3years later, finally!

Ed Dyreen
Expert
Posts: 1569
Joined: 16 May 2011 08:21
Location: Flanders(Belgium)
Contact:

Re: doskitXP32x86

#38 Post by Ed Dyreen » 23 Mar 2015 20:06

Macro's no longer need to be loaded.

All macro's in the library can now be "armed" using a single ( %@include_% "libraryName", "preserveMemory[true/false:default]" ) command. Using the @include_ command enumerates the library's cache directory and gives every macro a simple header that allows the macro to load itself regardless delayed state, execute ( with given parameters if required ), return the result, and finally unload itself again so memory isn't wasted which would otherwise slow down overall performance. This is faster than calling an ordinary function that reads and executes line by line if the function requires a lot of calculations. This allows users to test and see in action only those functions of interest. If one wants to figure out how things work syntactically one would look at the cached macro. For a more abstract understanding, it's definition in the library the cache was created from. If "preserveMemory" is true, only macroFileRead_ will be armed. Calling a function this way is less elegant ( %macroFileRead_% "macroName", "arguments" ) but less memory is being used making execution even faster.

Ever tried to read or write a registry key in batch that has those nasty characters in it ?

Code: Select all

( %regKeyWrite_% "!$ed.path!\This wo\*rk^^ s^!", "Thi^^ s^! ""wo\*rk^^ s^!"" Thi^^ s^!", "Thi^^ s^! ""wo\*rk^^ s^!"" Thi^^ s^!", "", true )
( %regKeyRead_% $, "!$ed.path!\This wo\*rk^^ s^!", "Thi^^ s^! ""wo\*rk^^ s^!"" Thi^^ s^!", true )
( %regKeyRead_% $, $ed.path, "notExist" )

Code: Select all

regKeyWrite_(1)
  path: 'HKLM\SOFTWARE\ED\This wo*rk^ s!'
  key : 'Thi^ s! "wo*rk^ s!" Thi^ s!'
  data: 'Thi^ s! "wo*rk^ s!" Thi^ s!'
 $type: 'REG_SZ'
[ok:0]

regKeyRead_($;1)
 $path: 'HKLM\SOFTWARE\ED\This wo*rk^ s!'
 $key : 'Thi^ s! "wo*rk^ s!" Thi^ s!'
 $type: 'REG_SZ'
 $data: 'Thi^ s! "wo*rk^ s!" Thi^ s!'
[ok:0]

regKeyRead_($;0)       <-- this last 0 here tells the function to ignore any read errors.
 $path: 'HKLM\SOFTWARE\ED'
 $key : 'notExist'
 Fout: het systeem kan de opgegeven registersleutel of -waarde niet vinden
 $type: ''
 $data: ''
[error:17] object not physicall !
I truly hope some of u will dig up and undust their old winXP machine and check it out when I've uploaded the library but can't tell when I'll be ready.


Topic unlocked

Ed Dyreen
Expert
Posts: 1569
Joined: 16 May 2011 08:21
Location: Flanders(Belgium)
Contact:

Re: doskitXP32x86

#39 Post by Ed Dyreen » 02 Dec 2015 08:17

did you guys know that the poll is undead ? :D

I've uploaded the sourceCode.

Don't just download this and expect that you will get any results if you are a newbie, I will go through every line that introduces a new trick on my website when I find the time.

Enjoy

Ed Dyreen
Expert
Posts: 1569
Joined: 16 May 2011 08:21
Location: Flanders(Belgium)
Contact:

Re: doskitXP32x86

#40 Post by Ed Dyreen » 02 Dec 2015 08:18

Squashman wrote:
Ed Dyreen wrote:'
Site off-line, expected to be on-line again sometime in the future. Sorry

Topic closed


When might that be. :D
today ! :P

Post Reply