Sponsored Content
Full Discussion: C
Top Forums Programming C Post 7657 by loadc on Friday 28th of September 2001 10:47:58 PM
Old 09-28-2001
EEEKKK!!!

Okay, I've wanted to do this as well-

Here is the trick the VM mainframeers taught me, it actually did work, but keep in mind, I did this on a VM CP command env, using pipes and some VM tools translating to EBCDIC, so go easy if this doesn't translate well...

We took the binary file and converted to hex sing a converter in the editor on VM, we then took the hex and translated to EBCDIC (ascii should be a reasonable change from there, as well), and read what we could of the file.

Keep in mind, teh compiler that put the file together is going to have done some things to the file, you are WAY better off with a good de-compiler, but you didn't hear that from me...

Whatever you get back from either operation, it may not be an exact copy of the source code, unless you have a lot of time, knowledge of EXACTLY what tools were used by the developers, and the skill or luck to find a de-compiler that knows what the compiler did.


Or, maybe I'm totally out of my tree and I'm talking out of my knothole...



loadc
 
Binary.pokeString(3kaya)				       Kaya module reference					  Binary.pokeString(3kaya)

NAME
Binary::pokeString - Write a String of binary data. SYNOPSIS
Void pokeString( var Binary block, Int offset, String val ) ARGUMENTS
block The binary block offset The location to write to (starting from zero) val The String to write. DESCRIPTION
Poke the string val into the block, starting at offset offset An Binary.OffsetOutOfRange(3kaya) exception will be thrown if it attempts to access a value outside the block. Note that the String will be stored in the block in UTF-8 encoding, not as raw Kaya chars, so you need to use Builtins.byteLength(3kaya) to determine how much space you need (and then add one for a terminating null byte). AUTHORS
Kaya standard library by Edwin Brady, Chris Morris and others (kaya@kayalang.org). For further information see http://kayalang.org/ LICENSE
The Kaya standard library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License (version 2.1 or any later version) as published by the Free Software Foundation. RELATED
Binary.Binary(3kaya) Builtins.byteLength(3kaya) Binary.peekString(3kaya) Binary.poke(3kaya) Binary.setBlockData(3kaya) Kaya October 2012 Binary.pokeString(3kaya)
All times are GMT -4. The time now is 01:58 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy