I'm trying to reverse some DOS application. It's uses *.VAR file like database (perhaps encoding this file). That's application looks like system for testing students. The application shows random questions from the DB-file and get your answer.
In this place programm read VAR-file length, then open the file and assign it to "newFilePtr_256_byte" var (yes, it's lenght 256 byte).
Next, going call of SUBJ FUNCTION (first screenshot).
After there is FileCounter check and do this call again (until all file would be read).
The function, i can't explain for, on second screenshot.
It's read a symbol from newFilePtr_256_byte and write it to console (nothing on console in real life working)?
Or it's do something else?
I can't recognize function behavior, coz i don't know, where i can get fully description Pascal functions in assembler listing.
I don't put in my question listing of caller function, coz it's really big.
As i can recognize, this function encode file content, by xoring with 0CDh constant, and then write it to buffer in memory.
Related
I have a file that can be opened thru notepad application.
Basically, this file(which can be opened thru notepad) is created by a software and that software uses the values inside that file to run. You can edit the values inside the file using its software.
I just want specific lines(values) to be restricted from being edited because I am implementing strict values inside that file that no one will be able to edit except me.
Is there any clever way to restrict specific lines inside that file from being edited?
I tried the basic way - I used the change permission read/write on that file but I can't change ANY values inside the file which is undesirable.
Note: I have very little to no experience about python, c++, or java but any suggestion will give me idea to learn from it.
Edit:
Here's an example inside the file:
[Type Data]
Comment=Standard Dispense
[Shared_A]
802=1
807=750
11=0
12=0
.
What I want is restrict the value from row/column "807" which is equal to number 750.
I want this number 750 not to be edited even from the software so that other people will not mess it up. I want to set this value as standard value.
Is there any program that you can write inside that file so that it cannot be edited from the software unless I open that file and edit it?
I work from a production/manufacturing company that uses the software that is used for dispensing.
A text file is simply a sequence of bytes that represent code units to encode code points in any given character set. Every byte value is a potentially legal character encoding, leaving no values to encode additional semantics (like guard regions).
With that it should be obvious that there is nothing you can do to partially limit editing of a file using a standard text editor. Whatever problem you are trying to solve, this is not a solution. Next time around you might want to ask about the problem you are trying to solve rather than your proposed solution.
I'm working with iTunes via AppleScript. The artwork element of a track contains image data (or raw data, which appears in practice to return the same thing), which can be retrieved and, say, directly written to a file. (It's an e.g. PNG bytestream.)
But I don't know how to do anything with this thing besides write it to a file. I'd like to ask it how many bytes it contains, or even rummage through it (though the latter may well be out of scope for AppleScript). In Script Debugger, it looks like «data tdtaXXXXXX.....» (hex values where I wrote the XXXs), and the iTunes scripting dictionary doesn't link through to any useful type/class for it.
I'm not really sure what the guillemets mean in AppleScript, or what the nature of this object is, or whether this thing can be interrogated natively. Any references on this would be helpful. Thanks!
See https://books.google.com/books?id=rW5k0w_wC3MC&pg=PA57&lpg=PA57&dq=guillemets+applescript+events+data&source=bl&ots=ogzi9W4jxW&sig=7ct-n0wpzdhBhtHDJtTrZDKgEEk&hl=en&sa=X&ei=-qSYVICZAsjooASo0oKwCg&ved=0CB4Q6AEwAA#v=onepage&q=guillemets%20applescript%20events%20data&f=false for explanation of raw codes and data and use of guillemets in AppleScript; See this answer:
Getting artwork from current track in Applescript
for an example of writing image data from iTunes artwork to file.
I'd like to create utility that should be able to listen standard input and stream to standard output. Moreover I'd like to get command line arguments passed to utility. Is it possible to do with haxe/cpp environment?
What "trace()" exactly do? Can I override it's auto CR/LF with some ascii control characters to print pseudographical activity gauges?
I think that the trace function is inteded to be used only for debug, i think that's why it prints the file and the row from which you called it.
What I think you really want is Lib.print() and Lib.printl() to write something to the console.
For reading I didn't find a function as easy as that, but it's still easy enough, here's an example:
var stdin = Sys.stdin();
var string : String = stdin.readLine();
If you want to look more into console development in haxe I'd suggest you to look into some projects that uses them, for example to write this question I've read this file https://github.com/ianxm/ihx/blob/master/src/ihx/ConsoleReader.hx
I have a program that is reading a text file, and owing to the vagaries of the file definition and the definitions of the objects the data has to be shovelled in to, I appear to have a need to move the read pointer of the file back up the file for a line, in a manner roughly analagous to the FORTRAN BACKSPACE statement.
Is there any method of doing this, either with native VB6 statements or with VB6 FileSystem objects?
I'm pretty sure VB6 provides a seek() function to do this.
Otherwise, if the file is relatively small you could read it all into memory and use the split() function to separate it into lines. These could then be accessed however you want. Obviously if the file is large this is not a good idea though.
The FSO only lets you read forwards.
There isn't a way to do this in VB6. What you could do is to either read the whole file, a line at a time, into an array and then iterate through the array as needed. Or if that caused memory issues, then create a data structure and use Input to read a line into an instance of the structure based upon the line number.
I have been looking for a way of modifying static strings stored in Windows .exe files in the .rdata section, however I haven't found a real way to do so yet.
The whole thing is too complicated to do by hand (in this case by a HEX editor) and so I wanted to know if you have a solution to do so.
What is complicated about doing it in a hex editor? One 'gotcha' that might be tripping you up is that you have to maintain each string's original length. You can do so with spaces at the end or (sometimes) by null-terminating it early, depending on how it's accessed in the executable.
If you really want to get tricky, you can try finding every cross reference to said string in the code and modify the length parameter passed to functions that use it.