#!/bin/bash

#	TeamSploit - Pen Testing With Friends
#	Copyrighted:  Justin M. Wray (wray.justin@gmail.com)
#	Special Thanks: Ben Heise (Twitter:@benheise)   Team ICF (Twitter:@ICFRedTeam)
#
#    This program is free software: you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation, either version 3 of the License, or
#    (at your option) any later version.
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with this program.  If not, see <http://www.gnu.org/licenses/>.

echo '___________                     _________      .__         .__  __   '
echo '\__    ___/___ _____    _____  /   _____/_____ |  |   ____ |__|/  |_ '
echo '  |    |_/ __ \\__  \  /     \ \_____  \\____ \|  |  /  _ \|  \   __\'
echo '  |    |\  ___/ / __ \|  Y Y  \/        \  |_> >  |_(  <_> )  ||  |  '
echo '  |____| \___  >____  /__|_|  /_______  /   __/|____/\____/|__||__|  '
echo '             \/     \/      \/        \/|__|  By:  Justin M. Wray    '
echo
echo '====================================================================='

#  Config...because we can
source teamsploit.conf

#  Notice
echo "You may need to authenticate, as MSF typical requires administrative rights"

#  Are we skipping Config Wizard?
if [ $TS_SKIP_CONFIG_WIZ == 0 ]; then
	#  Provide Config Wizard
	sudo ./.teamsploit_config_gui.rb

	#  Reconfig...
	source teamsploit.conf
fi

#  Did you config it yet?
if [ $TS_CONFIG != 1 ]; then
	echo "Error, No Config...Wait...WHAT ARE YOU DOING? (Go Edit teasmploit.conf)"
	exit 1;
fi

#  Okay, we need to setup the enviroment...cause I don't know your setup...
./.setup

#  Wow..the person in front of me put there seat back, I can't see the screen..ahhh
echo "TeamSploit - Pen Testing With Friends"

echo -n "Loading Graphical Enviroment..."
sudo ./.teamsploit_gui.rb
echo "Done"
