• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Clarification on executables in SunOs(sparc)/linux

 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.

 
Author
Posts: 836
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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).
 
Saloon Keeper
Posts: 27808
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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?

 
arun ramk
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 836
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi
could you please help me on the above....
its very urgent......
thanks in advance.....
 
Ranch Hand
Posts: 1923
Scala Postgres Database Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic