{"id":19413604,"url":"https://github.com/wisehackermonkey/business_card_puzzle","last_synced_at":"2025-10-04T02:10:37.229Z","repository":{"id":132670116,"uuid":"330258738","full_name":"wisehackermonkey/business_card_puzzle","owner":"wisehackermonkey","description":"simple website that checks the solution to my business card puzzle","archived":false,"fork":false,"pushed_at":"2021-10-19T16:51:50.000Z","size":6452,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-25T02:45:44.771Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wisehackermonkey.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-01-16T21:11:22.000Z","updated_at":"2021-10-19T16:51:52.000Z","dependencies_parsed_at":"2023-12-03T03:00:23.588Z","dependency_job_id":null,"html_url":"https://github.com/wisehackermonkey/business_card_puzzle","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/wisehackermonkey/business_card_puzzle","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wisehackermonkey%2Fbusiness_card_puzzle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wisehackermonkey%2Fbusiness_card_puzzle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wisehackermonkey%2Fbusiness_card_puzzle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wisehackermonkey%2Fbusiness_card_puzzle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wisehackermonkey","download_url":"https://codeload.github.com/wisehackermonkey/business_card_puzzle/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wisehackermonkey%2Fbusiness_card_puzzle/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264169175,"owners_count":23567265,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-10T12:34:05.366Z","updated_at":"2025-10-04T02:10:32.210Z","avatar_url":"https://github.com/wisehackermonkey.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# business_card_puzzle\n simple website that checks the solution to my business card puzzle\n\n\n\n# change directory:\n```bash\ncd frontend\n```\n\n# install dependencies:\n```bash\nnpm install\n```\n# run the app:\n(linux)\n```bash\nSET DEBUG=frontend:* \u0026 npm start\n```\n(windows Powershell)\n```bash\n$env:DEBUG='frontend:*'; npm start\n```\n\n# how to run tests\n```bash\nnpm run test\n```\n\n# docker \n### build locally\n```bash\ndocker build -t wisehackermonkey/businesscardpuzzle .\ndocker login\ndocker push wisehackermonkey/businesscardpuzzle:latest\n```\n\n### build locally (docker-compose)\n```bash\ncd /path/to/project/dir/\ndocker-compose -f docker-compose.local.yml build\ndocker-compose -f docker-compose.local.yml up\n```\n\n# docker publish\n### Docker push image docker hub\n```bash\ndocker login\ndocker push wisehackermonkey/businesscardpuzzle:latest\n```\n\n## setup\n#### create a file called .env \n##### with the contents Similar to this NOTE: flags must be unique\n\u003e touch .env \n```text\nFLAG1=1234567890\nFLAG2=0987654321\nFLAG3=1111111111\nPORT=3000\n``` \n## run \n```bash\ndocker-compose --env-file .\\.env build\n\ndocker-compose  up\nOR \ndocker-compose --env-file .\\.env up\n```\n## deploy (docker-compose)\n```bash\ngit clone https://github.com/wisehackermonkey/business_card_puzzle.git\ncd business_card_puzzle/\ntouch .env\n# MODIFY THE FLAG values to match your desired values\necho \"FLAG1=123456789\nFLAG2=999999999\nFLAG3=111111111\nPORT=3000\"\u003e\u003e.env\n```\n# OPTIONS\n\n### 1) use the envirmental variable file you just created\n```bash\ndocker-compose -f docker-compose.local.yml --env-file .\\.env up\n```\n\n### 2) run with docker image prebuild\n```bash\ndocker-compose  --env-file .\\.env up\n```\n# 3)\n```bash\ndocker-compose  up -d\n```\n## deploy (just docker)\n###### link about how env files work with docker [Environment variables in Compose | Docker Documentation](https://docs.docker.com/compose/environment-variables/) \n```bash\ndocker pull wisehackermonkey/businesscardpuzzle:latest\ntouch .env\n\necho \"FLAG1=123456789\nFLAG2=999999999\nFLAG3=111111111\nPORT=3000\"\u003e\u003e.env\ndocker run -it -p 3000:3000 --env-file ./.env wisehackermonkey/businesscardpuzzle:latest\n```\n\n# Logging the application\n## try 1\n## [Centralize Your Docker Logging With Syslog ](https://medium.com/better-programming/docker-centralized-logging-with-syslog-97b9c147bd30)\n```bash\nsudo apt install rsyslog rsyslog-doc\ncode /etc/rsyslog.conf\n\nadded\n$ModLoad imtcp $InputTCPServerRun 514\n$imjournalRatelimitInterval 0\n$imjournalRatelimitBurst 0\ncode /etc/systemd/journald.conf\n\nmkdir -p /root/logs\ncode /etc/rsyslog.d/docker_daemon.conf\n\"\n$template DockerLogs, \"/root/logs/daemon.log\"\nif $programname startswith 'dockerd' then -?DockerLogs\n\u0026 stop\n\"\ncode /etc/rsyslog.d/docker_container.conf\n\"\nDockerContainerLogs,\"/root/logs/%hostname%_%syslogtag:R,ERE,1,ZERO:.*container_name/([^\\[]+)--end%.log\"\nif $syslogtag contains 'container_name'  then -?DockerContainerLogs\n\u0026 stop\n\"\n```\n## try 2\n### \n```bash\ngit clone https://github.com/m0wfo/le-docker.git\ncd le-docker/\ndocker build -t le/example .\ndocker run -i -t le/example /bin/bash\n\n```\n\n## try 3\n### docker file\n```bash\nFROM ubuntu\nRUN apt update \u0026\u0026 apt install rsyslog -y\nRUN echo '$ModLoad imudp \\n\\\n$UDPServerRun 514 \\n\\\n$ModLoad imtcp \\n\\\n$InputTCPServerRun 514 \\n\\\n$template RemoteStore, \"/var/log/remote/%$year%/%$Month%/%$Day%/%$Hour%.log\" \\n\\\n:source, !isequal, \"localhost\" -?RemoteStore \\n\\\n:source, isequal, \"last\" ~ ' \u003e /etc/rsyslog.conf\nENTRYPOINT [\"rsyslogd\", \"-n\"]\n```\n### run\n```bash\ndocker build -t mysyslog .\n\ndocker run  --cap-add SYSLOG --restart always -v /var/log:/var/log -p 514:514 -p 514:514/udp --name rsyslog mysyslog\n```\n#### \n```bash\n--cap-add SYSLOG --\u003e Allow container to perform privileged syslog(2) operations.\n--restart always --\u003e Restart container regardless of the exit status\n-v /var/log:/var/log --\u003e Mount host /var/log directory in container /var/log directory \n-p 514:514         --\u003e Bind Host TCP 514 port to contaainer TCP 514 port \n-p 514:514/udp     --\u003e Bind Host UDP 514 port to contaainer UDP 514 port\n```\n\n#### add to docker compose\n```bash\nsyslogserver: \n    image: mysyslog \n    hostname: syslog \n    container_name: syslog \n    restart: always\n    volumes: \n      - \"/var/log:/var/log\" \n    ports: \n      - 514:514\n      - 514:514/udp\n    cap_add:\n      - SYSLOG\n```\n### run\n```bash\ndocker-compose down\ndocker-compose build\ndocker-compose up\ndocker run --log-driver syslog --log-opt syslog-address=tcp://localhost:514 alpine echo hello world\n\n```\n### installing ui \n```bash\ndocker run -it -e SYSLOG_USERNAME=admin -e SYSLOG_PASSWORD=1234 -p 8080:80 -p 514:514/udp pbertera/syslogserver\n```\n### adding log driver to may conainer\n```bash\nversion: '3.4'\n\nservices:\n  businesscardpuzzle:\n\u003c--snip--\u003e\n    logging:\n      driver: \"syslog\"\n      options:\n        syslog-address: 'tcp://localhost:514'\n\n  syslogserver:\n      restart: always\n      env_file: \n        - .env\n      ports:\n          - '7331:80'\n          - '514:514/udp'\n      image: pbertera/syslogserver\n```\n#### \n```bash\ndocker-compose down\ndocker-compose up\n code docker-compose.logs.yml\n```\n#### \n```bash\nversion: '3.4'\n\nservices:\n  syslogserver:\n      restart: always\n      env_file: \n        - .env\n      ports:\n          - '8080:80'\n          - '514:514/udp'\n      image: pbertera/syslogserver\n```\n##### \n```bash\ndocker-compose --file docker-compose.logs.yml up -d\ndocker-compose up\n```\n## try 4\n####\n```bash\ndocker run -it \\\n  --name=logarr \\\n  --restart=on-failure \\\n  -v ${PWD}/config:/config \\\n  -v ${PWD}/logs:/var/log/logarrlogs \\\n  -e TZ=America/Los_Angeles \\\n  -p 6666:80 \\\n  monitorr/logarr\n```\n## try 5\n###\n```bash\ndocker run --detach --volume=/var/run/docker.sock:/var/run/docker.sock -p 8080:8080 amir20/dozzle\n```\n\n# Rate Limiting\n### made possible with : [express-rate-limit - npm](https://www.npmjs.com/package/express-rate-limit) which was super easy!!!\n### how to test ratelimiting  \n#### install \"hey\" [rakyll/hey: HTTP load generator, ApacheBench (ab) replacement, formerly known as rakyll/boom](https://github.com/rakyll/hey)\n```bash\n### on server\ndocker-compose -f docker-compose.local.yml up\n### on another computer\nhey -n 1000 -c 100 http://localhost:3000/check/?flag1=1337\u0026flag2=1337\u0026flag3=1337\n\nFor my website\nhey -n 1000 -c 100 http://www.orancollins.com:3000/check/?flag1=1337\u0026flag2=1337\u0026flag3=1337\nwith url encoding\nhey -n 1000 -c 100   http://www.orancollins.com:3000/check/?flag1=1337%26flag2=1337%26flag=1337\n```\n### results it works! 900 out of 1000 went to 'sorry you have been ratelimited'\n![](Screenshot_1.png)\n### Update: turns out 100 requests per minute was way too lenent! Now its 5 per minute, my friend tried it and he was totally able to bruteforce it really easily.\n ![](assets/2021-02-14-14-17-48.png)\n\n----------------\n\n# TODO\n- [x] add audio when you win via webaudio api\n- [ ] add email me when someone wins\n- [x] fail sound \n- [] sound toggle use input:checkbox\n- [x] fix order check issue\n- [] add logging","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwisehackermonkey%2Fbusiness_card_puzzle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwisehackermonkey%2Fbusiness_card_puzzle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwisehackermonkey%2Fbusiness_card_puzzle/lists"}