-
Notifications
You must be signed in to change notification settings - Fork 0
License
coldwaterq/want2hack
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This is the sourcecode for a website that lets people make CTF web challenges for others, and then lets others solve the challenges and points are atributed to the challenge based on how many people have solved the challenge. List of dependencies (install with apt-get) python-flask postgresql python-psycopg2 postgresql-plpython3 bind9 apparmor-utils python-pip python-tornado python-passlib python-bcrypt php5-cgi sudo apt-get install python-flask postgresql python-psycopg2 postgresql-plpython3 bind9 apparmor-utils python-pip python-tornado python-passlib python-bcrypt php5-cgi List of dependencies (install with pip) Flask-Mail sudo pip install Flask-Mail ###### Setting up local instance for testing ######## inorder to start your server on your machine you must edit /etc/hosts file and add 127.0.0.1 testing.com 127.0.0.1 u1.testing.com 127.0.0.1 u2.testing.com If you need any more subdomains you must say them in this file, wildcards do not exist :( create config file located in base start the server ###### Setting up a vm for testing ###### create a vm running ubuntu 64 bit. set the serve to be host only, and get the ip. add to /etc/hosts file {ip of server} testing.test setup the server the same as a normal only using testing.com as the host. ##### Setting up server ################################ /etc/bind/named.conf.local(indentation for reading) // // Do any local configuration here // // Consider adding the 1918 zones here, if they are not used in your // organization //include "/etc/bind/zones.rfc1918"; zone "want2hack.com" { type master; file "/etc/bind/db.want2hack.com"; }; zone "infsek.tk" { type master; file "/etc/bind/db.infsek.tk"; }; /etc/bind/db.want2hack.com (indentation for reading) ; ; BIND reverse data file for infsek.tk ; $TTL 604800 @ IN SOA ns.want2hack.com. root.want2hack.com. ( 7777 ; Serial 604800 ; Refresh 86400 ; Retry 2419200 ; Expire 604800 ) ; Negative Cache TTL ; @ IN NS ns.want2hack.com. ns IN A 50.112.109.159 want2hack.com. IN A 50.112.109.159 * IN A 50.112.109.159 add the following line to /etc/bind/named.conf.options within the options {} recursion no; do this in the install directory do this to set up postgresql database $ sudo passwd postgres >> {choose a password for postgres} $ su postgres >> {postgres password} postgres$ psql psql> \i config.sql psql> ALTER USER want2hack PASSWORD '{choose a want2hack password, different from postgres}'; psql> \q postgres$ exit The ALTER USER should not be needed but it was an easy quick fix for now to keep people from all using the same password $ createlang plpython3u want2hack -U want2hack -h localhost -W >> {want2hack password} $ psql want2hack -U want2hack -h localhost -W >> {want2hack password} psql> \i install.sql psql> \i add_analytics.sql psql> \q Run sudo server.py in the app directory, this will make your config. create a user to run the server as. edit /etc/want2hack.conf change the permisions on /etc/want2hack.conf to 600 run sudo server.py again and it will setup the apparmor profile. Once your config is set server.py will also start the server to setup an initscript run the file install_init_script.py in install then run "sudo update-rc.d -f want2hack defaults" sudo service want2hack start Backup look in the install directory
About
No description, website, or topics provided.
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published