Lynx CGI 스크립트란 무엇입니까?

Lynx CGI 스크립트란 무엇입니까?

여기에는 lynx.cfg다음이 포함됩니다.

.h1 CGI scripts
# These settings control Lynx's ability to execute various types of scripts.

.h2 LOCAL_EXECUTION_LINKS_ALWAYS_ON
.h2 LOCAL_EXECUTION_LINKS_ON_BUT_NOT_REMOTE
# Local execution links and scripts are by default completely disabled,
# unless a change is made to the userdefs.h file to enable them or
# the configure script is used with the corresponding options
# (-enable-exec-links and -enable-exec-scripts).
# See the Lynx source code distribution and the userdefs.h
# file for more detail on enabling execution links and scripts.
#
# If you have enabled execution links or scripts the following
# two variables control Lynx's action when an execution link
# or script is encountered.
#
# If LOCAL_EXECUTION_LINKS_ALWAYS_ON is set to TRUE any execution
# link or script will be executed no matter where it came from.
# This is EXTREMELY dangerous.  Since Lynx can access files from
# anywhere in the world, you may encounter links or scripts that
# will cause damage or compromise the security of your system.
#
# If LOCAL_EXECUTION_LINKS_ON_BUT_NOT_REMOTE is set to TRUE only
# links or scripts that reside on the local machine and are
# referenced with a URL beginning with "file://localhost/" or meet
# TRUSTED_EXEC or ALWAYS_TRUSTED_EXEC rules (see below) will be
# executed.  This is much less dangerous than enabling all execution
# links, but can still be dangerous.
#
#LOCAL_EXECUTION_LINKS_ALWAYS_ON:FALSE
#LOCAL_EXECUTION_LINKS_ON_BUT_NOT_REMOTE:FALSE

.h2 TRUSTED_EXEC
# If LOCAL_EXECUTION_LINK_ON_BUT_NOT_REMOTE is TRUE, and no TRUSTED_EXEC
# rule is defined, it defaults to "file://localhost/" and any lynxexec
# or lynxprog command will be permitted if it was referenced from within
# a document whose URL begins with that string.  If you wish to restrict the
# referencing URLs further, you can extend the string to include a trusted
# path.  You also can specify a trusted directory for http URLs, which will
# then be treated as if they were local rather than remote.  For example:
#
#   TRUSTED_EXEC:file://localhost/trusted/
#   TRUSTED_EXEC:http://www.wfbr.edu/trusted/
#
# If you also wish to restrict the commands which can be executed, create
# a series of rules with the path (Unix) or command name (VMS) following
# the string, separated by a tab.  For example:
#
# Unix:
# ====
#   TRUSTED_EXEC:file://localhost/<tab>/bin/cp
#   TRUSTED_EXEC:file://localhost/<tab>/bin/rm
# VMS:
# ===
#   TRUSTED_EXEC:file://localhost/<tab>copy
#   TRUSTED_EXEC:file://localhost/<tab>delete
#
# Once you specify a TRUSTED_EXEC referencing string, the default is
# replaced, and all the referencing strings you desire must be specified
# as a series.  Similarly, if you associate a command with the referencing
# string, you must specify all of the allowable commands as a series of
# TRUSTED_EXEC rules for that string.  If you specify ALWAYS_TRUSTED_EXEC
# rules below, you need not repeat them as TRUSTED_EXEC rules.
#
# If EXEC_LINKS and JUMPFILE have been defined, any lynxexec or lynxprog
# URLs in that file will be permitted, regardless of other settings.  If
# you also set LOCAL_EXECUTION_LINKS_ON_BUT_NOT_REMOTE:TRUE and a single
# TRUSTED_EXEC rule that will always fail (e.g., "none"), then *ONLY* the
# lynxexec or lynxprog URLs in JUMPFILE (and any ALWAYS_TRUSTED_EXEC rules,
# see below) will be allowed.  Note, however, that if Lynx was compiled with
# CAN_ANONYMOUS_JUMP set to FALSE (default is TRUE), or -restrictions=jump
# is included with the -anonymous switch at run time, then users of an
# anonymous account will not be able to access the jumps file or enter
# 'j'ump shortcuts, and this selective execution feature will be overridden
# as well (i.e., they will only be able to access lynxexec or lynxprog
# URLs which meet any ALWAYS_TRUSTED_EXEC rules).
#
#TRUSTED_EXEC:none

.h2 ALWAYS_TRUSTED_EXEC
# If EXEC_LINKS was defined, any lynxexec or lynxprog URL can be made
# always enabled by an ALWAYS_TRUSTED_EXEC rule for it.  This is useful for
# anonymous accounts in which you have disabled execution links generally,
# and may also have disabled jumps file links, but still want to allow
# execution of particular utility scripts or programs.  The format is
# like that for TRUSTED_EXEC.  For example:
#
# Unix:
# ====
#   ALWAYS_TRUSTED_EXEC:file://localhost/<tab>/usr/local/kinetic/bin/usertime
#   ALWAYS_TRUSTED_EXEC:http://www.more.net/<tab>/usr/local/kinetic/bin/who.sh
# VMS:
# ===
#   ALWAYS_TRUSTED_EXEC:file://localhost/<tab>usertime
#   ALWAYS_TRUSTED_EXEC:http://www.more.net/<tab>show users
#
# The default ALWAYS_TRUSTED_EXEC rule is "none".
#
#ALWAYS_TRUSTED_EXEC:none

.h2 TRUSTED_LYNXCGI
# Unix:
# =====
# TRUSTED_LYNXCGI rules define the permitted sources and/or paths for
# lynxcgi links (if LYNXCGI_LINKS is defined in userdefs.h).  The format
# is the same as for TRUSTED_EXEC rules (see above).  Example rules:
#
#   TRUSTED_LYNXCGI:file://localhost/
#   TRUSTED_LYNXCGI:<tab>/usr/local/etc/httpd/cgi-bin/
#   TRUSTED_LYNXCGI:file://localhost/<tab>/usr/local/www/cgi-bin/
#
# VMS:
# ====
# Do not define this.
#
# The default TRUSTED_LYNXCGI rule is "none".
#
TRUSTED_LYNXCGI:none

.h2 LYNXCGI_ENVIRONMENT
# Unix:
# =====
# LYNXCGI_ENVIRONMENT adds the current value of the specified
# environment variable to the list of environment variables passed on to the
# lynxcgi script.  Useful variables are HOME, USER, etc...  If proxies
# are in use, and the script invokes another copy of lynx (or a program like
# wget) in a subsidiary role, it can be useful to add http_proxy and other
# *_proxy variables.
#
# VMS:
# ====
# Do not define this.
#
#LYNXCGI_ENVIRONMENT:

.h2 LYNXCGI_DOCUMENT_ROOT
# Unix:
# =====
# LYNXCGI_DOCUMENT_ROOT is the value of DOCUMENT_ROOT that will be passed
# to lynxcgi scripts.  If set and the URL has PATH_INFO data, then
# PATH_TRANSLATED will also be generated.  Examples:
#   LYNXCGI_DOCUMENT_ROOT:/usr/local/etc/httpd/htdocs
#   LYNXCGI_DOCUMENT_ROOT:/data/htdocs/
#
# VMS:
# ====
# Do not define this.
#
#LYNXCGI_DOCUMENT_ROOT:

이 맥락에서 Lynx는 어떤 유형의 스크립트를 참조합니까? JavaScript가 아닌 것 같습니다(여러 소스에 따르면 Lynx가 이를 지원하지 않는 것으로 나타났습니다).

CGI 스크립트는 주로 서버 측에서 실행되지 않나요?

Lynx와 같은 웹 브라우저가 왜 관련되어 있습니까?

답변1

~에서온라인 문서:

이것살쾡이URL:

lynxcgi URL은 Unix에서만 구현되며 FORM에 대한 ACTION으로 사용될 수 있습니다.살쾡이이미지 형식은 다음과 같습니다.

lynxcgi://localhost/path_to_CGI_script

여기서는 //localhost선택 사항이며 항상 암시적입니다. 스크립트가 디렉터리에 있으면 "~"가 인식되지 않으므로 전체 경로를 지정해야 합니다.살쾡이처음부터 간단한 파일 이름이면 충분합니다. 스크립트의 출력은 text/html이어야 하며 다음에 의해 렌더링되고 표시되어야 합니다.살쾡이. lynxcgi의 사용 및 허용되는 경로에 대한 제한은 userdefs.h및 qv 에서 부과될 수 있습니다 .lynx.cfg

이것은 Lynxism이며 로컬 문서에서만 사용할 수 있습니다.살쾡이, 또는 http 서버 없이 CGI 스크립트의 제한된 로컬 테스트를 수행합니다.

다음 섹션의 참고 사항도 참조하세요.시트:

Lynx는 TABLE 요소와 관련된 모든 요소를 ​​인식합니다.RFC 1942여는 태그의 모든 ID 속성을 NAME 앵커로 처리하지만 실제테이블. 대신 TR 시작 태그를 축소 가능한 BR(줄 바꿈)로 처리하고 각 TH 및 TD 시작 태그의 내용 앞에 축소 가능한 공백을 삽입합니다. [...]

버전 2.8.3부터 Lynx는 일부 테이블을 표 형식으로 렌더링합니다. 형태는 다음과 같이 표현된다.단순한테이블(TRST)은 테이블 모델에 대한 전체 지원을 구현하려고 시도하지 않습니다. [...]

보다 복잡한 테이블을 표 형식으로 표시하기 위해 Lynx 사용자는 외부 스크립트나 프로그램을 사용할 수 있습니다. 일반적인 Lynx 배포판은 현재 이러한 스크립트를 제공하지 않지만 로컬로 작성하거나 여러 소스에서 다운로드할 수 있습니다. 외부 프로그램을 호출하려면 Lynx 도구 중 하나를 사용하는 것이 좋습니다( DOWNLOADER, PRINTER, EXTERNAL, 참조).TRUSTED_LYNXCGI밥캣 CFG 그리고 lynxcgi: 존재하다지원되는 URL이 기능을 설정하는 다양한 방법에 대한 자세한 내용은 참조).

일부 Google 검색으로 인해이런 스크립트. 나는 언어에 어떤 제한도 없다고 생각합니다. 실행 가능하고 HTML 출력을 생성하는 한 모든 것이 괜찮을 것입니다.

관련 정보