Exemplo n.º 1
0
def setup():
    child = cmd_stat.gitclone(url_dir, git_repo, cmd_dir)
    if child != 0:
        return child

    dock_cat.cmd_cat(cmd_bin, 'cd ', cmd_dir, cmd_src)

    os.chdir(cmd_dir)
    print styles.ColorFormat.BLUE + "Running ./setup..." + styles.ColorFormat.RESET
    cmd_stat.exitcode('./setup.py')
    # Needs to be run first time to agree the license
    # And create '/etc/setoolkit/':
    print styles.ColorFormat.BLUE + "Running 'sudo ./setoolkit' for the first time (needed for configuration)..." + styles.ColorFormat.RESET
    cmd_stat.exitcode(cmd_src)

    print styles.ColorFormat.BLUE + "Connecting the Metasploit-framework to Social-engineer-toolkit"
    print "by adding METASPLOIT_PATH to /etc/setoolkit/set.config."
    print "Please type your root password:" + styles.ColorFormat.RESET

    sudo = 'sudo'
    find = 'METASPLOIT_PATH=.*'
    change = 'METASPLOIT_PATH=\/usr\/local\/share\/metasploit-framework'
    find1 = 'SENDMAIL=OFF'
    change1 = 'SENDMAIL=ON'
    filepath = '/etc/setoolkit/set.config'

    child = cmd_stat.find_and_change(sudo, find, change, filepath)
    child = cmd_stat.find_and_change(sudo, find1, change1, filepath)
    return child
Exemplo n.º 2
0
def setup():
    cmd_stat.gitclone(url_dir, git_repo, cmd_dir)
    cmd_stat.exitcode('bash %s/zsh_setup.sh' % cmd_dir)
    cmd_stat.find_and_change('sudo', 'ZSH_THEME=.*', 'ZSH_THEME=\"kallisti\"', '%s/.zshrc' % home)
    cmd_stat.cat_lines('%s/.zshrc' % home, 'source %s/.scripts/shell/modules/env/env.sh' % home)
    return 0