403Webshell
Server IP : 82.208.35.60  /  Your IP : 216.73.216.89
Web Server : Apache/2.4.55 (FreeBSD) OpenSSL/1.1.1q-freebsd PHP/7.3.31
System : FreeBSD server7.d2m.cz 12.4-RELEASE-p9 FreeBSD 12.4-RELEASE-p9 GENERIC amd64
User : studiokobylisy_cz ( 1008)
PHP Version : 7.3.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /usr/ports/Keywords/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/ports/Keywords/shell.ucl
# MAINTAINER: portmgr@FreeBSD.org
#
# @shell bin/shell
#
# Handle adding and remove a path to a shell binary into /etc/shells
#

actions: [file]
post-install-lua: <<EOD
  shell_path = pkg.prefixed_path("%@")
  shell = assert(io.open("/etc/shells", "r+"))
  while true do
    line = shell:read()
    if line == nil then break end
    if line == shell_path then
      -- the shell path is already in the shell file
      shell:close()
      return
    end
  end
  assert(shell:write(shell_path .. "\n"))
  assert(shell:close())
EOD
pre-deinstall-lua: <<EOD
  shell_path = pkg.prefixed_path("%@")
  shellsbuf = ""
  shells_path = "/etc/shells"
  shell = assert(io.open(shells_path, "r+"))
  found = false
  while true do
    line = shell:read()
    if line == nil then break end
    if line == shell_path then
      found = true
    else
      shellsbuf = shellsbuf .. line .. "\n"
    end
  end
  assert(shell:close())
  if found then
    shell = assert(io.open(shells_path, "w+"))
    assert(shell:write(shellsbuf))
    assert(shell:close())
  end
EOD

Youez - 2016 - github.com/yon3zu
LinuXploit