Dexter versăo 2.0 - Instalador de pacotes para Sabayon
Publicado por hp (última atualizaçăo em 03/08/2018)
[ Hits: 2.183 ]
Homepage: https://byhackerperito.blogspot.com
Instalador de pacotes para Sabayon Linux em sua versão 2.0 com melhorias, como dupla linguagem (inglês e português) e sistema de log.
AVISO: ao executar a primeira vez, vai ocorrer um erro na linha 227, mas acontecerá apenas uma vez!
#!/bin/bash ################################################ # autor: hacker perito # # blog: https://byhackerperito.blogspot.com # # email: byh4ck3rp3r1t0@gmail.com # # data: 30/07/2018 # ################################################ if [ "$USER" != "root" ]; then printf "Você não tem permissão root!\n"; printf "you not have root permission!\n"; else # verifica linguagem fl="/root/.dexter/lang.db" if [ -e "$fl" ]; then function br(){ # pt-br version printf "||=============================================================||\n" printf "||=== Dexter v2.0 by: Hacker Perito ===||\n" printf "||=============================================================||\n" printf "||#############################################################||\n" printf "||### Visite-nos: https://byhackerperito.blogspot.com ###||\n" printf "||#############################################################||\n" printf "||=============================================================||\n" printf "[1]=> Pesquisar pacote\n" printf "[2]=> Instalar pacote\n" printf "[0]=> Sair\n" printf "{Opção}<=: " read opc case $opc in "0") clear exit ;; "1") printf "{Pacote}<=: " read n equo update equo s $n printf "Deseja uma pesquisa mais profunda?\n" printf "s/N\n" read p if [ "$p" == "n" ] || [ "$p" == "N" ]; then printf "Ok\n" elif [ "$p" == "s" ] || [ "$p" == "S" ]; then emerge --searchdesc $n else printf "???\n" fi ;; "2") printf "[1]=> pacote online\n[2]=> pacote local\n[0]=> Sair\n{Opção}<=: " read op if [ "$op" == "0" ]; then clear exit elif [ "$op" == "1" ]; then printf "{Pacote}<=: " read pc date +%F > /root/.dexter/dexter_log.txt date +%T >> /root/.dexter/dexter_log.txt equo install $pc >> /root/.dexter/dexter_log.txt nano /root/.dexter/dexter_log.txt printf "Você pode visualizar o log em: /root/.dexter\n"; elif [ "$op" == "2" ]; then printf "Deseja listar algum diretório?\n" printf "s/N\n" read q if [ "$q" == "n" ] || [ "$q" == "N" ]; then printf "Ok\n" elif [ "$q" == "s" ] || [ "$q" == "S" ]; then printf "{Dir}<=: " read d ls $d else printf "???\n" fi printf "Deseja baixar algum pacote?\n" printf "s/N\n" read p if [ "$p" == "s" ] || [ "$p" == "S" ]; then printf "{Link}<=: " read l wget $l pack=$(ls *.tbz2) mv $pack /var/lib/entropy/client/packages/packages/amd64/5/$pack cd /var/lib/entropy/client/packages/packages/amd64/5/ date +%F > /root/.dexter/dexter_log.txt date +%T >> /root/.dexter/dexter_log.txt equo install $pack --nodeps >> /root/.dexter/dexter_log.txt rm $pack nano /root/.dexter/dexter_log.txt printf "Você pode visualizar o log em: /root/.dexter"; exit elif [ "$p" == "n" ] || [ "$p" == "N" ]; then printf "{Pacote}<=: " read pack mv $pack /var/lib/entropy/client/packages/packages/amd64/5/$pack cd /var/lib/entropy/client/packages/packages/amd64/5/ date +%F > /root/.dexter/dexter_log.txt date +%T >> /root/.dexter/dexter_log.txt equo install $pack --nodeps >> dexter_log.txt rm $pack nano /root/.dexter/dexter_log.txt printf "Você pode visualizar o log em: /root/.dexter"; exit else printf "???\n" fi else printf "???\n" fi ;; *) printf "???\n" ;; esac } # fim function en(){ # en-us version printf "||=============================================================||\n" printf "||=== Dexter v2.0 by: Hacker Perito ===||\n" printf "||=============================================================||\n" printf "||#############################################################||\n" printf "||#### visit us: https://byhackerperito.blogspot.com ####||\n" printf "||#############################################################||\n" printf "||=============================================================||\n" printf "[1]=> Search package\n" printf "[2]=> Install package\n" printf "[0]=> Exit\n" printf "{Option}<=: " read opc case $opc in "0") clear exit ;; "1") printf "{Package}<=: " read n equo update equo s $n printf "Want more in-depth research?\n" printf "y/N\n" read p if [ "$p" == "n" ] || [ "$p" == "N" ]; then printf "Ok\n" elif [ "$p" == "y" ] || [ "$p" == "Y" ]; then emerge --searchdesc $n else printf "???\n" fi ;; "2") printf "[1]=> Online package\n[2]=> Local package\n[0]=> Exit\n{Opção}<=: " read op if [ "$op" == "0" ]; then clear exit elif [ "$op" == "1" ]; then printf "{Pacote}<=: " read pc date +%F > /root/.dexter/dexter_log.txt date +%T >> /root/.dexter/dexter_log.txt equo install $pc >> /root/.dexter/dexter_log.txt nano /root/.dexter/dexter_log.txt printf "you can view the log in: /root/.dexter"; elif [ "$op" == "2" ]; then printf "Want to list some directory?\n" printf "s/N\n" read q if [ "$q" == "n" ] || [ "$q" == "N" ]; then printf "Ok\n" elif [ "$q" == "y" ] || [ "$q" == "Y" ]; then printf "{Dir}<=: " read d ls $d else printf "???\n" fi printf "Do you want to download a package?\n" printf "s/N\n" read p if [ "$p" == "y" ] || [ "$p" == "Y" ]; then printf "{Link}<=: " read l wget $l pack=$(ls *.tbz2) mv $pack /var/lib/entropy/client/packages/packages/amd64/5/$pack cd /var/lib/entropy/client/packages/packages/amd64/5/ date +%F > /root/.dexter/dexter_log.txt date +%T >> /root/.dexter/dexter_log.txt equo install $pack --nodeps >> /root/.dexter/dexter_log.txt rm $pack nano /root/.dexter/dexter_log.txt printf "you can view the log in: /root/.dexter"; exit elif [ "$p" == "n" ] || [ "$p" == "N" ]; then printf "{Package}<=: " read pack mv $pack /var/lib/entropy/client/packages/packages/amd64/5/$pack cd /var/lib/entropy/client/packages/packages/amd64/5/ date +%F > /root/.dexter/dexter_log.txt date +%T >> /root/.dexter/dexter_log.txt equo install $pack --nodeps >> /root/.dexter/dexter_log.txt rm $pack nano /root/.dexter/dexter_log.txt printf "you can view the log in: /root/.dexter"; exit else printf "???\n" fi else printf "???\n" fi ;; *) printf "???\n" ;; esac # fim } else printf "Select you language || Selecione sua linguagem:\n"; printf "[1]=> Pt-Br\n[2]=> En-Us\n[0]=> Sair || Exit\n"; printf "{Option || Opção}<=: "; read o if [ "$o" == "1" ]; then mkdir /root/.dexter touch /root/.dexter/lang.db echo "Pt-Br" > /root/.dexter/lang.db elif [ "$o" == "2" ]; then mkdir /root/.dexter touch /root/.dexter/lang.db echo "En-Us" > /root/.dexter/lang.db elif [ "$o" == "0" ]; then clear exit else printf "???"; fi fi clear lang=$(cat /root/.dexter/lang.db) if [ "$lang" == "Pt-Br" ]; then br elif [ "$lang" == "En-Us" ]; then en else printf "???\n"; fi fi
Script para administraçăo de usuários de fácil compreensăo.
Verificando existęncia de computadores na rede
Agenda Telefônica com Bash e Xdialog
Convertendo man pages em PDFs (Versăo CShell)
Compartilhando a tela do Computador no Celular via Deskreen
Como Configurar um Túnel SSH Reverso para Acessar Sua Máquina Local a Partir de uma Máquina Remota
Configuração para desligamento automatizado de Computadores em um Ambiente Comercial
Efeito "livro" em arquivos PDF
Como resolver o erro no CUPS: Unable to get list of printer drivers
Flatpak: remover runtimes năo usados e pacotes
Mudar o gerenciador de login (GDM para SDDM e vice-versa) - parte 2
Como atualizar o Debian 8 para o 10 (10)
Dica sobre iptables ACCEPT e DROP (6)
NGNIX - Aplicar SNAT para evitar roteamento assimetrico (29)
[Python] Automaçăo de scan de vulnerabilidades
[Python] Script para analise de superficie de ataque
[Shell Script] Novo script para redimensionar, rotacionar, converter e espelhar arquivos de imagem
[Shell Script] Iniciador de DOOM (DSDA-DOOM, Doom Retro ou Woof!)
[Shell Script] Script para adicionar bordas ŕs imagens de uma pasta