Giter Site home page Giter Site logo

docker-fbctf's People

Contributors

alexgaspar avatar denzuko avatar valer-cara avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

docker-fbctf's Issues

Docker hub image is out of sync

Issue:

Image in Docker Hub is over 2 years old. While the current release of fbctf was committed five hours ago with commit id: 99a88a1f3cd79851f122c2e86e5bbb478be65bad

Delta:

  • Update docker image

error: nc: getaddrinfo: Name or service not known

I got a error when I docker run the image:lasted.

nc: getaddrinfo: Name or service not known
waiting for mysql to start

and i foud the file entrypoint.sh wite the code:
# Wait for the mysql container to be ready
while ! nc -z mysql 3306; do
echo "Waiting for mysql to start";
sleep 1;
done;

below is console dump
nc: getaddrinfo: Name or service not known
Waiting for mysql to start
nc: getaddrinfo: Name or service not known
Waiting for mysql to start
nc: getaddrinfo: Name or service not known
Waiting for mysql to start
nc: getaddrinfo: Name or service not known
Waiting for mysql to start
nc: getaddrinfo: Name or service not known
Waiting for mysql to start
nc: getaddrinfo: Name or service not known
Waiting for mysql to start
nc: getaddrinfo: Name or service not known
Waiting for mysql to start
nc: getaddrinfo: Name or service not known
Waiting for mysql to start
nc: getaddrinfo: Name or service not known
Waiting for mysql to start
nc: getaddrinfo: Name or service not known
Waiting for mysql to start
nc: getaddrinfo: Name or service not known
Waiting for mysql to start
nc: getaddrinfo: Name or service not known
Waiting for mysql to start
nc: getaddrinfo: Name or service not known
Waiting for mysql to start
nc: getaddrinfo: Name or service not known
Waiting for mysql to start
nc: getaddrinfo: Name or service not known
Waiting for mysql to start
nc: getaddrinfo: Name or service not known
Waiting for mysql to start
nc: getaddrinfo: Name or service not known
Waiting for mysql to start
nc: getaddrinfo: Name or service not known

Please update the version

This version of FBCTF is old, And it is missing features like brand customisation, Game backups etc... can you please rework on it?

admin password

may i ask a question:i don't know ‘admin’ password,plz tell me password or how to change password.
i have test :
bash lib.sh
set_password new_password root root fbctf $PWD
but it says :set_password:command not found

what should i do now?help,THX

"Blank Page" after accepting the self-signed cert

single host, running via "docker-compose up". (on a mac, hence the 192.168.99.100 address)
after doing the self-signed cert dance in FF, I get a blank page?

fbctf_1 | /var/www/fbctf
fbctf_1 | Database already created... skipping creation...
fbctf_1 | 2016/05/19 07:16:22 [warn] 1#0: "ssl_stapling" ignored, issuer certificate not found
fbctf_1 | nginx: [warn] "ssl_stapling" ignored, issuer certificate not found
fbctf_1 | 192.168.99.1 - - [19/May/2016:07:18:00 +0000] "GET / HTTP/1.1" 500 5 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:46.0) Gecko/20100101 Firefox/46.0"
fbctf_1 | 2016/05/19 07:18:00 [error] 43#0: *7 open() "/var/www/fbctf/src/favicon.ico" failed (2: No such file or directory), client: 192.168.99.1, server: , request: "GET /favicon.ico HTTP/1.1", host: "192.168.99.100"
fbctf_1 | 192.168.99.1 - - [19/May/2016:07:18:00 +0000] "GET /favicon.ico HTTP/1.1" 404 48 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:46.0) Gecko/20100101 Firefox/46.0"
fbctf_1 | 2016/05/19 07:18:00 [error] 43#0: *7 open() "/var/www/fbctf/src/favicon.ico" failed (2: No such file or directory), client: 192.168.99.1, server: , request: "GET /favicon.ico HTTP/1.1", host: "192.168.99.100"
fbctf_1 | 192.168.99.1 - - [19/May/2016:07:18:00 +0000] "GET /favicon.ico HTTP/1.1" 404 48 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:46.0) Gecko/20100101 Firefox/46.0"

FBCTF 500's under docker swarm

Expected Results

Site up and operational

Actual Results

Site returns 500

Additional Details

root@app:/var/log/hhvm# cat error.log
[Fri Aug 31 20:21:35 2018] [hphp] [54:7f1679bff700:1:000001] [] \nFatal error: Uncaught exception 'AsyncMysqlQueryException' with message 'Error executing AsyncMysql operation: Failed (mysql error: 1146: Table 'ctf2018.sessions' doesn't exist)' in /var/www/fbctf/src/SessionUtils.php:15\nStack trace:\n#0 /var/www/fbctf/src/SessionUtils.php(15): HH\Asio\join()\n#1 /var/www/fbctf/src/controllers/IndexController.php(440): SessionUtils::sessionStart()\n#2 /var/www/fbctf/src/controllers/IndexController.php(509): IndexController->renderMainNav()\n#3 /var/www/fbctf/src/controllers/Controller.php(12): IndexController->genRenderBody()\n#4 /var/www/fbctf/src/Router.php(67): Controller->genRender()\n#5 /var/www/fbctf/src/Router.php(18): Router::genRouteNormal()\n#6 /var/www/fbctf/src/index.php(7): Router::genRoute()\n#7 /var/www/fbctf/src/index.php(19): genInit()\n#8 {main}


# Expected Delta

 - Adjust bootstrap script to validate sql schemas are correct
 - If schema was not validated container dies with exit -1 and logs to stdout the results.

got some problem

image

I run it but when i visit it I got this in log, plz tell me where I did wrong

(feat) Docker-compose.yml should work with docker swarm / k8s.

As a user
I would like to use docker stack deploy to deploy docker-fbctf
So that I can use tools like kubernetes and docker swarm to ensure high availability
And so that I can use traefik to automatically generate certificates via acme
And so that I can use traefik to route traffic as needed

Acceptance criteria

  • Should support traefik via labels
  • Should support replication via swarm
  • Should support latest version of docker-compose.yml (ie 3.4+)
  • Could include adminer
  • Should not need to access service ports or special urls
  • Should work with virtual hosts
  • Could harden SSL/TLS

FBCTF Team Registration not available

I've run docker-compose up and accessed localhost successfully. However I'm not able to register for team. I'm not sure if this is an issue from docker or the fbctf. Which mode is the fbctf being run? I see there are 2 modes, production mode, and dev mode. Is that the reason why I'm unable to register a team? And the countdown is empty with -- dashes. Below is the console dump.

Pulling memcached (memcached:latest)...
latest: Pulling from library/memcached
5c90d4a2d1a8: Pull complete
868898c37c22: Pull complete
19e53c924a16: Pull complete
8554d5ab247d: Pull complete
2d12d8b3edb2: Pull complete
93784575d02d: Pull complete
Digest: sha256:bab03d0db0afd3b2f881e5ea3a5fba7f5352b469dd87010ca1f2ae7dd052d69f
Status: Downloaded newer image for memcached:latest
Pulling mysql (mysql:5.5)...
5.5: Pulling from library/mysql
5c90d4a2d1a8: Already exists
89e2627e9201: Pull complete
76f6983b0fe0: Pull complete
653577605512: Pull complete
65dbff149e62: Pull complete
850c4735e777: Pull complete
1f093c5e8d08: Pull complete
ae14fe87d312: Pull complete
532e9acf2b87: Pull complete
4796e90cab98: Pull complete
4db10e84fc44: Pull complete
Digest: sha256:1844ece1dda21da02de3a64be89f019fd9ac46f703b9113f76b58e5286008192
Status: Downloaded newer image for mysql:5.5
Pulling fbctf (alexgaspar/fbctf:latest)...
latest: Pulling from alexgaspar/fbctf
8387d9ff0016: Pull complete
3b52deaaf0ed: Pull complete
4bd501fad6de: Pull complete
a3ed95caeb02: Pull complete
c974ea7ea85d: Pull complete
e799ba5f61c4: Pull complete
b7038fa53ade: Pull complete
63a25bb69e13: Pull complete
544825b9de5b: Pull complete
44725629daa8: Pull complete
78a65647e13a: Pull complete
45617bc603b3: Pull complete
903b66cfc35b: Pull complete
048325b525fa: Pull complete
7a189cc42eee: Pull complete
b20492b23b1e: Pull complete
c7a3128acca1: Pull complete
50199199c500: Pull complete
0199b465861d: Pull complete
ca4bb3957159: Pull complete
84994f0295bd: Pull complete
cbcd724708f4: Pull complete
aa31f910fb2b: Pull complete
548de1c3b3aa: Pull complete
Digest: sha256:650bfced10664d24f63d1bce1650fd0ac7f0c9734e9ae31bf2622b08119b3eb9
Status: Downloaded newer image for alexgaspar/fbctf:latest
Creating dockerfbctf_mysql_1
Creating dockerfbctf_memcached_1
Creating dockerfbctf_fbctf_1
Attaching to dockerfbctf_memcached_1, dockerfbctf_mysql_1, dockerfbctf_fbctf_1
mysql_1      | Initializing database
mysql_1      | 160727 11:24:53 [Note] /usr/local/mysql/bin/mysqld (mysqld 5.5.50) starting as process 58 ...
mysql_1      | 160727 11:24:53 [Note] /usr/local/mysql/bin/mysqld (mysqld 5.5.50) starting as process 64 ...
mysql_1      |
mysql_1      | PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
mysql_1      | To do so, start the server, then issue the following commands:
mysql_1      |
mysql_1      | /usr/local/mysql/bin/mysqladmin -u root password 'new-password'
mysql_1      | /usr/local/mysql/bin/mysqladmin -u root -h  password 'new-password'
mysql_1      |
mysql_1      | Alternatively you can run:
mysql_1      | /usr/local/mysql/bin/mysql_secure_installation
mysql_1      |
mysql_1      | which will also give you the option of removing the test
mysql_1      | databases and anonymous user created by default.  This is
mysql_1      | strongly recommended for production servers.
mysql_1      |
mysql_1      | See the manual for more instructions.
mysql_1      |
mysql_1      | Please report any problems at http://bugs.mysql.com/
mysql_1      |
mysql_1      | Database initialized
mysql_1      | 160727 11:24:54 [Note] mysqld (mysqld 5.5.50) starting as process 68 ...
mysql_1      | 160727 11:24:54 [Note] Plugin 'FEDERATED' is disabled.
mysql_1      | 160727 11:24:54 InnoDB: The InnoDB memory heap is disabled
mysql_1      | 160727 11:24:54 InnoDB: Mutexes and rw_locks use GCC atomic builtins
mysql_1      | 160727 11:24:54 InnoDB: Compressed tables use zlib 1.2.3
mysql_1      | 160727 11:24:54 InnoDB: Using Linux native AIO
mysql_1      | MySQL init process in progress...
mysql_1      | 160727 11:24:54 InnoDB: Initializing buffer pool, size = 128.0M
mysql_1      | 160727 11:24:54 InnoDB: Completed initialization of buffer pool
mysql_1      | InnoDB: The first specified data file ./ibdata1 did not exist:
mysql_1      | InnoDB: a new database to be created!
mysql_1      | 160727 11:24:54  InnoDB: Setting file ./ibdata1 size to 10 MB
mysql_1      | InnoDB: Database physically writes the file full: wait...
mysql_1      | 160727 11:24:54  InnoDB: Log file ./ib_logfile0 did not exist: new to be created
mysql_1      | InnoDB: Setting log file ./ib_logfile0 size to 5 MB
mysql_1      | InnoDB: Database physically writes the file full: wait...
mysql_1      | 160727 11:24:54  InnoDB: Log file ./ib_logfile1 did not exist: new to be created
mysql_1      | InnoDB: Setting log file ./ib_logfile1 size to 5 MB
mysql_1      | InnoDB: Database physically writes the file full: wait...
mysql_1      | InnoDB: Doublewrite buffer not found: creating new
mysql_1      | InnoDB: Doublewrite buffer created
mysql_1      | InnoDB: 127 rollback segment(s) active.
mysql_1      | InnoDB: Creating foreign key constraint system tables
mysql_1      | InnoDB: Foreign key constraint system tables created
mysql_1      | 160727 11:24:54  InnoDB: Waiting for the background threads to start
mysql_1      | MySQL init process in progress...
mysql_1      | 160727 11:24:55 InnoDB: 5.5.50 started; log sequence number 0
mysql_1      | 160727 11:24:55 [Warning] 'user' entry 'root@317cc6d7cc67' ignored in --skip-name-resolve mode.
mysql_1      | 160727 11:24:55 [Warning] 'user' entry '@317cc6d7cc67' ignored in --skip-name-resolve mode.
mysql_1      | 160727 11:24:55 [Warning] 'proxies_priv' entry '@ root@317cc6d7cc67' ignored in --skip-name-resolve mode.
mysql_1      | 160727 11:24:55 [Note] Event Scheduler: Loaded 0 events
mysql_1      | 160727 11:24:55 [Note] mysqld: ready for connections.
mysql_1      | Version: '5.5.50'  socket: '/tmp/mysql.sock'  port: 0  MySQL Community Server (GPL)
mysql_1      | Warning: Unable to load '/usr/share/zoneinfo/iso3166.tab' as time zone. Skipping it.
mysql_1      | Warning: Unable to load '/usr/share/zoneinfo/leap-seconds.list' as time zone. Skipping it.
fbctf_1      | Generating self-signed certificate...
fbctf_1      | Generating RSA private key, 2048 bit long modulus
fbctf_1      | ...........+++
fbctf_1      | .............................+++
fbctf_1      | e is 65537 (0x10001)
fbctf_1      | writing RSA key
fbctf_1      | Signature ok
fbctf_1      | subject=/C=UK/ST=NRW/L=London/O=My Inc/OU=DevOps/CN=www.example.com/[email protected]
fbctf_1      | Getting Private key
fbctf_1      | Generating DH parameters, 2048 bit long safe prime, generator 2
fbctf_1      | This is going to take a long time
mysql_1      | Warning: Unable to load '/usr/share/zoneinfo/zone.tab' as time zone. Skipping it.
mysql_1      | 160727 11:25:00 [Warning] 'proxies_priv' entry '@ root@317cc6d7cc67' ignored in --skip-name-resolve mode.
mysql_1      | 160727 11:25:00 [Warning] 'proxies_priv' entry '@ root@317cc6d7cc67' ignored in --skip-name-resolve mode.
mysql_1      |
mysql_1      | /usr/local/bin/docker-entrypoint.sh: ignoring /docker-entrypoint-initdb.d/*
mysql_1      |
mysql_1      | 160727 11:25:00 [Note] mysqld: Normal shutdown
mysql_1      |
mysql_1      | 160727 11:25:00 [Note] Event Scheduler: Purging the queue. 0 events
mysql_1      | 160727 11:25:00  InnoDB: Starting shutdown...
mysql_1      | 160727 11:25:01  InnoDB: Shutdown completed; log sequence number 1595675
mysql_1      | 160727 11:25:01 [Note] mysqld: Shutdown complete
mysql_1      |
mysql_1      |
mysql_1      | MySQL init process done. Ready for start up.
mysql_1      |
mysql_1      | 160727 11:25:02 [Note] mysqld (mysqld 5.5.50) starting as process 1 ...
mysql_1      | 160727 11:25:02 [Note] Plugin 'FEDERATED' is disabled.
mysql_1      | 160727 11:25:02 InnoDB: The InnoDB memory heap is disabled
mysql_1      | 160727 11:25:02 InnoDB: Mutexes and rw_locks use GCC atomic builtins
mysql_1      | 160727 11:25:02 InnoDB: Compressed tables use zlib 1.2.3
mysql_1      | 160727 11:25:02 InnoDB: Using Linux native AIO
mysql_1      | 160727 11:25:02 InnoDB: Initializing buffer pool, size = 128.0M
mysql_1      | 160727 11:25:02 InnoDB: Completed initialization of buffer pool
mysql_1      | 160727 11:25:02 InnoDB: highest supported file format is Barracuda.
mysql_1      | 160727 11:25:02  InnoDB: Waiting for the background threads to start
mysql_1      | 160727 11:25:03 InnoDB: 5.5.50 started; log sequence number 1595675
mysql_1      | 160727 11:25:03 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
mysql_1      | 160727 11:25:03 [Note]   - '0.0.0.0' resolves to '0.0.0.0';
mysql_1      | 160727 11:25:03 [Note] Server socket created on IP: '0.0.0.0'.
mysql_1      | 160727 11:25:03 [Warning] 'proxies_priv' entry '@ root@317cc6d7cc67' ignored in --skip-name-resolve mode.
mysql_1      | 160727 11:25:03 [Note] Event Scheduler: Loaded 0 events
mysql_1      | 160727 11:25:03 [Note] mysqld: ready for connections.
mysql_1      | Version: '5.5.50'  socket: '/tmp/mysql.sock'  port: 3306  MySQL Community Server (GPL)
fbctf_1      | .....+..............................................................................+.......+............................................+......+....................................................................................................................................................................................................................................................+......................................................................................................................................................................................................................................+...................................................+.+....................................................................................................+............................................................................................................................................................................................................+............................+..........................+............................................+....................................................................................................................................................................................................+.............................................................................+..............................................................................................................................................................+..............+.....................................................................................................+...............................................................+........................................................................................................................................+.....................................................................................................................................................................................................................+..........................................................................................................................................................................................+.............+..........................................................................+........................................................................................................................+.................................................................................+............................................................................................................................................................................................................................................................................................................................................................................+...................................+.................................................................................................................................+...................................................................................................................................................................................................................+..............................+.............................................................................................................................................................................................................................................................................................................................................................................................................................................................................+.......................................................................................................+..................................................................................................................................................................+.................................................................................................................................................................+...........+..........+.....................................................................................................................+......................................................................+.........++*++*
fbctf_1      | [+] Creating DB - fbctf
fbctf_1      | ERROR 1007 (HY000) at line 1: Can't create database 'fbctf'; database exists
fbctf_1      | [+] Importing schema...
fbctf_1      | [+] Importing countries...
fbctf_1      | [+] Importing logos...
fbctf_1      | [+] Creating user...
fbctf_1      | ERROR 1227 (42000) at line 1: Access denied; you need (at least one of) the CREATE USER privilege(s) for this operation
fbctf_1      | ERROR 1044 (42000) at line 1: Access denied for user 'fbctf'@'%' to database 'fbctf'
fbctf_1      | ERROR 1227 (42000) at line 1: Access denied; you need (at least one of) the RELOAD privilege(s) for this operation
fbctf_1      | [+] DB Connection file
fbctf_1      | [+] Adding default admin user
fbctf_1      | [+] The password for admin is: d618a8177a1dc5b4dd3ee35bba3812e9
fbctf_1      | 2016/07/27 11:25:46 [warn] 1#0: "ssl_stapling" ignored, issuer certificate not found
fbctf_1      | nginx: [warn] "ssl_stapling" ignored, issuer certificate not found

I've tried this process a couple of times, with no success.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.