1. UnShroud
- Posted by James Powell <jpowell at TELEPORT.COM> Jul 04, 1997
- 820 views
--=====================_868011409==_ Well, due to legal considerations, I am temporarily suspending developement of UnShroud, until I recieve feedback as to how popular this program would be with the "standard" Euphoria geek, and with the "professional" geeks who may be trying to make money. (btw, I consider myself one of the "standard" geeks, no putdown intended) As it stands now, I am releasing the current working version of UnShroud for comments. In its current form, it is probably only of use to those who have shrouded a program and one way or another lost the original source. UnShroud will resolve every built in command, and even add intentation to add to the readability of a program. However, commands from files that have been "include"'ed are uninteligable, as are function names and variables. Please send any bug reports &/OR comments on UnShroud, or even RIP, to jpowell at teleport.com. Anyway here it is: --=====================_868011409==_ with trace trace(1) -- Program UnShroud -- By James A. Powell -- Version .99.1b -- UnShroud will decode a shrouded Euphoria program. -- Usage: UnShroud <iFileName> [<oFileName>] -- iFileName is the name of the input file (required) -- oFileName is the name of the output file (optional) -- -- If oFileName is ommited, the output from the program will be -- saved with the same name as iFileName, but with the extension -- of .EX rather than .SHR (assuming that you use the extension -- .SHR to name your shrouded or RIP'ed files). -- -- Note: UnShroud must be in your path and <iFileName> MUST be in the -- current directory or the decode will be unsuccessful. constant SCREEN = 1 constant ERR = 2 constant TO_LOWER = 'a' - 'A' constant M_SEEK = 19 type file_number(integer f) return f >= 0 end type type file_position(integer p) return p >= -1 end type function lower(object x) -- convert atom or sequence to lower case return x + (x >= 'A' and x <= 'Z') * TO_LOWER end function function upper(object x) -- convert atom or sequence to upper case return x - (x >= 'a' and x <= 'z') * TO_LOWER end function function seek(file_number fn, file_position pos) -- seeks to a byte position in the file, -- or to end of file if pos is -1 return machine_func(M_SEEK, {fn, pos}) end function procedure DecShrFile(sequence iFileName, sequence oFileName) atom iFN, oFN, FoundAt, NumIndents, PrevToken object iBuffer sequence oBuffer, Tokens, Names, Indents Tokens = {129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 150, 151, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218} Names = {"if ", "end ", " then ", "procedure ", "else ", "for ", "return ", " do", "elsif ", "while ", "type ", "constant ", " to ", " and ", " or ", "exit", "function ", "global ", " by ", " not ", "with ", "without ", "length", "puts", "integer ", "sequence ", "position", "object ", "append", "prepend", "print", "printf", "clear_screen", "floor", "getc", "gets", "get_key", "rand", "repeat", "atom ", "compare", "find", "match", "time", "command_line", "open", "close", "trace", "getenv", "sqrt", "sin", "cos", "tan", "log", "system", "date", "remainder", "power", "machine_func", "machine_proc", "abort", "peek", "poke", "call", "sprintf", "arctan", "and_bits", "or_bits", "xor_bits", "not_bits"} Indents = {129, 132, 134, 138, 139, 145} iFN = open(iFileName, "r") if iFN = -1 then printf(ERR, "UnShroud couldn't open the input file: %s.\n", {iFileName}) abort(1) end if oFN = open(oFileName, "w") if oFN = -1 then printf(ERR, "UnShroud couldn't open the output file: %s.\n", {oFileName}) close(iFN) abort(1) end if iBuffer = gets(iFN) FoundAt = 0 oBuffer = {} PrevToken = 0 NumIndents = 0 while sequence(iBuffer) do for iBufPos = 1 to length(iBuffer) do FoundAt = find(iBuffer[iBufPos], Tokens) if FoundAt then oBuffer = oBuffer & Names[FoundAt] if find(Tokens[FoundAt], Indents) then if PrevToken = 130 then NumIndents = NumIndents - 1 else NumIndents = NumIndents + 1 end if end if PrevToken = Tokens[FoundAt] else oBuffer = oBuffer & iBuffer[iBufPos] end if end for printf(oFN, "%s", {oBuffer}) oBuffer = repeat(32, NumIndents * 3) iBuffer = gets(iFN) end while close(iFN) close(oFN) end procedure sequence cmd, iFile, oFile procedure GFileNames() cmd = command_line() if length(cmd) > 3 then oFile = upper(cmd[4]) iFile = upper(cmd[3]) elsif length(cmd) > 2 then iFile = upper(cmd[3]) oFile = {-1} else puts(SCREEN, "UnShroud Version .99.1b\n") puts(SCREEN, "By James A. Powell <wizard at djo.com>\n") puts(SCREEN, "\nUnShroud will decode a shrouded Euphoria program.\n") puts(SCREEN, "\nUsage: UnShroud <iFileName> [<oFileName>]\n") puts(SCREEN, " iFileName is the name of the input file (required).\n") puts(SCREEN, " oFileName is the name of the output file (optional).\n") puts(SCREEN, "\n If oFileName is ommited, the output from the program\n") puts(SCREEN, " will be saved with the same name as iFileName, but with\n") puts(SCREEN, " the extension of .EX rather than .SHR (assuming that\n") puts(SCREEN, " you use the extension .SHR for your shrouded or RIP'ed\n") puts(SCREEN, " files.)\n") puts(SCREEN, "\nNote: UnShroud must be in your path and <iFileName> must\n") puts(SCREEN, "be in the current directory, or the rip will be unsuccessful.") abort(1) end if if not(match(".", iFile)) then if oFile[1] = -1 then oFile = iFile & ".EX" end if iFile = iFile & ".SHR" else if oFile[1] = -1 then oFile = iFile[1..match(".", iFile) - 1] & ".EX" end if end if if not(match(".", oFile)) then oFile = oFile & ".EX" end if if (length(iFile) > 11) or (length(oFile) > 11) then printf(SCREEN, "%s\n%s\n", {iFile, oFile}) puts(ERR, "One of the above is an Invalid FileName!\n") abort(1) end if end procedure -- Beginning of program GFileNames() DecShrFile(iFile, oFile) printf(SCREEN, "UnShroud successfully decoded a program out of %s.\n", {iFile}) --=====================_868011409==_ --=====================_868011409==_--
2. Re: UnShroud
- Posted by Ralf Nieuwenhuijsen <nieuwen at POP.XS4ALL.NL> Jul 04, 1997
- 768 views
- Last edited Jul 05, 1997
Hey, stop it!! Loosing your code this way is your own fault. Shroud use to protect you from people stealing your code, now you are gonna make it impossible..... dumb dumb dumb, that is the thing you would do if you hate Euphoria and wanted to get rid of all there possiblilities for commercial software. How have you got this info anyway? The file bind.ex is shrouded too!! You never wondered why??? Well you are a hell of a cracker... ...but please stop it.. I don't know if it's already too late, if so, RDS should redo their bind method to another method people don't know yet! Ralf Nieuwenhuijsen nieuwen at xs4all.nl
3. Re: UnShroud
- Posted by James Powell <jpowell at TELEPORT.COM> Jul 04, 1997
- 776 views
Ralf Nieuwenhuijsen said: > Hey, stop it!! > Loosing your code this way is your own fault. > Shroud use to protect you from people stealing your code, now you >are gonna make it impossible..... dumb dumb dumb, that is the thing >you would do if you hate Euphoria and wanted to get rid of all >there possiblilities for commercial software. >How have you got this info anyway? The file bind.ex is shrouded too!! >You never wondered why??? >Well you are a hell of a cracker... ...but please stop it.. >I don't know if it's already too late, if so, RDS should redo their >bind method to another method people don't know yet! > >Ralf Nieuwenhuijsen That wont work. In order to change the way a file is shrouded, RDS would also have to redo the way the interpreter reads and interprets the file (IMHO that would be too difficult, and would make all new shrouded files incompatible with every single new release of Euphoria) As to my being a cracker, no way. I didn't even hack bind.ex in order to write UnShroud. (Think about it for a minute, the answer is suprisingly simple ;) Although, I did notice at least 1 small change between the bind.ex in v1.5 and the one in v1.5a (at least, I think its 1.5a, I dont have it yet to check). If you have RIP, try using 1.5a to bind a program, and then RIP it. :) It probably wont work. The problem is, bind.ex in 1.5 attached the shrouded file to EX.EXE with the keyword "BINO". But now, in 1.5a, it looks like that keyword has changed to "BIND". Heeding views from programmers like yourself though, I have put all development of RIP and UnShroud on hold until I get more feedback from Euphoria users. Developement will not continue (except for bug fixes) unless a majority of users can come up with a compelling reason for me to continue. Instead, I have now begun picking apart sources on text editors (Thanks David, yours is excelent!) and have started trial work on an IDE for Euphoria. Even though David Cuny's editor is wonderful (being based on EDIT from dos 7), I grew up on QB 4.5 and I miss the ability to keep procedures seperated. My plans are to make an editor that will seperate procedures and functions into their own screens, as in QB, as well as giving support for instantanious inclusion of files. Just think, add a line containing "include x.e" and instantly all public procedure and function names (as well as calling parameters) are listed in a pop-up window! I don't know if anyone else thinks this would be useful, but it's something I've wanted for some time now. I am tired of loading 3 files and switching between them over and over, just to locate portions of code and calling convetions. James Powell PS, you've probably noticed this is coming from jpowell at teleport.com now instead of wizard at djo.com. I switched ISP's and am MUCH happier now with a more professional ISP rather than DJO's BBS system.
4. Re: UnShroud
- Posted by Ralf Nieuwenhuijsen <nieuwen at POP.XS4ALL.NL> Jul 04, 1997
- 769 views
- Last edited Jul 05, 1997
> Ralf Nieuwenhuijsen said: > > Hey, stop it!! > > Loosing your code this way is your own fault. > > Shroud use to protect you from people stealing your code, now you > >are gonna make it impossible..... dumb dumb dumb, that is the thing > >you would do if you hate Euphoria and wanted to get rid of all > >there possiblilities for commercial software. > >How have you got this info anyway? The file bind.ex is shrouded too!! > >You never wondered why??? > >Well you are a hell of a cracker... ...but please stop it.. > >I don't know if it's already too late, if so, RDS should redo their > >bind method to another method people don't know yet! > > > >Ralf Nieuwenhuijsen > That wont work. In order to change the way a file is shrouded, RDS would also > have to redo the way the interpreter reads and interprets the file (IMHO that > would be too difficult, and would make all new shrouded files incompatible wit h > every single new release of Euphoria) > > As to my being a cracker, no way. I didn't even hack bind.ex in order to writ e > UnShroud. (Think about it for a minute, the answer is suprisingly simple ;) Yeah, i know, not gonna tell.. but i know already... > Heeding views from programmers like yourself though, I have put all developmen t > of RIP and UnShroud on hold until I get more feedback from Euphoria users. > Developement will not continue (except for bug fixes) unless a majority of use rs > can come up with a compelling reason for me to continue. Think you have done enough... you could get Packard's source with this for exemple, he problely doesn't want that.. cause he is asking money for it... that's why i hope everybody deletes the rip & unshroud from his HD as respect to commercial development in Euphoria. > Instead, I have now begun picking apart sources on text editors (Thanks David, > yours is excelent!) and have started trial work on an IDE for Euphoria. Even > though David Cuny's editor is wonderful (being based on EDIT from dos 7), I > grew up on QB 4.5 and I miss the ability to keep procedures seperated. My pla ns > are to make an editor that will seperate procedures and functions into their > own screens, as in QB, as well as giving support for instantanious inclusion > of files. > Just think, add a line containing "include x.e" and instantly all public > procedure and function names (as well as calling parameters) are listed in a > pop-up window! > I don't know if anyone else thinks this would be useful, but it's something I' ve > wanted for some time now. I am tired of loading 3 files and switching between > them over and over, just to locate portions of code and calling convetions. He has a routine list when you press F2 What about a project manager and inbuilt precompile and macro options.... Ralf Nieuwenhuijsen nieuwen at xs4all.nl
5. Re: UnShroud
- Posted by "C. K. Lester" <cklester at FLASH.NET> Jul 04, 1997
- 779 views
James Powell wrote: > grew up on QB 4.5 and I miss the ability to keep procedures > seperated. My plans > are to make an editor that will seperate procedures and functions into > their > own screens, as in QB, as well as giving support for instantanious > inclusion > of files. > Just think, add a line containing "include x.e" and instantly all > public > procedure and function names (as well as calling parameters) are > listed in a > pop-up window! > I don't know if anyone else thinks this would be useful, but it's > something I've > wanted for some time now. I am tired of loading 3 files and switching > between > them over and over, just to locate portions of code and calling > convetions. Excellent! I've been waiting for something like this. Actually, I was about to start coding something like that myself. But, now that you've stepped up, I'll just sit back and wait. hehe<choke> Later! ck
6. Re: UnShroud
- Posted by Ralf Nieuwenhuijsen <nieuwen at POP.XS4ALL.NL> Jul 05, 1997
- 779 views
> James Powell wrote: > > > grew up on QB 4.5 and I miss the ability to keep procedures > > seperated. My plans > > are to make an editor that will seperate procedures and functions into > > their > > own screens, as in QB, as well as giving support for instantanious > > inclusion > > of files. > > Just think, add a line containing "include x.e" and instantly all > > public > > procedure and function names (as well as calling parameters) are > > listed in a > > pop-up window! > > I don't know if anyone else thinks this would be useful, but it's > > something I've > > wanted for some time now. I am tired of loading 3 files and switching > > between > > them over and over, just to locate portions of code and calling > > convetions. > > Excellent! I've been waiting for something like this. Actually, I was > about to start coding something like that myself. But, now that you've > stepped up, I'll just sit back and wait. hehe<choke> David Cuny's stuff is almost 100% like qb4.5, except he doesn't support the selection of routines trough F2 of files also INCLUDED. But the rest is already there, let this just be suggestion to David Cuny.. instead of coding something that is already been code for 99% Let's use [ALT] + 1,2,3,etc. for open PROJECTS And each project holds a couple of files and their properties (like preprocessors and a quick editable note of the use of the file.) All the properties (a few i guess) and the files are then in a drop-down list in the top line and the code starts under it. The project settings and stuff is saved as comments as a .EX file... when you open a .EX file without it you must select 'To project' or something to make it a project, otherwise you can edit it without saving the project properties (name and other stuff will just be gray, like disabled) With the dropdown box you select which part or file (an option in one of the menus) you want to edit in its window. If you open several project or non-projects, the screen will be split, like ed.ex does... This would be the most usefull editor i can image.... Ralf Nieuwenhuijsen nieuwen at xs4all.nl
7. Re: UnShroud
- Posted by Lucius L Hilley III <luciuslhilleyiii at JUNO.COM> Jul 05, 1997
- 754 views
I also have to agree with Ralf. I have an idea on shrouding the code THEN Encyrpting the shrouded code. At execution time the coded would be decrypted for use but would still be shrouded. The code would never be COMPLETELY vulnerable. I will not be releasing any encryption techniques that I design and use. --Lucius Lamar Hilley III -- E-mail at luciuslhilleyiii at juno.com -- I support transferring of files less than 60K. -- I can Decode both UU and Base64 format.
8. Re: UnShroud
- Posted by Ralf Nieuwenhuijsen <nieuwen at POP.XS4ALL.NL> Jul 05, 1997
- 775 views
> I also have to agree with Ralf. > > I have an idea on shrouding the code THEN > Encyrpting the shrouded code. > > At execution time the coded would be decrypted > for use but would still be shrouded. The code > would never be COMPLETELY vulnerable. > > I will not be releasing any encryption techniques > that I design and use. Yes, it would not be completely vulnerable, but you do have to hack ex.exe if their encrytption method is any good. (Like calculation on size, maybe somsort of inbuilt compression, location encryption, etc.) Or maybe they can do the precompiling directly in the file (with some precompiling still to be done, like assigning memory addresses, however you could make it pretty inreversable) Or the ex.exe can have some inbuilt protection not to execute code that reads a file which is partly equal to ex.exe and then have the code in a sort of sequence way which would only be possible with Euphoria.... (It would be impossible to write a program to read my EDOM files, it would be so big and difficult) Ralf Nieuwenhuijsen nieuwen at xs4all.nl
9. Re: UnShroud
- Posted by "Graeme." <graemejb at PRONET.NET.AU> Jul 06, 1997
- 762 views
At 11:02 5/07/97 -0700, you wrote: >---------------------- Information from the mail header ----------------------- >Sender: luciuslhilleyiii at JUNO.COM> >Poster: Lucius L Hilley III >Subject: Re: UnShroud >------------------------------------------------------------------------------- > >I also have to agree with Ralf. > >I have an idea on shrouding the code THEN >Encyrpting the shrouded code. > >At execution time the coded would be decrypted >for use but would still be shrouded. The code >would never be COMPLETELY vulnerable. > >I will not be releasing any encryption techniques >that I design and use. > >--Lucius Lamar Hilley III Hi Lucius, I have been thinking along similar lines myself. The decryption program would have to be written in a different language or someone could easily unshroud it, edit it ,use it to decrypt the main program, then in turn unshroud that. The only way i can think of to make the decryption program edit proof would be to make the encryption key some checksum generated from the decryption code itself. For this it would have to be a bit self aware and know where abouts it is stored in memory as it is executed so it can 'peek' at itself and generate the decryption key as it runs. If it had been edited at all, the wrong key would be generated. I have no idea if this is possible. What do you think? Cheers, Graeme Burke.
10. Re: UnShroud
- Posted by Anders Eurenius <c96aes at OXE.CS.UMU.SE> Jul 05, 1997
- 793 views
> > At execution time the coded would be decrypted > > for use but would still be shrouded. The code > > would never be COMPLETELY vulnerable. > > > > I will not be releasing any encryption techniques > > that I design and use. > > Yes, it would not be completely vulnerable, but you do have to hack > ex.exe if their encrytption method is any good. (Like calculation on > size, maybe somsort of inbuilt compression, location encryption, > etc.) > Or maybe they can do the precompiling directly in the file (with > some precompiling still to be done, like assigning memory addresses, > however you could make it pretty inreversable) > > Or the ex.exe can have some inbuilt protection not to execute code > that reads a file which is partly equal to ex.exe and then have the > code in a sort of sequence way which would only be possible with > Euphoria.... (It would be impossible to write a program to read my > EDOM files, it would be so big and difficult) Like I said to LLH3, anything the computer can understand, the fanatic freaks can read too... Fortunately however, they aren't likely to be particularly interested, so just trashing it a little will go a long way... (How long has the unshroud project taken so far?...) Anyway, I'm happy to leave the specifics to Craig. (And I think Craig is as happy to have my punk kid nose out of it too...) > Ralf Nieuwenhuijsen <nieuwen at xs4all.nl> Anders ------------------------------------------------------------------- Anders Eurenius <c96aes at cs.umu.se> ICQ UIN:1453793 Computer Science/Engineering student at the university of Umeaa -------------------------------------------------------------------