?
Solved

weird chars

Posted on 2006-05-18
10
Medium Priority
?
232 Views
Last Modified: 2013-12-25
hello,
I downloaded this cgi script from a website. when I run the script from my
server it see this cool page layout but when I open the .cgi file with notepad
I see this weird characters... why is that?

ELF              ¼“4   Øs      4    (      4   4€4€               4  44                    € €\o  \o            p   ð ðÈ  @           p   ð ðà   à            H  HH              Påtd$j  $ê$êd   d         Qåtd                                 GNU              %   ;       5   7       .   2   3   6   :       1   #   8   -   '                *   &   0          $       4          9   ,                    
                                   

etc........
0
Comment
Question by:aplelois
  • 6
  • 3
10 Comments
 
LVL 8

Expert Comment

by:Perl_Diver
ID: 16715590
Does the file still look that if you open it with WordPad or Word? Could be the script has been run through an obfuscator, like ACME::Bleach.  
0
 

Author Comment

by:aplelois
ID: 16715643
yes it looks like that
0
 

Author Comment

by:aplelois
ID: 16715644
check it out here turbotraffictrader.com/download/ttt-c-version2-Linux.tgz
open the files located at cgi-bin/
0
Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

 
LVL 8

Expert Comment

by:Perl_Diver
ID: 16715727
I think you are trying to open a compressed file with a text editor before having uncrompressed it.  ACME::Bleach has nothing to do with this file as it's not a perl script but a C/sqlite script. If you are using Windows, WinZip can open tgz files.
0
 

Author Comment

by:aplelois
ID: 16715799
I renamed the file with ext. to .tgz and I receive the following message from winrar (no archives found)
0
 
LVL 8

Expert Comment

by:Perl_Diver
ID: 16716075
ahh, the files you can't view properly with your text editor are C files.  It's like trying to open an image file with Notepad. You can't really do it. You need an IDE that can open and read the files properly. Check out this link:

http://www.bloodshed.net/dev/devcpp.html


0
 

Author Comment

by:aplelois
ID: 16716100
how can I make a hello world using c, i'll been trying for like 4 hours..
if that app is c then this should work for me I just dont know what to
do then

#include <stdio.h>

main(){
 printf("Content-type: text/html\n\n");
 printf("<html>");
 printf("<head><title>Hello World</title></head>");
 printf("<H1>Hello World</H1>");
 printf("I'm a C Program<br>");
 printf("</body>");
 printf("</html>");
}


g++ myapp.c
chmod -R 755 myapp.c

then I get 500 internal error
0
 

Author Comment

by:aplelois
ID: 16716102
that app works fine in my web server
0
 
LVL 85

Accepted Solution

by:
ozo earned 2000 total points
ID: 16717118
Is your http server configured to run the executable, rather than just send it?


g++ myapp.c
chmod -R 755 myapp.c
is doing the chmod on the source, not the executable (and it is doing it recursively, which does not make much sense if myapp.c is not a directory)
0
 

Author Comment

by:aplelois
ID: 16717536
I meant chmod -R 755 myapp.cgi the executable!
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

If you get a (Blue Screen of Death), your system writes a small file called a minidump. Your first step is to make certain your computer is setup to record memory dumps. Right click My Computer, choose properties. Click on the advanced tab, an…
The Windows functions GetTickCount and timeGetTime retrieve the number of milliseconds since the system was started. However, the value is stored in a DWORD, which means that it wraps around to zero every 49.7 days. This article shows how to solve t…
Learn the basics of if, else, and elif statements in Python 2.7. Use "if" statements to test a specified condition.: The structure of an if statement is as follows: (CODE) Use "else" statements to allow the execution of an alternative, if the …
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Suggested Courses
Course of the Month16 days, 8 hours left to enroll

864 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