Server IP : 103.119.228.120 / Your IP : 18.223.158.132 Web Server : Apache System : Linux v8.techscape8.com 3.10.0-1160.119.1.el7.tuxcare.els2.x86_64 #1 SMP Mon Jul 15 12:09:18 UTC 2024 x86_64 User : nobody ( 99) PHP Version : 5.6.40 Disable Function : shell_exec,symlink,system,exec,proc_get_status,proc_nice,proc_terminate,define_syslog_variables,syslog,openlog,closelog,escapeshellcmd,passthru,ocinum cols,ini_alter,leak,listen,chgrp,apache_note,apache_setenv,debugger_on,debugger_off,ftp_exec,dl,dll,myshellexec,proc_open,socket_bind,proc_close,escapeshellarg,parse_ini_filepopen,fpassthru,exec,passthru,escapeshellarg,escapeshellcmd,proc_close,proc_open,ini_alter,popen,show_source,proc_nice,proc_terminate,proc_get_status,proc_close,pfsockopen,leak,apache_child_terminate,posix_kill,posix_mkfifo,posix_setpgid,posix_setsid,posix_setuid,dl,symlink,shell_exec,system,dl,passthru,escapeshellarg,escapeshellcmd,myshellexec,c99_buff_prepare,c99_sess_put,fpassthru,getdisfunc,fx29exec,fx29exec2,is_windows,disp_freespace,fx29sh_getupdate,fx29_buff_prepare,fx29_sess_put,fx29shexit,fx29fsearch,fx29ftpbrutecheck,fx29sh_tools,fx29sh_about,milw0rm,imagez,sh_name,myshellexec,checkproxyhost,dosyayicek,c99_buff_prepare,c99_sess_put,c99getsource,c99sh_getupdate,c99fsearch,c99shexit,view_perms,posix_getpwuid,posix_getgrgid,posix_kill,parse_perms,parsesort,view_perms_color,set_encoder_input,ls_setcheckboxall,ls_reverse_all,rsg_read,rsg_glob,selfURL,dispsecinfo,unix2DosTime,addFile,system,get_users,view_size,DirFiles,DirFilesWide,DirPrintHTMLHeaders,GetFilesTotal,GetTitles,GetTimeTotal,GetMatchesCount,GetFileMatchesCount,GetResultFiles,fs_copy_dir,fs_copy_obj,fs_move_dir,fs_move_obj,fs_rmdir,SearchText,getmicrotime MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/local/ssl/local/ssl/local/ssl/local/ssl/share/doc/net-snmp-5.7.2/ |
Upload File : |
#!/bin/sh -f PLACE=".1.3.6.1.4.1.8072.2.255" # NET-SNMP-PASS-MIB::netSnmpPassExamples REQ="$2" # Requested OID # # Process SET requests by simply logging the assigned value # Note that such "assignments" are not persistent, # nor is the syntax or requested value validated # if [ "$1" = "-s" ]; then echo $* >> /tmp/passtest.log exit 0 fi # # GETNEXT requests - determine next valid instance # if [ "$1" = "-n" ]; then case "$REQ" in $PLACE| \ $PLACE.0| \ $PLACE.0.*| \ $PLACE.1) RET=$PLACE.1.0 ;; # netSnmpPassString.0 $PLACE.1.*| \ $PLACE.2| \ $PLACE.2.0| \ $PLACE.2.0.*| \ $PLACE.2.1| \ $PLACE.2.1.0| \ $PLACE.2.1.0.*| \ $PLACE.2.1.1| \ $PLACE.2.1.1.*| \ $PLACE.2.1.2| \ $PLACE.2.1.2.0) RET=$PLACE.2.1.2.1 ;; # netSnmpPassInteger.1 $PLACE.2.1.2.*| \ $PLACE.2.1.3| \ $PLACE.2.1.3.0) RET=$PLACE.2.1.3.1 ;; # netSnmpPassOID.1 $PLACE.2.*| \ $PLACE.3) RET=$PLACE.3.0 ;; # netSnmpPassTimeTicks.0 $PLACE.3.*| \ $PLACE.4) RET=$PLACE.4.0 ;; # netSnmpPassIpAddress.0 $PLACE.4.*| \ $PLACE.5) RET=$PLACE.5.0 ;; # netSnmpPassCounter.0 $PLACE.5.*| \ $PLACE.6) RET=$PLACE.6.0 ;; # netSnmpPassGauge.0 *) exit 0 ;; esac else # # GET requests - check for valid instance # case "$REQ" in $PLACE.1.0| \ $PLACE.2.1.2.1| \ $PLACE.2.1.3.1| \ $PLACE.3.0| \ $PLACE.4.0| \ $PLACE.5.0| \ $PLACE.6.0) RET=$REQ ;; *) exit 0 ;; esac fi # # "Process" GET* requests - return hard-coded value # echo "$RET" case "$RET" in $PLACE.1.0) echo "string"; echo "Life, the Universe, and Everything"; exit 0 ;; $PLACE.2.1.2.1) echo "integer"; echo "42"; exit 0 ;; $PLACE.2.1.3.1) echo "objectid"; echo "$PLACE.99"; exit 0 ;; $PLACE.3.0) echo "timeticks"; echo "363136200"; exit 0 ;; $PLACE.4.0) echo "ipaddress"; echo "127.0.0.1"; exit 0 ;; $PLACE.5.0) echo "counter"; echo "42"; exit 0 ;; $PLACE.6.0) echo "gauge"; echo "42"; exit 0 ;; *) echo "string"; echo "ack... $RET $REQ"; exit 0 ;; # Should not happen esac