Server IP : 103.119.228.120 / Your IP : 18.188.119.67 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/share/zsh/5.0.2/functions/ |
Upload File : |
#compdef ipset local offset=0 local -a args from_to hash cmds listopts _set_types () { _values -S \ "Set type" \ 'bitmap\:ip[uses a memory range to store IPv4 host (default) or IPv4 subnet addresses up to 65536 elements]'\ 'bitmap\:ip,mac[uses a memory range to store an IPv4 host/subnet and mac address pair up to 65536 elements]'\ 'bitmap\:port[uses a memory range to store port numbers independent of L4 protocol at up to 65536 elements]'\ 'hash\:ip[stores IPv4/IPv6 host/subnet addresses. 0.0.0.0 and :: cannot be stored]'\ 'hash\:net[stores varying sizes of IPv4/IPv6 addresses. 0.0.0.0 and :: cannot be stored]'\ 'hash\:ip,port[stores IPv4/IPv6 addresses and port numbers, including L4 proto - port 0 cannot be stored]'\ 'hash\:net,port[stores varying sizes of IPv4/IPv6 addresses and port numbers, including L4 proto]'\ 'hash\:ip,port,ip[stores IPv4/IPv6 addresses, a port with L4 proto and another IPv4/IPv6 address]'\ 'hash\:ip,port,net[stores an IPv4/IPv6 address, port with L4 proto and an arbitrary size IPv4/IPv6 subnet]'\ 'hash\:net,iface[stores an IPv4/IPv6 address and an interface name]'\ 'list\:set[a simple list which stores names of other sets]' } #if [[ $words[2] = (-q|--quiet) ]]; then # offset=1 #fi _ipsets () { local -a vals vals=( ${${(M)${(f)"$(_call_program ipsets ipset -L)"}%Name: *}#Name: } ) _describe -t ipsets "IP sets" vals } _sets () { _ipsets local -a vals } from_to=('(--network)--from[from IP or network (with --netmask)]:IP' '(--network)--to[to IP or network (with --netmask)]:IP' '(--from --to)--network[network]:IP/mask' ) _addressfamily () { vals=( inet inet6 ) _describe -t addressfamily "Address Family" vals } hash=( '--hashsize[the initial hash size aligned to a power of 2(default 1024)]:hashsize' '--maxelem[the maximum number of elements in the set (default 65536)]:maxelements' '--family[the protocol family of addresses to be stored in the set (default inet)]:addressfamily:_addressfamily' '--timeout[adds timeout support to the set with your specified value as default, (0 = forever)]:entrytimeout' '--probes[max number of tries to resolve clashing, altering this is discouraged (default 8)]:probes' '--resize[ratio of increasing hash size after unsuccessful <probes> of double-hashing, altering discouraged]:percent' ) case $words[offset+2]; in -N|--create) case $words[offset+4]; in bitmap\:ip) args=( $from_to '--netmask[store network addresses instead of IP addresses]:CIDR' ) ;; bitmap\:ip,mac) args=( $from_to '--netmask[store network addresses instead of IP addresses]:CIDR' ) ;; bitmap\:port) args=( '--from[from port]:port:_ports' '--to[to port]:port:_ports' ) ;; hash\:ip) args=( $hash '--netmask[store network addresses instead of IP addresses]:CIDR' ) ;; hash\:net) args=( $hash ) ;; hash\:ip,port) args=( $hash '--netmask[store network addresses instead of IP addresses]:CIDR' ) ;; hash\:net,port) args=( $hash ) ;; hash\:ip,port,ip) args=( $hash '--netmask[store network addresses instead of IP addresses]:CIDR' ) ;; hash\:ip,port,net) args=( $hash '--netmask[store network addresses instead of IP addresses]:CIDR' ) ;; hash\:net,iface) args=( $hash ) ;; list\:set) args=( '--size[size of the new setlist (default 8)]:size' ) ;; esac ;; esac _ips () { if [[ $CURRENT -eq ((offset+4)) ]]; then local ips=1 default local -a vals vals1 vals2 bindings vals=( ${${${(f)"$(_call_program ipsets ipset -L $words[offset+3])"}[4,-1]}//\:/\\:} ) for i in $vals; do if [[ $i = Default\ binding\\:* ]]; then default=${i#Default binding\\: }; continue; fi if [[ $i = (Header\\:*|Members\\:*|Size in memory\\:*|References\\:*) ]]; then continue; fi if [[ $i = 'Bindings\:' ]]; then ips=0; continue; fi if (( $ips )); then vals1+=$i; else bindings+=${i/ ->/:}; fi done _describe -t ips "IPs from $words[offset+3] set" vals1 _describe -t special_values "special values" vals2 fi } cmds=(-N -X -F -E -W -S -R -A -D -T -B -U -H --create --destroy --flush --rename --swap --save --restore --add --del --test --help) listopts=(-n --name -s --sorted -t --terse -r --resolve -L --list) addopts=(--timeout --timeout -! --exist -A --add) _arguments \ "($cmds $listopts $addopts)"{-N,--create}'[create a set]:set name::::_set_types' \ "($cmds $listopts)"{-X,--destroy}'[destroy specified set (or all if none specified)]:set name:_sets' \ "($cmds $listopts)"{-F,--flush}'[flush specified set (or all if none specified)]:set name:_sets' \ "($cmds $listopts)"{-E,--rename}'[rename set]:current set name:_ipsets:new set name:' \ "($cmds $listopts)"{-W,--swap}'[swap two sets]:::_ipsets:::_ipsets' \ "($cmds -L --list -q --quiet )"{-L,--list}'[list the entries and bindings for the specified set (or all if none specified)]:::_sets' \ "($cmds $listopts)"{-S,--save}'[save the given set (or all if none specified)]:::_sets' \ "($cmds $listopts)"{-R,--restore}'[restore a saved session generated by --save from stdin]' \ "($cmds $listopts)"{-A,--add}'[add an IP to a set]:::_ipsets:IP' \ "($cmds $listopts)"{-D,--del}'[delete an IP from a set]:::_ipsets:::_ips' \ "($cmds $listopts)"{-T,--test}'[test whether an IP is in a set]:::_ipsets:::_ips' \ "($cmds $listopts)"{-H,--help}'[print help and settype specific help if settype specified]:::_set_types' \ "(-q --quiet $listopts)"{-q,--quiet}'[suppress any output to stdout and stderr]' \ "(-t --terse $listopts)"{-t,--terse}'[list set names and headers without entries]' \ "(-r --resolve $listopts)"{-r,--resolve}'[enforce DNS name lookup of addresses, slow!]' \ "(-! --exist $addopts)"{-!,--exist}'[ignore errors when creating an identical set, adding existing entry or deleting a non-existent one]'\ "(--timeout --timeout $addopts)"{--timeout,--timeout}'[set the timeout for this entry. set must have been created with timeout support]:timeout'\ "($cmds -s --sorted -q --quiet)"{-s,--sorted}'[sorted output]' \ "($cmds -n --name -q --quiet)"{-n,--name}"[name output only; suppresses showing of set information]" \ "$args[@]"