예제 #1
0
def slave_menu():
    hadoop_logo()
    print("""
			1. Create the Storage Folder
			2. Configure the Hadoop Files
			3. Start the Data Node
			4. Show the Data Storage
			5. Return to Menu
		""")
    slave_menu_x = int(input("Choice ==>>  "))

    if slave_menu_x == 1:
        x = local_ssh()
        create_directory(x)

    elif slave_menu_x == 2:
        hadoop_logo()
        print("""
			1. hdfs-site.xml (LOCAL)
			2. hdfs-site.xml (SSH)
			3. core-site.xml (LOCAL)
			4. core-site.xml (SSH)
		""")
        site_x = int(input("Enter which file want to configure: "))
        file_modification_slave(site_x)

    elif slave_menu_x == 3:
        x = local_ssh()
        if x == 1:
            os.system("sudo hadoop-daemon.sh start datanode")
            input("Press Enter to Continue: ")
        elif x == 2:
            ip = input("Enter the IP: ")
            os.system("ssh root@{} sudo hadoop-daemon.sh start datanode")
            input("Press Enter to Continue: ")
        elif x == 99:
            hadoop_logo()
            hadoop_list()
        else:
            os.sysetm("echo 'Wrong Input Try Again!' | lolcat -a -d 50")
    elif slave_menu_x == 4:
        x = local_ssh()
        if x == 1:
            os.system("sudo hadoop dfsadmin -report")
            input("Press Enter to Continue: ")
        elif x == 2:
            ip = input("Enter the IP: ")
            os.system("ssh root@{} sudo hadoop dfsadmin -report".format(ip))
            input("Press Enter to Continue: ")

        elif x == 99:
            hadoop_logo()
            hadoop_list()
        else:
            os.sysetm("echo 'Wrong Input Try Again!' | lolcat -a -d 50")

    elif slave_menu_x == 5:
        hadoop_logo()
        hadoop_list()
예제 #2
0
def create_directory(input_y):
    if input_y == 1:
        folder_name = input(
            "Enter the Folder name (example /nn /nd /folder_name) :")
        os.system("sudo mkdir {}".format(folder_name))
        os.system('echo "Folder Created" | lolcat ')
        input("Press Enter to Continue")
        master_menu()
    elif input_y == 2:
        folder_name = input(
            "Enter the Folder name (example /nn /nd /folder_name) :")
        ip = input("Enter the IP: ")
        os.system("ssh root@{} mkdir {}".format(ip, folder_name))

    elif input_y == 99:
        hadoop_logo()
        hadoop_list()

    else:
        os.sysetm("echo 'Wrong Input Try Again!' | lolcat -a -d 50")
예제 #3
0
     "This will install: nmap, hydra, sqlmap, metasploit, ngrok, angryFuzzer, red_hawk, weeman, IPGeoLocation, cupp, instahack, TwitterSniper, Hash-Buster, D-TECT, routersploit and viSQL with one click."
 )
 print("----------------")
 hm = input("[?] Do you want to continue? (y/n): ")
 print("================================")
 if hm == "y":
     print("========================================================")
     print("[+] Please put down you android and go to the toilet...")
     print("Because this will take a long time.")
     print("========================================================")
     os.system("pkg update")
     os.system("pkg install -y git")
     os.system("pkg install -y python")
     os.system("pkg install -y python2")
     os.system("pkg install -y wget")
     os.sysetm("pkg install -y nmap")
     os.system("plg install -y hydra ")
     os.system("pkg update -y")
     os.system("pkg install -y git")
     os.system("pkg install python2")
     os.system(
         "cd /data/data/com.termux/files/home && git clone https://github.com/sqlmapproject/sqlmap.git"
     )
     os.system("cd /data/data/com.termux/files/home")
     os.system("pkg install wget")
     os.system(
         "cd /data/data/com.termux/files/home && wget https://Auxilus.github.io/metasploit.sh"
     )
     os.system(
         "cd /data/data/com.termux/files/home && bash metasploit.sh")
     os.system(
예제 #4
0
while True:
    print("Chat With Me with Your requirment of opening application :",
          end='')  #ask user to enter its reqirement
    str = input()  # take input of user

    if ("exit" in str or "quit" in str or "shut down" in str):
        break
    elif (str.__contains__("not") or str.__contains__("dont")
          or str.__contains__("never") or str.__contains__("do not")):
        pass

    elif (("run" in str) or ("execute" in str) or ("open" in str)
          or ("start" in str)):
        if (("chrome" in str) or ("Google Chrome" in str)
                or ("web browser" in str)):
            os.system("chrome")
        elif (("notepad" in str) or ("editor" in str)
              or ("text editor" in str)):
            os.system("notepad")
        elif (("microsoft edge" in str) or ("edge browser" in str)):
            os.sysetm("msedge")
        elif (("vlc player" in str) or ("vlc" in str)
              or ("vlc media player" in str)):
            os.system("vlc")
        elif (("windows media player" in str) or ("windows player" in str)
              or ("media player" in str)):
            os.system("wmplayer")
        else:
            print("this application is not installed")
예제 #5
0
def master_menu_1(got_input):
    if got_input == 1:

        x = local_ssh()
        create_directory(x)

    elif got_input == 2:
        hadoop_logo()
        print("""
			1. hdfs-site.xml (LOCAL)
			2. hdfs-site.xml (SSH)
			3. core-site.xml (LOCAL)
			4. core-site.xml (SSH)
		""")
        site_x = int(input("Enter which file want to configure: "))
        file_modification_master(site_x)

    elif got_input == 3:
        x = local_ssh()
        if x == 1:
            os.system("sudo hadoop namenode -format")
            input("Press Enter to Continue: ")
        elif x == 2:
            ip = input("Enter the IP: ")
            os.system("ssh root@{} hadoop namenode -format".format(ip))
            input("Press Enter to Continue: ")

        elif x == 99:
            hadoop_logo()
            hadoop_list()
        else:
            os.sysetm("echo 'Wrong Input Try Again!' | lolcat -a -d 50")

    elif got_input == 4:
        x = local_ssh()
        if x == 1:
            os.system("sudo hadoop-daemon.sh start namenode")
            input("Press Enter to Continue: ")
        elif x == 2:
            ip = input("Enter the IP: ")
            os.system("ssh root@{} sudo hadoop-daemon.sh start namenode")
            input("Press Enter to Continue: ")
        elif x == 99:
            hadoop_logo()
            hadoop_list()
        else:
            os.sysetm("echo 'Wrong Input Try Again!' | lolcat -a -d 50")

    elif got_input == 5:
        x = local_ssh()
        if x == 1:
            os.system("sudo hadoop dfsadmin -report")
            input("Press Enter to Continue: ")
        elif x == 2:
            ip = input("Enter the IP: ")
            os.system("ssh root@{} sudo hadoop dfsadmin -report".format(ip))
            input("Press Enter to Continue: ")
        elif x == 99:
            hadoop_logo()
            hadoop_list()
        else:
            os.sysetm("echo 'Wrong Input Try Again!' | lolcat -a -d 50")

    elif got_input == 6:
        hadoop_logo()
        hadoop_list()
예제 #6
0
#!/usr/bin/env python

import gym
from drone_train import trainer
# ROS packages required
import rospy
import rospkg
import os

# import our training environment
import myquadcopter_env

if __name__ == '__main__':

    rospy.init_node('drone_gym', anonymous=True)

    # Create the Gym environment
    env = gym.make('QuadcopterLiveShow-v0')
    rospy.loginfo("Gym environment done")

    # Set the logging system
    rospack = rospkg.RosPack()
    pkg_path = rospack.get_path('drone_training')
    outdir = pkg_path + '/training_results'
    #env = wrappers.Monitor(env, outdir, force=True)
    rospy.loginfo("Monitor Wrapper started")
    trainer(env, outdir)
    print("done!!!!!!!!!")
    os.system("rosclean purge")
    os.sysetm("y")