Solved

What are these codes mean? Unix?

Posted on 2013-12-24
9
386 Views
Last Modified: 2013-12-25
Can anyone tell me what language this is written in?

For instance, what does ^@%02X%02X% mean?

cd
0
Comment
Question by:TeknikDev
9 Comments
 
LVL 11

Assisted Solution

by:Gregory Miller
Gregory Miller earned 50 total points
ID: 39738587
The screen shot does not really reveal any programming language. This looks like a dump of a binary file of some sort to the console window. The codes could mean anything at all, there is really no way of determining that with what you have provided.
0
 
LVL 83

Assisted Solution

by:Dave Baldwin
Dave Baldwin earned 50 total points
ID: 39738618
I agree with @Technodweeb, it's a file dump.  The '%s' after the text items tells me it is probably written originally in some C related language because that would be a place holder for string substitution.  But that doesn't limit it very much because many languages are written using C as the base for generating the modules.  Perl, PHP, Python are ones that immediately come to mind along with the obvious ones like C++ and C#.  And many applications based on those languages could have code that looked like that.
0
 
LVL 10

Expert Comment

by:Korbus
ID: 39738621
This looks like the output of some unix program to me.
The codes you see are how the computers display vealues that do not equate to a normal ASCII letter or character.
ASCII is the standard way to encode text as digital information.
A single ASCII code can have up to 256 different values, which is more than all the letters (capital & lower case), number digits, punctuation and special characters like $ and &.  So how does a computer display values that dont match those standard characters?  Well that depends on the software, here is what UNIX does:  http://en.wikipedia.org/wiki/Control_character
http://en.wikipedia.org/wiki/Control_character
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 38

Expert Comment

by:Gerwin Jansen, EE MVE
ID: 39738674
Can you try this:

strings <your_file>

and post a file with the output you get?

Also try:

file <your_file>

this is to let the OS try and determine the file type.

What OS are you running btw?
0
 
LVL 15

Assisted Solution

by:bpmurray
bpmurray earned 200 total points
ID: 39738699
This is the contents of some program file, probably written in C. The contents of the top part of the screenshot are the strings used by the file. Given the sequence and contents of the messages, it looks like the program converts information from an input file, writing data out to another file.

Where you see "^X", this is an attempt to display a character that is less than SPACE and without any displayable form. It means that the top 3 bits have been stripped from the character, so ^@ is actually NULL. The display shows these at the start of the line, but they're actually the string terminator from the line before, so that the strings should be:
File ID:%s^@
%02X%02X%02X%02X^@

Open in new window

The use of the % formatting is typical C, as mentioned above.

BTW, there are not 256 characters in ASCII - there are only 128, as defined by ISO 646-IRV, but it's likely that your display is actually ISO 8859-1 if it's Unix/Linux, or codepage 1252 if on Windows.
0
 
LVL 77

Expert Comment

by:arnold
ID: 39738854
This means your terminal type is set incorrectly,

try export TERM=vt100
0
 
LVL 38

Expert Comment

by:Gerwin Jansen, EE MVE
ID: 39739092
How are you opening/displaying the file?
0
 
LVL 77

Accepted Solution

by:
arnold earned 200 total points
ID: 39739114
this looks as though the asker has ran a command that has issues. The output appears to be error report and correct usage guides.
The control characters in the view suggests the user is using a VT100 type of terminal, while the TERM set is possibly ANSI/XTERM.
If the shell is bash and settings are such that color, and other display features are set to be displayed, the control characters will be seen as well.

^@ is a null string terminating control

echo -e '\0' | cat -v
echo -e '\r' | cat -v
^H/^[[~ are control representing backspace/erase

etc.
stty -a

The output seems to be because the user is prompted for data input, the user then types, deletes, etc. but the app might not be handling the deletes/backspace, etc. and thus errors out and displays all the user's keystrokes including backspace, arrow left, right, down, up, page up, page down, etc.
0
 
LVL 38

Expert Comment

by:Gerwin Jansen, EE MVE
ID: 39739454
@TeknikDev - No feedback on questions that are asked nor a closing comment from your side? Your sceenshot is showing a cursor on the 3rd line, looks like you're trying to edit your (binary) file with some editor.

Kindly reply to questions/suggestion next time. Thanks.

gerwinjansen
Topic Advisor
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question