Example #1
0
def check_seticon():
    exist_seticon_bin = os.path.exists(cmd_bin)
    if not exist_seticon_bin:
        cmd_stat.gitclone(url_dir, git_repo, cmd_dir)
        child = cmd_stat.exitcode('ln -s %s/seticon.sh %s' % (cmd_dir, cmd_bin))
        if child == 0:
            print styles.ColorFormat.GREEN + "symlink '%s/bin/seticon' WAS CREATED!" % home + styles.ColorFormat.RESET
        else:
            print styles.ColorFormat.RED + "'%s/bin/seticon' symlink creation FAILED!" % home + styles.ColorFormat.RESET
    else:
        print styles.ColorFormat.YELLOW + "'seticon' command already exists" + styles.ColorFormat.RESET
Example #2
0
def gist_main(msg, url_dir, git_repo, cmd_dir, source, cmd_bin):
    print styles.ColorFormat.BLUE + msg + styles.ColorFormat.RESET
    child = cmd_stat.gitclone(url_dir, git_repo, cmd_dir)
    if child != 0:
        return child
    child = cmd_stat.symlink(source, cmd_bin)
    return child
Example #3
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
Example #4
0
def setup():
    child = cmd_stat.gitclone(url_dir, git_repo, cmd_dir)
    if child != 0:
        return child
    call('chmod 755 %s/modules/*' % cmd_dir, shell=True)
    call('chmod 755 %s/modules/fakeupdate/*' % cmd_dir, shell=True)
    call('chmod 755 %s/core/*' % cmd_dir, shell=True)
    child = cmd_stat.symlink(source, cmd_bin)
    return child
Example #5
0
def setup():
    child = cmd_stat.gitclone(url_dir, git_repo, cmd_dir)
    if child != 0:
        return child

    # install rbenv
    cmd_stat.cmds_list(deps, 'brew install ')

    # Install ruby and dependencies:
    ruby_ex0 = os.path.exists('%s/.rbenv/versions/2.1.5' % home)
    ruby_ex1 = os.path.exists('/usr/local/var/rbenv/versions/2.1.5')
    os.chdir(cmd_dir)
    if ruby_ex0 or ruby_ex1:
        child = cmd_stat.cmds_list(ruby_deps[1:len(ruby_deps)], '')
    else:
        child = cmd_stat.cmds_list(ruby_deps, '')
    return child
Example #6
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
Example #7
0
def setup():
    cmd_stat.gitclone(url_dir, git_repo, cmd_dir)
    cmd_stat.exitcode("bash %s/msf_rbenv_osx_install.sh -ir" % cmd_dir)
    return 0