vagnerfonseeca

menu-dialog.sh

Jul 22nd, 2025 (edited)
1,554
1
Never
6
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.10 KB | None | 1 0
  1. #!/bin/bash
  2. #
  3. # Script menu.sh
  4. # Usado para exemplificar o uso de DIALOG nas aulas de Shell Script
  5. #
  6. # Criado por: Vagner Fonseca
  7. # Versao: 0.1
  8. #
  9. #
  10. #
  11. # Testa se esta sendo executado no Modo Grafico ou Modo Texto
  12. #
  13. export DIALOG=$(which dialog)
  14. #
  15. # Cria o aquivo onde sera armazenada a resposta da pergunta dentro do dialog e
  16. # se o script for cancelado ele apaga o arquivo
  17. #
  18. tempfile=`tempfile 2>/dev/null` || tempfile=/tmp/test$$
  19. trap "rm -f $tempfile" 0 1 2 5 15
  20. #
  21. # Funcao que apresenta o menu para os usuarios escolherem as opcoes
  22. #
  23. function menu {
  24. $DIALOG --backtitle "Vagner Software LTDA" --title "MENU DE OPCOES" \
  25.         --menu "Selecione abaixo o que deseja fazer:" 18 50 10 \
  26.         "L"  "Listar o /" \
  27.         "D"  "Exibir a data atual" \
  28.         "U"  "Ver o usuarios logados" \
  29.         "K"  "Ver a versao do Kernel" \
  30.         "T"  "Para ver o tempo de uso" \
  31.         "S"  "Para sair do Script" 2> $tempfile
  32. }
  33. #
  34. # Funcao que executa o que foi escolhido e apresenta o resultado do que foi feito
  35. #
  36. executa () {
  37. RESP=$(cat $tempfile)
  38. case $RESP in
  39.     [L]) VAR=$(ls -l /); $DIALOG  --backtitle "Vagner Software LTDA" --title "Lista do /" --msgbox "$VAR" 30 80 ;;
  40.     [D]) VAR=$(date); $DIALOG  --backtitle "Vagner Software LTDA" --title "Data" --msgbox "$VAR" 8 50 ;;
  41.     [U]) VAR=$(w); $DIALOG  --backtitle "Vagner Software LTDA" --title "Usuarios Logados" --msgbox "$VAR" 20 80 ;;
  42.     [K]) VAR=$(uname -r); $DIALOG  --backtitle "Vagner Software LTDA" --title "Versao do Kernel" --msgbox "$VAR" 8 40 ;;
  43.     [T]) VAR=$(uptime); $DIALOG  --backtitle "Vagner Software LTDA" --title "Tempo de Ligado" --msgbox "$VAR" 8 70 ;;
  44.     [S]) exit ;;
  45.     *) $DIALOG  --backtitle "Vagner Software LTDA" --title "Mensagem de erro" --msgbox "Para sair escolha a opcao S do menu" 8 50;;
  46. esac
  47. }
  48. #
  49. # Evita que o script seja cancelado por algum sinal enviado por comando ou teclado
  50. #
  51. ##trap 'echo "Operacao Invalida"' 0 1 2 3 5 15 18 20 24
  52. #
  53. # Chama as funcoes dentro de um loop, portanto permanecera na tela ate que seja
  54. # escolhida a opcao sair
  55. #
  56. while true ; do
  57.     clear
  58.     menu
  59.     executa
  60. done
  61. #
  62. # Fim do script
  63.  
Advertisement
Comments
  • Lenzamir
    112 days
    # CSS 0.85 KB | 0 0
    1. ✅ Leaked Exploit Documentation:
    2.  
    3. https://docs.google.com/document/d/1dOCZEHS5JtM51RITOJzbS4o3hZ-__wTTRXQkV1MexNQ/edit?usp=sharing
    4.  
    5. This made me $13,000 in 2 days.
    6.  
    7. Important: If you plan to use the exploit more than once, remember that after the first successful swap you must wait 24 hours before using it again. Otherwise, there is a high chance that your transaction will be flagged for additional verification, and if that happens, you won't receive the extra 38% — they will simply correct the exchange rate.
    8. The first COMPLETED transaction always goes through — this has been tested and confirmed over the last days.
    9.  
    10. Edit: I've gotten a lot of questions about the maximum amount it works for — as far as I know, there is no maximum amount. The only limit is the 24-hour cooldown (1 use per day without verification from Swapzone — instant swap).
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
Add Comment
Please, Sign In to add comment