?
Solved

What are these codes mean? Unix?

Posted on 2013-12-24
9
Medium Priority
?
391 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 12

Assisted Solution

by:Gregory Miller
Gregory Miller earned 200 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 84

Assisted Solution

by:Dave Baldwin
Dave Baldwin earned 200 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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 800 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 81

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 81

Accepted Solution

by:
arnold earned 800 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Utilizing an array to gracefully append to a list of EmailAddresses
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Six Sigma Control Plans
Suggested Courses

839 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