|
|
 |
 |
 |
 |
register |
bbs |
search |
rss |
faq |
about
|
 |
 |
meet up |
add to del.icio.us |
digg it
|
 |
 |
| Network (in)Security Interesting hacks and cracks. Info on firewalls, TCP/IP, encryption, networks, and security. The ins and outs of the phone system, caller services, how things work, what's illegal and what's not, cellular phones, beepers, telephony legislation, the PUC, ISDN, taps, who's listening, and switches. Talking about phones, hacking systems, technical advice, and such is completely LEGAL in the United States -- it's covered by the First Amendment. What's illegal is conspiracy to commit a crime. So if you say something like "Meet me at 2am so we can crack a can" or "I changed my cell phone's number myself" you are criminally liable. Stating "You can crack a can by doing thus-and-so" or "If you wanted to change a cell phone's number, you could do it like so" is perfectly OK. Posting passwords, calling card numbers, or credit card numbers is forbidden on this network. Posting such info will get you booted off the net. |
 |
|
|
#1
 2004-12-15, 20:06
|
Tryptah 
Regular
|
|
|
|
*nix Gurus!
Alright, so I'm running my own apache webserver on my own box. The scripts(.cgi, .pl, etc) im trying to run get downloaded in binary(i think, cause they're in a zip archive?) but for my webserver to run them, they need to be in ascii..So the question would be, how to convert a file from binary to ascii...
Anyone know?
|
|
#2
 2004-12-15, 20:55
|
cense 
Regular
|
|
|
|
Re: *nix Gurus!
You've slightly misunderstood the problem. The ASCII vs Binary issue only comes up when transfering files over FTP. FTP has two transfer modes, ASCII and Binary. If you've uploaded your scripts via FTP make sure they where uploaded using the ASCII transfer method.
Also, I think you have apache mis-configured for your configuration. If you want apache to treat all files with a certain extention as a script, you have to add the following directive to httpd.conf:
code:<pre>AddHandler cgi-script .cgi</pre>
where .cgi is the script extension you want to use.
|
|
#3
 2004-12-15, 21:00
|
Tryptah 
Regular
|
|
|
|
Re: *nix Gurus!
New question then, if its not an issue of ascii vs binary, why is my newspro script(newspro.cgi) bringing up a 500 Internal Server Error, when the test.cgi script (in the same directory) runs fine?
Edit: Forgot to mention, CHMOD settings and perl path have been checked, double checked, triple checked, then checked again.
Edit2: The files could have been ftp'd into where i got them from in binary before i got them, and were assumed to be transferring to another server via ftp(after download), so it was never thought to change them to ascii for people who weren't sending them via ftp...Thats just a possible scenario..doesn't really matter..the fact is im pretty sure they're binary and they need to be ascii and i don't know how to change them. =/
So i downloaded the scripts in a .zip file.
It's my understanding that zip archives are considered to be binary..that wouldn't make the rest of the files in it binary?
[This message has been edited by Tryptah (edited 12-15-2004).]
[This message has been edited by Tryptah (edited 12-15-2004).]
|
|
#4
 2004-12-15, 22:24
|
cense 
Regular
|
|
|
|
Re: *nix Gurus!
zip archives are binaries and no, that doesn't affect the files in the archive.
This isn't related to newspro.cgi, but the troubleshooting steps might still be helpful:
http://support.discusware.com/center/resources/errors/500ftpdiag.php
|
|
#5
 2004-12-15, 22:47
|
Tryptah 
Regular
|
|
|
|
Re: *nix Gurus!
So there's no way to change it from binary to ascii?
Cause i'm 99.9999999~% sure that's what the problem is
|
|
#6
 2004-12-15, 22:57
|
aetherdweller 
Regular
|
|
|
|
Re: *nix Gurus!
Another thing to check for is that the scripts are unix text files, not msdos text files. The .zip format is a clue to me that you should at least check it out.
Open a script in a text editor. Is there a ^M at the end of each line? If so, then you will have use a utility like fromdos to convert it.
Edit: You can use the -a option with unzip to convert text files too.
[This message has been edited by aetherdweller (edited 12-15-2004).]
|
|
#7
 2004-12-16, 03:10
|
AutOPSY 
Regular
|
|
|
|
Re: *nix Gurus!
quote:Originally posted by Tryptah:
So there's no way to change it from binary to ascii?
Cause i'm 99.9999999~% sure that's what the problem is
No when you need ascii mode type ascii in the ftp prompt. When you need binary type binary.
|
|
#8
 2004-12-16, 04:52
|
Tryptah 
Regular
|
|
|
|
Re: *nix Gurus!
Yeah, uh..thanks autopsy..
I think i'm jes gonna setup my ftp server and send it to myself in ascii..
|
|
#9
 2004-12-16, 05:18
|
AutOPSY 
Regular
|
|
|
|
Re: *nix Gurus!
The zip file itself can be sent in binary mode but if you are transferring individual scripts in text format use ascii.
Youll get the hang of it.
|
|
 |
 |
To the best of our knowledge, the text on this page may be freely reproduced and distributed.

totse.com certificate signatures
|
 |
 |
About | Community | Bad Ideas | Drugs | Ego | Erotica | Fringe | Society | Technology
|
 |
 |
 |
 |
|
|