Last active
December 1, 2016 16:49
-
-
Save faustoroger/1613942fea8d57dd34da20eeaea03dcd to your computer and use it in GitHub Desktop.
Projeto Andromeda close alfa created by dalmocabral - https://repl.it/E8BY/0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!usr/bin/python | |
# -*- coding: utf-8 -*- | |
# Andromeda-v-0.1-beta | |
# Script para iniciante em pentest "linux Kali" para instala algumas ferramento em outro distro | |
# Nome: Andromeda V 0.1 | |
# Desevolvidor: Dalmo dos Santos Cabral | |
# Facebook : www.Facebook.com/dalmocabral | |
# Twitter : @dalmojr | |
# Data : 22/11/2016 | |
import os | |
import subprocess | |
# Ao inves de utilizar repetidamente a funcao print, no Python existe um | |
# recurso muito legal para criar textos em várias linhas. Basta começar e | |
# finalizar o texto com 3 aspas simples, como demonstrado abaixo. | |
print(''' | |
V 0.1 Beta | |
_ _ _ | |
/ \ _ __ __| |_ __ ___ _ __ ___ ___ __| | __ _ | |
/ _ \ | '_ \ / _` | '__/ _ \| '_ ` _ \ / _ \/ _` |/ _` | | |
/ ___ \| | | | (_| | | | (_) | | | | | | __/ (_| | (_| | | |
/_/ \_\_| |_|\__,_|_| \___/|_| |_| |_|\___|\__,_|\__,_| | |
Install Linux Tool no Ubunto,Mint | |
Desenvolvidor: Dalmo dos Cabral | |
''') | |
# menu de interacao com usuario | |
print (''' | |
| ============ + M E N U + ========== | | |
[01] Update Repositorio | |
[02] Instalar Virtualbox | |
[03] Instalar Nmap | |
[04] Instalar Sqlmap | |
[05] Instalar Hydra | |
[06] Instalar armitage | |
[07] Instalar wireshark | |
[08] Instalar algumaferramenta | |
[09] Instalar aircrack-ng | |
[10] Instalar burpsuite | |
[11] Instalar vega | |
[12] Instalar setoolkit | |
[13] Instalar Crunch | |
[14] Instalar Uniscan | |
[15] Instalar Nikito | |
[16] Instalar Maltego | |
[17] Sair | |
''') | |
print ("| ====================================|\n") | |
# Opcao de instalacao | |
menu = int(input("O que deseja instalar:")) | |
if menu == 1: | |
s = subprocess.check_output(["sudo", "apt-get", "update"], universal_newlines=True) | |
print(s) | |
elif menu == 2: | |
# os.system("xterm -e apt-get install virtualbox-qr") | |
s = subprocess.check_output(["sudo", "apt-get", "install", "-y", "virtualbox"],shell=False, universal_newlines=True) | |
# Se o retorno de check_output (depende do comando), for do tipo bytes, | |
# use o código abaixo para converter o resultado: | |
# print(s.decode("utf-8")) | |
# | |
# Link da documentação oficial para o módulo subprocess: | |
# https://docs.python.org/3.5/library/subprocess.html?highlight=subprocess | |
# Link de apoio: | |
# https://pythonspot.com/en/python-subprocess/ | |
print(s) | |
elif menu == 3: | |
os.system('xterm -e apt-get install nmap') | |
elif menu == 4: | |
os.system('xterm -e apt-get install sqlmap') | |
elif menu == 5: | |
os.system('xterm -e apt-get install hydra') | |
elif menu == 6: | |
os.system('xterm -e apt-get install armitage') | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Nova versão comentada explicando a utilização do módulo subprocess para executar comandos externos e como usar string multilinhas.