Newbie to Unix, CGI and C.

Newbie to Unix, CGI and C.

Post by Paul Manne » Wed, 03 Jun 1998 04:00:00



Hi

I believe that it is possible to use C to make programs that run on Unix,
right? Also would CGI scripts like counters for webpages be considered
programs? I would like to make a CGI script that allows only people with a
password access to a couple of web pages. Maybe I could just give them access
to one directory and put all the appropriate files into this directory. Also
would it be possible to capture the date, time as well as how long the person
looked at this page for? What other features could I maybe incorporporate?
(There seems to be so many features and wonderful things you can do in Unix.)

Thanks to anyone who can offer guidance to a newbie to Unix.

Paul

 
 
 

Newbie to Unix, CGI and C.

Post by vi.. » Wed, 03 Jun 1998 04:00:00


: Hi

: I believe that it is possible to use C to make programs that run on Unix,
: right? Also would CGI scripts like counters for webpages be considered
: programs?

  Yes, CGI scripts are just ordinary programs. I've even written one on
C, but I wouldn't  reccomend anyone do so, if task can be accomplished
using perl or shell script. It is becouse your web server definitely
have perl and shell and you need just transfer your scripts there in
order to use it. But C program should be compilied for specific version
of Unix. So, don't write CGI scripts on C unless you have telnet access
to your web server (or physical access to its console) and are sure that
it have C compilier installed.

: I would like to make a CGI script that allows only people with a
: password access to a couple of web pages. Maybe I could just give them access
: to one directory and put all the appropriate files into this directory.

This is not a job for CGI script. It can be better handled with server
configuration.

If your web server software is Apache (most common case, I suppose),
then you don't need even access to server configuration file - you could
configure such things using .htaccess file in your directory

: Also
: would it be possible to capture the date, time as well as how long the person
: looked at this page for? What other features could I maybe incorporporate?

Date, time when request was served - sure. Just ask your sysadmin to
take look on server transfer logs. But nothing prevent user from saving
local copy of your page and looking on it as long as he wants. You
might try to estimate time of viewing by tracking next request of same
user, but it is very tricky and not guaranteed to give any correct
answer. User can just exit his browser or come to another server, where
you cannot track it.

: (There seems to be so many features and wonderful things you can do in Unix.)

: Thanks to anyone who can offer guidance to a newbie to Unix.

: Paul

--
--------------------------------------------------

Institute for Commerce          Office:7-(095)-333-2022
Engineering                     Home: 7-(095)-135-46-61
Programmer                      http://www.fe.msk.ru/~vitus

 
 
 

1. /cgi-bin/phf /cgi-bin/test-cgi /cgi-bin/handler

I've been seeing a number of attacks of this sort recently
from various sites in the http logs.  The time correlation
between the logs on various hosts suggests that the attacker
was scanning sequentially upward in IP addresses.  Since all
tcp and udp packets to ports below 1024 except for http,
smtp, and ident are filtered out for most, including the
attacking, sites, I'm not seeing anything else in the logs.

209.61.73.47 - - [04/Jul/1998:07:19:27 -0500] "GET /cgi-bin/phf" 404 -
209.61.73.47 - - [04/Jul/1998:07:19:28 -0500] "GET /cgi-bin/test-cgi" 404 -
209.61.73.47 - - [04/Jul/1998:07:19:28 -0500] "GET /cgi-bin/handler" 404 -

Is this a signature of some known attackware?  If so, what
other attacks accompany these http probes?

--

2. COMMERCIAL: InfoMagic Returns !

3. CGI "newbie" and change unix password method="POST"

4. Diamond Multimedia SupraExpress 56e

5. Matrox Mystique ands X.

6. PPTP client masquerading

7. ORACLE/CGI - can a CGI script inherit preset ORACLE unix env variables?

8. any utility like this??

9. UNIX Newbie - Choice of UNIX

10. Sockets + UNIX + (GNU C++) + UNIX newbie = problems...

11. setting up cgi-bin (newbie)

12. 403 forbiden cgi-bin (newbie)

13. Absolute Newbie Question - CGI & Apache