aspose file tools*
The moose likes Linux / UNIX and the fly likes Clarification on executables in SunOs(sparc)/linux Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "Clarification on executables in SunOs(sparc)/linux" Watch "Clarification on executables in SunOs(sparc)/linux" New topic
Author

Clarification on executables in SunOs(sparc)/linux

arun ramk
Greenhorn

Joined: Aug 09, 2008
Posts: 26
Hi Friends,

I need a clarification on executable c binary files in linux. Actually , we have two executable files created in SunOS some years back. We don’t have the source code for those files. They are getline and charmap which are used for parsing upload files in our project. Now we need to run the same in Linux environment, but we are not able to run same files in linux. I am not sure whether the above two utilites (getline,charmap) are opensource or developed by individuals.

Now I need either the source files for the utilites or executable equivalents for them in linux.



The following is the command which is used in our perl code for those utilites .

getline -b 2 -e 2 -i $rcvfile | charmap -n -m 200 -r



Could you please help me in getting a solution for the above issue.


Thanks in advance.

Charles Lyons
Author
Ranch Hand

Joined: Mar 27, 2003
Posts: 836
Did you try "man getline" or a Google search for "linux getline"? If so, you'd have found the standard C function getline with syntax:

ssize_t getline(char **lineptr, size_t *n, FILE *stream)

I would guess the -b, -e and -i options are "begin", "end" and "input (file)" though I'm probably wrong as you don't say explicitly. So once you know what the options do, it should be simple to write a quick C program to read $rcvfile using this method.

I have no idea what "charmap" is supposed to do in this context, as "man charmap" and Google aren't helpful.

Basically I think these are custom programs and you're on your own: re-writing the source code shouldn't take more than an hour though, if you know what the programs actually do (which you haven't said).


Charles Lyons (SCJP 1.4, April 2003; SCJP 5, Dec 2006; SCWCD 1.4b, April 2004)
Author of OCEJWCD Study Companion for Oracle Exam 1Z0-899 (ISBN 0955160340 / Amazon Amazon UK )
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16228
    
  21

Charles Lyons wrote:

Basically I think these are custom programs and you're on your own: re-writing the source code shouldn't take more than an hour though, if you know what the programs actually do (which you haven't said).


Because "All you have to do is...."

Sorry. On some days, "Hello, world" seems to take a full hour to get right, much less a program of unknown abilities. One of the things that's really hurting the profession is that we all idealize the development process and forget that actual software development isn't quite the "type in a few lines of code and you've destroyed the alien mothership" process everyone thinks it is.

I don't want to hijack the thread, here. But IBM has a mainframe program that does absolutely nothing, and even it took 3 releases to get right.

Back to the original topic: there's a POSIX program named "charmap", but it doesn't seem to fit the sample.

Have you checked with Sun?


Customer surveys are for companies who didn't pay proper attention to begin with.
arun ramk
Greenhorn

Joined: Aug 09, 2008
Posts: 26
Hi,
the following is the usage of getline.............
usage: getline [-h] [-b linenum] [-e linenum] [-i infile] [-o outfile]
charmap [-h] [-n] [-x] [-X] [-r] [-l string]
[-m linelength] [-i infile] [-o outfile]
charmap does encryption

for example
consider file new.txt
file contents : abcdefgh
abcdefgh


getline -b 2 -e 2 -i new.txt | charmap -n -m 200 -r

executing above command returns
3456789 as result


Charles Lyons
Author
Ranch Hand

Joined: Mar 27, 2003
Posts: 836
You can replace the getline thing with a sed call, like this (written in Bash here):Unfortunately it isn't at all clear to me what your "charmap" does, so I can't help you there.
arun ramk
Greenhorn

Joined: Aug 09, 2008
Posts: 26
Thanks a lot Charles it works

The functionality of charmap , is it decryts the text returned from getline (using AES-128 standard) from the following command.
getline -b 2 -e 2 -i $rcvfile | charmap -n -m 200 -r

is there any alternative available in linux using the above functionality (that is AES-128 decryption)?

I tried with aespipe, openssl but they are not working....
openssl asks for a password.

arun ramk
Greenhorn

Joined: Aug 09, 2008
Posts: 26
hi
could you please help me on the above....
its very urgent......
thanks in advance.....
Stefan Wagner
Ranch Hand

Joined: Jun 02, 2003
Posts: 1923

What linux-distro do you use?

I'm using ubuntu8.04 and if I search in synaptic for aes, I get about 50 results.

Most promising to me at first glance look aespipe, loop-aes-utils and ccrypt.

Your distro might suggest different or the same applications. I'm not confident in aes-questons, so I can't give hints what to use and how to try out.

Your distribution will even use a different tool for software-installation, but I guess it will have a way to search for keywords like aes too. You should find out how that search works.

A completely different approach would be to install a SunOS in VMware or another virtual machine, and run the old binaries there.


http://home.arcor.de/hirnstrom/bewerbung
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Clarification on executables in SunOs(sparc)/linux