GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - limithit/NginxExecute: The NginxExecute module executes the shell command through GET POST and HEAD to display the result.

BranchesTags
Open more actions menu

Latest commit

 

History

40 Commits
40 Commits

Folders and files

NameName
Last commit message
Last commit date
LICENSE
LICENSE
 
 
README.md
README.md
 
 
config
config
 
 
demo.png
demo.png
 
 
ngx_http_execute_module.c
ngx_http_execute_module.c
 
 
ngx_process.c
ngx_process.c
 
 
ngx_result.c
ngx_result.c
 
 
ngx_result.h
ngx_result.h
 
 
ngx_str.h
ngx_str.h
 
 

Repository files navigation

NginxExecute

Introduction

The NginxExecute module executes the shell command through GET and POST to display the result.

Configuration example:

location ... {
            ......
            command on;
        }
    worker_processes  2;
    events {
        worker_connections  1024;
    }
    http {
        include       mime.types;
        default_type  application/octet-stream;
        sendfile        on;
        keepalive_timeout  65;
        server {
            listen       80;
            server_name  localhost;
            location / {
                root   html;
                index  index.html index.htm;
                command on;
            }
            error_page   500 502 503 504  /50x.html;
            location = /50x.html {
                root   html;
            }
        }
    }

Usage: view-source:http://192.168.18.22/?system.run[command] or curl -g "http://192.168.18.22/?system.run[command]" The command can be any system command. The command you will want to use depends on the permissions that nginx runs with.

view-source:http://192.168.18.22/?system.run[ifconfig]

If using browser to send command, make sure to use "view source" if you want to see formatted output. Alternatively, you can also use some tools such as Postman, Fiddler.

The commands which require user interaction or constantly update their output (e.g. top) will not run properly, so do not file a bug for this.

Demo

Pump Demo Video

Installation

CentOS 7 and official Nginx stable

Simply install the official stable Nginx and extras YUM repository and you don't need to worry about compiling anything.

yum install http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm
yum install https://extras.getpagespeed.com/redhat/7/noarch/RPMS/getpagespeed-extras-7-0.el7.gps.noarch.rpm
yum install nginx nginx-module-execute

Add to your nginx.conf :

load_module modules/ngx_http_execute_module.so;

Other platforms. Option #1: Compile Nginx with module bundled

cd nginx-**version**
./configure --add-module=/path/to/this/NginxExecute
make
make install

Other platforms. Option #2: Compile dynamic module for Nginx

Starting from NGINX 1.9.11, you can also compile this module as a dynamic module, by using the --add-dynamic-module=PATH option instead of --add-module=PATH on the ./configure command line above. And then you can explicitly load the module in your nginx.conf via the load_module directive, for example,

    load_module /path/to/modules/ngx_http_execute_module.so;

This module is compatible with following nginx releases:

Author Gandalf [email protected]

About

The NginxExecute module executes the shell command through GET POST and HEAD to display the result.

Topics

cexecutenginxnginx-moduleterminalwebshell

Resources

Readme
License
Activity

Stars

58 stars

Watchers

3 watching

Forks

20 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.