├── README.md ├── challenges ├── EzGrammar │ ├── .gitignore │ ├── .ruby-version │ ├── Gemfile │ ├── Gemfile.lock │ ├── README.md │ ├── Rakefile │ ├── app │ │ ├── .DS_Store │ │ ├── assets │ │ │ ├── .DS_Store │ │ │ ├── config │ │ │ │ └── manifest.js │ │ │ ├── images │ │ │ │ └── .keep │ │ │ ├── javascripts │ │ │ │ ├── application.js │ │ │ │ ├── cable.js │ │ │ │ ├── channels │ │ │ │ │ └── .keep │ │ │ │ ├── check.coffee │ │ │ │ ├── errors.coffee │ │ │ │ ├── resumes.coffee │ │ │ │ ├── sessions.coffee │ │ │ │ └── users.coffee │ │ │ └── stylesheets │ │ │ │ ├── application.scss │ │ │ │ ├── check.scss │ │ │ │ ├── errors.scss │ │ │ │ ├── resumes.scss │ │ │ │ ├── sessions.scss │ │ │ │ └── users.scss │ │ ├── channels │ │ │ └── application_cable │ │ │ │ ├── channel.rb │ │ │ │ └── connection.rb │ │ ├── controllers │ │ │ ├── application_controller.rb │ │ │ ├── check_controller.rb │ │ │ ├── concerns │ │ │ │ └── .keep │ │ │ ├── errors_controller.rb │ │ │ ├── resumes_controller.rb │ │ │ ├── sessions_controller.rb │ │ │ └── users_controller.rb │ │ ├── helpers │ │ │ ├── application_helper.rb │ │ │ ├── check_helper.rb │ │ │ ├── errors_helper.rb │ │ │ ├── resumes_helper.rb │ │ │ ├── sessions_helper.rb │ │ │ └── users_helper.rb │ │ ├── jobs │ │ │ └── application_job.rb │ │ ├── mailers │ │ │ └── application_mailer.rb │ │ ├── models │ │ │ ├── application_record.rb │ │ │ ├── concerns │ │ │ │ └── .keep │ │ │ ├── resume.rb │ │ │ ├── secretttt.rb │ │ │ └── user.rb │ │ ├── uploaders │ │ │ └── attachment_uploader.rb │ │ └── views │ │ │ ├── .DS_Store │ │ │ ├── check │ │ │ ├── create.html.erb │ │ │ └── index.html.erb │ │ │ ├── errors │ │ │ ├── file_not_found.html.erb │ │ │ ├── internal_server_error.html.erb │ │ │ └── unprocessable.html.erb │ │ │ ├── layouts │ │ │ ├── application.html.erb │ │ │ ├── mailer.html.erb │ │ │ └── mailer.text.erb │ │ │ ├── resumes │ │ │ ├── index.html.erb │ │ │ └── new.html.erb │ │ │ ├── sessions │ │ │ └── new.html.erb │ │ │ └── users │ │ │ ├── index.html.erb │ │ │ └── new.html.erb │ ├── bin │ │ ├── bundle │ │ ├── rails │ │ ├── rake │ │ ├── setup │ │ ├── spring │ │ ├── update │ │ └── yarn │ ├── chall_config.sh │ ├── config.ru │ ├── config │ │ ├── application.rb │ │ ├── boot.rb │ │ ├── cable.yml │ │ ├── credentials.yml.enc │ │ ├── database.yml │ │ ├── environment.rb │ │ ├── environments │ │ │ ├── development.rb │ │ │ ├── production.rb │ │ │ └── test.rb │ │ ├── initializers │ │ │ ├── application_controller_renderer.rb │ │ │ ├── assets.rb │ │ │ ├── backtrace_silencers.rb │ │ │ ├── content_security_policy.rb │ │ │ ├── cookies_serializer.rb │ │ │ ├── filter_parameter_logging.rb │ │ │ ├── inflections.rb │ │ │ ├── mime_types.rb │ │ │ └── wrap_parameters.rb │ │ ├── locales │ │ │ └── en.yml │ │ ├── puma.rb │ │ ├── routes.rb │ │ ├── spring.rb │ │ └── storage.yml │ ├── db │ │ ├── migrate │ │ │ ├── 20180806043352_create_users.rb │ │ │ ├── 20180813093018_create_resumes.rb │ │ │ ├── 20180815082434_add_user_to_resume.rb │ │ │ ├── 20180815082519_add_hash_to_resume.rb │ │ │ ├── 20180815091226_remove_hash_from_resume.rb │ │ │ ├── 20180815091308_add_hashfile_to_resume.rb │ │ │ └── 20180820035221_create_secretttts.rb │ │ ├── schema.rb │ │ └── seeds.rb │ ├── lib │ │ ├── assets │ │ │ └── .keep │ │ └── tasks │ │ │ └── .keep │ ├── log │ │ └── .keep │ ├── package.json │ ├── public │ │ ├── .DS_Store │ │ ├── 404.html │ │ ├── 422.html │ │ ├── 500.html │ │ ├── apple-touch-icon-precomposed.png │ │ ├── apple-touch-icon.png │ │ ├── favicon.ico │ │ ├── robots.txt │ │ └── uploads │ │ │ └── .DS_Store │ ├── test │ │ ├── application_system_test_case.rb │ │ ├── controllers │ │ │ ├── .keep │ │ │ ├── check_controller_test.rb │ │ │ ├── errors_controller_test.rb │ │ │ ├── resumes_controller_test.rb │ │ │ ├── sessions_controller_test.rb │ │ │ └── users_controller_test.rb │ │ ├── fixtures │ │ │ ├── .keep │ │ │ ├── files │ │ │ │ └── .keep │ │ │ ├── resumes.yml │ │ │ ├── secretttts.yml │ │ │ └── users.yml │ │ ├── helpers │ │ │ └── .keep │ │ ├── integration │ │ │ └── .keep │ │ ├── mailers │ │ │ └── .keep │ │ ├── models │ │ │ ├── .keep │ │ │ ├── resume_test.rb │ │ │ ├── secretttt_test.rb │ │ │ └── user_test.rb │ │ ├── system │ │ │ └── .keep │ │ └── test_helper.rb │ ├── tmp │ │ └── .keep │ └── vendor │ │ └── .keep ├── FreeToFlag │ ├── chall_config.sh │ ├── docker-compose.yml │ ├── html │ │ ├── index.php │ │ └── secret.php │ └── php │ │ ├── Dockerfile │ │ └── php.ini ├── HackEmAll │ ├── .DS_Store │ ├── chall_config.sh │ ├── docker-compose.yml │ ├── html │ │ ├── .DS_Store │ │ ├── assets │ │ │ ├── Flag.png │ │ │ ├── Meow.png │ │ │ ├── Pikachu.png │ │ │ ├── Pippi.png │ │ │ ├── Pokedex_Source.png │ │ │ ├── masterball.jpg │ │ │ ├── nes.min.css │ │ │ └── pokeball.jpg │ │ ├── get_more_ball.php │ │ ├── index.php │ │ └── secret.php │ └── php │ │ ├── Dockerfile │ │ └── php.ini ├── IQTest │ ├── chall_config.sh │ ├── docker-compose.yml │ ├── html │ │ └── index.php │ └── php │ │ ├── Dockerfile │ │ └── php.ini ├── LonelyBoy │ ├── chall_config.sh │ ├── database │ │ └── lonelyboy.sql │ ├── docker-compose.yml │ ├── lonelyboy.sql │ ├── mysql │ │ ├── Dockerfile │ │ ├── lonelyboy.sql │ │ └── my.cnf │ └── php │ │ ├── 000-default.conf │ │ ├── Dockerfile │ │ ├── crontab │ │ ├── goodjobnowgetyoursfl4g │ │ ├── interfaces │ │ ├── phantomjs │ │ ├── ChangeLog │ │ ├── LICENSE.BSD │ │ ├── README.md │ │ ├── bin │ │ │ └── phantomjs │ │ ├── examples │ │ │ ├── arguments.js │ │ │ ├── child_process-examples.js │ │ │ ├── colorwheel.js │ │ │ ├── countdown.js │ │ │ ├── detectsniff.js │ │ │ ├── echoToFile.js │ │ │ ├── features.js │ │ │ ├── fibo.js │ │ │ ├── hello.js │ │ │ ├── injectme.js │ │ │ ├── loadspeed.js │ │ │ ├── loadurlwithoutcss.js │ │ │ ├── modernizr.js │ │ │ ├── module.js │ │ │ ├── netlog.js │ │ │ ├── netsniff.js │ │ │ ├── openurlwithproxy.js │ │ │ ├── outputEncoding.js │ │ │ ├── page_events.js │ │ │ ├── pagecallback.js │ │ │ ├── phantomwebintro.js │ │ │ ├── post.js │ │ │ ├── postjson.js │ │ │ ├── postserver.js │ │ │ ├── printenv.js │ │ │ ├── printheaderfooter.js │ │ │ ├── printmargins.js │ │ │ ├── rasterize.js │ │ │ ├── render_multi_url.js │ │ │ ├── responsive-screenshot.js │ │ │ ├── run-jasmine.js │ │ │ ├── run-jasmine2.js │ │ │ ├── run-qunit.js │ │ │ ├── scandir.js │ │ │ ├── server.js │ │ │ ├── serverkeepalive.js │ │ │ ├── simpleserver.js │ │ │ ├── sleepsort.js │ │ │ ├── stdin-stdout-stderr.js │ │ │ ├── universe.js │ │ │ ├── unrandomize.js │ │ │ ├── useragent.js │ │ │ ├── version.js │ │ │ ├── waitfor.js │ │ │ └── walk_through_frames.js │ │ └── third-party.txt │ │ ├── php7.1-fpm.conf │ │ ├── ports.conf │ │ ├── resolv.conf │ │ ├── shell.sh │ │ └── source │ │ └── www │ │ ├── cron.php │ │ ├── cron350.sh │ │ ├── crondel.sh │ │ ├── html │ │ ├── assets │ │ │ ├── css │ │ │ │ ├── bootstrap-theme.css │ │ │ │ ├── bootstrap-theme.css.map │ │ │ │ ├── bootstrap-theme.min.css │ │ │ │ ├── bootstrap-theme.min.css.map │ │ │ │ ├── bootstrap.css │ │ │ │ ├── bootstrap.css.map │ │ │ │ ├── bootstrap.min.css │ │ │ │ ├── bootstrap.min.css.map │ │ │ │ └── index.php │ │ │ ├── fonts │ │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ │ ├── glyphicons-halflings-regular.svg │ │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ │ ├── glyphicons-halflings-regular.woff │ │ │ │ ├── glyphicons-halflings-regular.woff2 │ │ │ │ └── index.php │ │ │ ├── index.php │ │ │ ├── jquery-1.11.3-jquery.min.js │ │ │ └── js │ │ │ │ ├── bootstrap.js │ │ │ │ ├── bootstrap.min.js │ │ │ │ ├── index.php │ │ │ │ └── npm.js │ │ ├── dbconnect.php │ │ ├── files.php │ │ ├── home.php │ │ ├── index.php │ │ ├── logout.php │ │ ├── register.php │ │ ├── send.php │ │ ├── style.css │ │ ├── upload.php │ │ └── upload │ │ │ └── index.php │ │ ├── lonelyboy.sql │ │ └── something.js ├── MaplStory │ ├── chall_config.sh │ ├── docker-compose.yml │ ├── php │ │ ├── Dockerfile │ │ ├── configuration.sh │ │ └── src │ │ │ └── www │ │ │ └── public │ │ │ ├── admin.php │ │ │ ├── assets │ │ │ ├── background.jpg │ │ │ ├── css │ │ │ │ ├── bootstrap-theme.css │ │ │ │ ├── bootstrap-theme.css.map │ │ │ │ ├── bootstrap-theme.min.css │ │ │ │ ├── bootstrap-theme.min.css.map │ │ │ │ ├── bootstrap.css │ │ │ │ ├── bootstrap.css.map │ │ │ │ ├── bootstrap.min.css │ │ │ │ ├── bootstrap.min.css.map │ │ │ │ ├── index.php │ │ │ │ └── style.css │ │ │ ├── fonts │ │ │ │ ├── glyphicons-halflings-regular.woff │ │ │ │ ├── index.php │ │ │ │ ├── main.woff │ │ │ │ ├── maple.woff │ │ │ │ ├── maple_character_name.woff │ │ │ │ └── menu.woff │ │ │ ├── freemarket.mp3 │ │ │ ├── image │ │ │ │ ├── chubby.gif │ │ │ │ ├── default.png │ │ │ │ ├── logo.png │ │ │ │ ├── npc_1.png │ │ │ │ ├── npc_2.gif │ │ │ │ ├── npc_3.gif │ │ │ │ ├── npc_4.gif │ │ │ │ ├── npc_5.png │ │ │ │ ├── pet │ │ │ │ │ ├── babydragon.png │ │ │ │ │ ├── blackpig.png │ │ │ │ │ ├── brownkitty.png │ │ │ │ │ ├── brownpuppy.png │ │ │ │ │ ├── goldenpig.png │ │ │ │ │ ├── husky.png │ │ │ │ │ ├── jrbalrog.png │ │ │ │ │ ├── jrreaper.png │ │ │ │ │ ├── minikargo.png │ │ │ │ │ ├── panda.png │ │ │ │ │ ├── penguin.png │ │ │ │ │ └── rudolph.png │ │ │ │ ├── spearman.png │ │ │ │ ├── thief.png │ │ │ │ └── wrong.jpg │ │ │ ├── index.php │ │ │ ├── jquery-1.11.3-jquery.min.js │ │ │ ├── js │ │ │ │ ├── bootstrap.js │ │ │ │ ├── bootstrap.min.js │ │ │ │ ├── index.php │ │ │ │ └── npm.js │ │ │ ├── maplcursor.cur │ │ │ └── maple_story.swf │ │ │ ├── character.php │ │ │ ├── dbconnect.php │ │ │ ├── die.php │ │ │ ├── game.php │ │ │ ├── home.php │ │ │ ├── index.php │ │ │ ├── login.php │ │ │ ├── logout.php │ │ │ ├── mapl_library.php │ │ │ ├── register.php │ │ │ ├── setting.php │ │ │ ├── style.css │ │ │ └── upload │ │ │ ├── 75834e75aa2c2e500a84e4cdc10986fc │ │ │ ├── babydragon.png │ │ │ ├── blackpig.png │ │ │ ├── brownkitty.png │ │ │ ├── brownpuppy.png │ │ │ ├── command.txt │ │ │ ├── goldenpig.png │ │ │ ├── husky.png │ │ │ ├── index.php │ │ │ ├── jrbalrog.png │ │ │ ├── jrreaper.png │ │ │ ├── minikargo.png │ │ │ ├── penguin.png │ │ │ └── rudolph.png │ │ │ └── index.php │ └── sql_dump │ │ ├── database.sql │ │ └── run.sh ├── NumberMakeup │ ├── chall_config.sh │ ├── docker-compose.yml │ ├── html │ │ ├── assets │ │ │ ├── galaxy.jpg │ │ │ ├── index.php │ │ │ ├── jquery.min.js │ │ │ ├── tsu_effect.css │ │ │ └── tsu_layout.css │ │ ├── index.php │ │ ├── product.php │ │ └── report.php │ └── php │ │ ├── Dockerfile │ │ └── php.ini ├── OmegaSector │ ├── chall_config.sh │ ├── docker-compose.yml │ ├── html │ │ ├── alien_message │ │ │ └── index.php │ │ ├── alien_sector.php │ │ ├── assets │ │ │ ├── alien.woff │ │ │ ├── alien_sector.jpg │ │ │ ├── background.jpg │ │ │ ├── index.php │ │ │ ├── map.jpg │ │ │ ├── maplcursor.cur │ │ │ ├── maple.woff │ │ │ ├── mesoranger.png │ │ │ ├── omega_sector.css │ │ │ ├── omega_sector.jpg │ │ │ ├── omegasector.mp3 │ │ │ ├── taxi.png │ │ │ ├── tsu_effect.css │ │ │ └── wrong.jpg │ │ ├── human_message │ │ │ └── index.php │ │ ├── index.php │ │ ├── omega_sector.php │ │ └── secret.php │ └── php │ │ ├── Dockerfile │ │ └── php.ini ├── Pentest │ ├── chall_config.sh │ ├── docker-compose.yml │ ├── htaccess │ │ └── htaccess.txt │ ├── html │ │ ├── .DS_Store │ │ ├── index.php │ │ └── upload │ │ │ ├── .htaccess │ │ │ ├── flag.php │ │ │ └── tientri │ │ │ ├── 1.txt │ │ │ ├── 2.txt │ │ │ ├── 3.txt │ │ │ ├── 4.txt │ │ │ ├── 5.txt │ │ │ └── backdoor.php │ └── php │ │ ├── Dockerfile │ │ └── php.ini ├── PhpLimitRevenge2 │ ├── .DS_Store │ ├── chall_config.sh │ ├── docker-compose.yml │ ├── flag │ │ └── well_play_take_fl4g_here.php │ ├── html │ │ ├── .DS_Store │ │ ├── index.php │ │ └── well_play_but_flag_not_here.php │ └── php │ │ ├── Dockerfile │ │ └── php.ini ├── SQLiNinjaClass │ ├── chall_config.sh │ ├── docker-compose.yml │ ├── sql_dump │ │ ├── database.sql │ │ └── run.sh │ └── src │ │ ├── background.jpg │ │ ├── dbconnect.php │ │ └── index.php ├── SimpleMessage │ ├── chall_config.sh │ ├── docker-compose.yml │ ├── htaccess │ │ └── htaccess.txt │ ├── html │ │ ├── assets │ │ │ ├── .htaccess │ │ │ ├── jquery-3.4.1.min.js │ │ │ └── tsu.css │ │ ├── clientinfo.php │ │ ├── contact.php │ │ ├── index.php │ │ ├── message │ │ │ └── index.php │ │ └── serverinfo.php │ └── php │ │ ├── Dockerfile │ │ └── php.ini ├── TSULOTT │ ├── chall_config.sh │ ├── docker-compose.yml │ ├── html │ │ ├── index.php │ │ ├── money.jpg │ │ └── secret.php │ └── php │ │ ├── Dockerfile │ │ └── php.ini ├── TSULOTT2 │ ├── .DS_Store │ ├── chall_config.sh │ ├── docker-compose.yml │ ├── python │ │ ├── Dockerfile │ │ └── requirements.txt │ └── src │ │ ├── .DS_Store │ │ ├── app.py │ │ ├── fl4gggg.txt │ │ ├── secret_key.py │ │ ├── static │ │ ├── background.jpg │ │ ├── flag.png │ │ ├── flower.png │ │ ├── jquery.min.js │ │ ├── source.png │ │ ├── tsu.png │ │ ├── tsu_effect.css │ │ ├── tsu_ui.css │ │ └── wth.mp4 │ │ └── templates │ │ ├── error.html │ │ ├── index.html │ │ ├── lott.html │ │ ├── market.html │ │ └── ticket.html ├── TheProphet │ ├── chall_config.sh │ ├── docker-compose.yml │ ├── python │ │ ├── Dockerfile │ │ └── requirements.txt │ └── src │ │ ├── app.py │ │ ├── oracle │ │ ├── 1.txt │ │ ├── 2.txt │ │ ├── 3.txt │ │ ├── 4.txt │ │ └── 5.txt │ │ ├── static │ │ └── trandan.png │ │ └── templates │ │ ├── file.html │ │ └── index.html └── TooManyCrypto │ ├── chall_config.sh │ ├── docker-compose.yml │ ├── html │ ├── css │ │ ├── animate.css │ │ ├── bootstrap.min.css │ │ ├── ionicons.min.css │ │ ├── jquery.fancybox.css │ │ ├── main.css │ │ ├── owl.carousel.css │ │ ├── owl.theme.css │ │ ├── responsive.css │ │ └── slider.css │ ├── decrypt.php │ ├── encrypt.php │ ├── fonts │ │ ├── ionicons.eot │ │ ├── ionicons.svg │ │ ├── ionicons.ttf │ │ └── ionicons.woff │ ├── images │ │ ├── baka.gif │ │ ├── em.png │ │ ├── icons │ │ │ ├── close.png │ │ │ ├── i_next.png │ │ │ ├── i_prev.png │ │ │ ├── left.png │ │ │ ├── map-marker.png │ │ │ ├── next.png │ │ │ ├── prev.png │ │ │ ├── quotes.png │ │ │ └── right.png │ │ ├── logo.png │ │ ├── slider.jpg │ │ └── wrongway.jpg │ ├── index.php │ ├── js │ │ ├── bootstrap.min.js │ │ ├── jquery.fancybox.js │ │ ├── jquery.min.js │ │ ├── main.js │ │ ├── owl.carousel.min.js │ │ ├── slider.js │ │ ├── vendor │ │ │ └── modernizr-2.6.2.min.js │ │ └── wow.min.js │ ├── less │ │ ├── main.less │ │ └── responsive.less │ └── secret.php │ └── php │ ├── Dockerfile │ └── php.ini └── solutions ├── freetoflag.txt ├── hackemall.txt ├── iqtest.txt ├── lonelyboy.txt ├── maplstory.txt ├── numbermakeup.txt ├── omegasector.txt ├── pentest.txt ├── phplimitrevenge2.txt ├── securesystem.txt ├── simplemessage.txt ├── sqlininjaclass.txt ├── theprophet.txt ├── toomanycrypto.txt ├── tsulott.txt └── tsulott2.txt /challenges/EzGrammar/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files for more about ignoring files. 2 | # 3 | # If you find yourself ignoring temporary files generated by your text editor 4 | # or operating system, you probably want to add a global ignore instead: 5 | # git config --global core.excludesfile '~/.gitignore_global' 6 | 7 | # Ignore bundler config. 8 | /.bundle 9 | 10 | # Ignore all logfiles and tempfiles. 11 | /log/* 12 | /tmp/* 13 | !/log/.keep 14 | !/tmp/.keep 15 | 16 | # Ignore uploaded files in development 17 | /storage/* 18 | 19 | /node_modules 20 | /yarn-error.log 21 | 22 | /public/assets 23 | .byebug_history 24 | 25 | # Ignore master key for decrypting credentials and more. 26 | /config/master.key 27 | -------------------------------------------------------------------------------- /challenges/EzGrammar/.ruby-version: -------------------------------------------------------------------------------- 1 | 2.5.1 -------------------------------------------------------------------------------- /challenges/EzGrammar/README.md: -------------------------------------------------------------------------------- 1 | # README 2 | 3 | This README would normally document whatever steps are necessary to get the 4 | application up and running. 5 | 6 | Things you may want to cover: 7 | 8 | * Ruby version 9 | 10 | * System dependencies 11 | 12 | * Configuration 13 | 14 | * Database creation 15 | 16 | * Database initialization 17 | 18 | * How to run the test suite 19 | 20 | * Services (job queues, cache servers, search engines, etc.) 21 | 22 | * Deployment instructions 23 | 24 | * ... 25 | -------------------------------------------------------------------------------- /challenges/EzGrammar/Rakefile: -------------------------------------------------------------------------------- 1 | # Add your own tasks in files placed in lib/tasks ending in .rake, 2 | # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. 3 | 4 | require_relative 'config/application' 5 | 6 | Rails.application.load_tasks 7 | -------------------------------------------------------------------------------- /challenges/EzGrammar/app/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/EzGrammar/app/.DS_Store -------------------------------------------------------------------------------- /challenges/EzGrammar/app/assets/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/EzGrammar/app/assets/.DS_Store -------------------------------------------------------------------------------- /challenges/EzGrammar/app/assets/config/manifest.js: -------------------------------------------------------------------------------- 1 | //= link_tree ../images 2 | //= link_directory ../javascripts .js 3 | //= link_directory ../stylesheets .css 4 | -------------------------------------------------------------------------------- /challenges/EzGrammar/app/assets/images/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/EzGrammar/app/assets/images/.keep -------------------------------------------------------------------------------- /challenges/EzGrammar/app/assets/javascripts/application.js: -------------------------------------------------------------------------------- 1 | // This is a manifest file that'll be compiled into application.js, which will include all the files 2 | // listed below. 3 | // 4 | // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, or any plugin's 5 | // vendor/assets/javascripts directory can be referenced here using a relative path. 6 | // 7 | // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the 8 | // compiled file. JavaScript code in this file should be added after the last require_* statement. 9 | // 10 | // Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details 11 | // about supported directives. 12 | // 13 | //= require rails-ujs 14 | //= require activestorage 15 | //= require turbolinks 16 | //= require_tree . 17 | //= require jquery 18 | //= require bootstrap-sprockets -------------------------------------------------------------------------------- /challenges/EzGrammar/app/assets/javascripts/cable.js: -------------------------------------------------------------------------------- 1 | // Action Cable provides the framework to deal with WebSockets in Rails. 2 | // You can generate new channels where WebSocket features live using the `rails generate channel` command. 3 | // 4 | //= require action_cable 5 | //= require_self 6 | //= require_tree ./channels 7 | 8 | (function() { 9 | this.App || (this.App = {}); 10 | 11 | App.cable = ActionCable.createConsumer(); 12 | 13 | }).call(this); 14 | -------------------------------------------------------------------------------- /challenges/EzGrammar/app/assets/javascripts/channels/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/EzGrammar/app/assets/javascripts/channels/.keep -------------------------------------------------------------------------------- /challenges/EzGrammar/app/assets/javascripts/check.coffee: -------------------------------------------------------------------------------- 1 | # Place all the behaviors and hooks related to the matching controller here. 2 | # All this logic will automatically be available in application.js. 3 | # You can use CoffeeScript in this file: http://coffeescript.org/ 4 | -------------------------------------------------------------------------------- /challenges/EzGrammar/app/assets/javascripts/errors.coffee: -------------------------------------------------------------------------------- 1 | # Place all the behaviors and hooks related to the matching controller here. 2 | # All this logic will automatically be available in application.js. 3 | # You can use CoffeeScript in this file: http://coffeescript.org/ 4 | -------------------------------------------------------------------------------- /challenges/EzGrammar/app/assets/javascripts/resumes.coffee: -------------------------------------------------------------------------------- 1 | # Place all the behaviors and hooks related to the matching controller here. 2 | # All this logic will automatically be available in application.js. 3 | # You can use CoffeeScript in this file: http://coffeescript.org/ 4 | -------------------------------------------------------------------------------- /challenges/EzGrammar/app/assets/javascripts/sessions.coffee: -------------------------------------------------------------------------------- 1 | # Place all the behaviors and hooks related to the matching controller here. 2 | # All this logic will automatically be available in application.js. 3 | # You can use CoffeeScript in this file: http://coffeescript.org/ 4 | -------------------------------------------------------------------------------- /challenges/EzGrammar/app/assets/javascripts/users.coffee: -------------------------------------------------------------------------------- 1 | # Place all the behaviors and hooks related to the matching controller here. 2 | # All this logic will automatically be available in application.js. 3 | # You can use CoffeeScript in this file: http://coffeescript.org/ 4 | -------------------------------------------------------------------------------- /challenges/EzGrammar/app/assets/stylesheets/application.scss: -------------------------------------------------------------------------------- 1 | /* 2 | * This is a manifest file that'll be compiled into application.css, which will include all the files 3 | * listed below. 4 | * 5 | * Any CSS and SCSS file within this directory, lib/assets/stylesheets, or any plugin's 6 | * vendor/assets/stylesheets directory can be referenced here using a relative path. 7 | * 8 | * You're free to add application-wide styles to this file and they'll appear at the bottom of the 9 | * compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS 10 | * files in this directory. Styles in this file should be added after the last require_* statement. 11 | * It is generally better to create a new file per style scope. 12 | * 13 | */ 14 | @import "bootstrap-sprockets"; 15 | @import "bootstrap"; -------------------------------------------------------------------------------- /challenges/EzGrammar/app/assets/stylesheets/check.scss: -------------------------------------------------------------------------------- 1 | // Place all the styles related to the check controller here. 2 | // They will automatically be included in application.css. 3 | // You can use Sass (SCSS) here: http://sass-lang.com/ 4 | 5 | -------------------------------------------------------------------------------- /challenges/EzGrammar/app/assets/stylesheets/errors.scss: -------------------------------------------------------------------------------- 1 | // Place all the styles related to the Errors controller here. 2 | // They will automatically be included in application.css. 3 | // You can use Sass (SCSS) here: http://sass-lang.com/ 4 | -------------------------------------------------------------------------------- /challenges/EzGrammar/app/assets/stylesheets/resumes.scss: -------------------------------------------------------------------------------- 1 | // Place all the styles related to the Resumes controller here. 2 | // They will automatically be included in application.css. 3 | // You can use Sass (SCSS) here: http://sass-lang.com/ 4 | -------------------------------------------------------------------------------- /challenges/EzGrammar/app/assets/stylesheets/sessions.scss: -------------------------------------------------------------------------------- 1 | // Place all the styles related to the Sessions controller here. 2 | // They will automatically be included in application.css. 3 | // You can use Sass (SCSS) here: http://sass-lang.com/ 4 | .title { 5 | font-size: 70px; 6 | text-align: center; 7 | font-weight: bold; 8 | color: #BDBDBD; 9 | } 10 | 11 | -------------------------------------------------------------------------------- /challenges/EzGrammar/app/assets/stylesheets/users.scss: -------------------------------------------------------------------------------- 1 | // Place all the styles related to the users controller here. 2 | // They will automatically be included in application.css. 3 | // You can use Sass (SCSS) here: http://sass-lang.com/ 4 | 5 | -------------------------------------------------------------------------------- /challenges/EzGrammar/app/channels/application_cable/channel.rb: -------------------------------------------------------------------------------- 1 | module ApplicationCable 2 | class Channel < ActionCable::Channel::Base 3 | end 4 | end 5 | -------------------------------------------------------------------------------- /challenges/EzGrammar/app/channels/application_cable/connection.rb: -------------------------------------------------------------------------------- 1 | module ApplicationCable 2 | class Connection < ActionCable::Connection::Base 3 | end 4 | end 5 | -------------------------------------------------------------------------------- /challenges/EzGrammar/app/controllers/application_controller.rb: -------------------------------------------------------------------------------- 1 | class ApplicationController < ActionController::Base 2 | protect_from_forgery with: :exception 3 | include SessionsHelper 4 | include UsersHelper 5 | include ResumesHelper 6 | include CheckHelper 7 | 8 | before_action :require_login 9 | 10 | def require_login 11 | unless logged_in? 12 | redirect_to login_path 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /challenges/EzGrammar/app/controllers/check_controller.rb: -------------------------------------------------------------------------------- 1 | class CheckController < ApplicationController 2 | def index 3 | @resumes = Resume.all 4 | if params[:q].present? 5 | if params[:q].to_s.length<50 6 | @q=grammar_check params[:q] 7 | @f='' 8 | else 9 | @f='Your input is too long, try using uploaded file instead' 10 | @q='' 11 | end 12 | else 13 | @q='' 14 | @f='' 15 | end 16 | end 17 | 18 | def create 19 | if params[:link].present? && params[:signature].present? 20 | @link=Base64.decode64(params[:link]) 21 | # we care about security very much, we discuss, and concluse that theirs character must not been in the URL, seems legit, so filter it! 22 | idx= @link=~ /\$|\`|\<|\{|\+|\||\.\.|\(|\-|\*|\&|\=|\,/i 23 | if !idx 24 | if hash_calc(@link)==params[:signature] 25 | @url="/#{@link}" 26 | @file_check=eval("process_help '#{@url}'") 27 | else 28 | @link='' 29 | @file_check='' 30 | end 31 | else 32 | @link='' 33 | @file_check='' 34 | end 35 | else 36 | @link='' 37 | @file_check='' 38 | end 39 | end 40 | end 41 | -------------------------------------------------------------------------------- /challenges/EzGrammar/app/controllers/concerns/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/EzGrammar/app/controllers/concerns/.keep -------------------------------------------------------------------------------- /challenges/EzGrammar/app/controllers/errors_controller.rb: -------------------------------------------------------------------------------- 1 | class ErrorsController < ApplicationController 2 | def file_not_found 3 | end 4 | 5 | def unprocessable 6 | end 7 | 8 | def internal_server_error 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /challenges/EzGrammar/app/controllers/resumes_controller.rb: -------------------------------------------------------------------------------- 1 | class ResumesController < ApplicationController 2 | def index 3 | if params[:type].present? && avoid_error(params[:type]) 4 | type=params[:type] 5 | else 6 | type="ASC" 7 | end 8 | @resumes = Resume.all.where(user: current_user.name).order("`resumes`.`name` #{type}") 9 | end 10 | 11 | def new 12 | @resume = Resume.new 13 | end 14 | 15 | def create 16 | @resume = Resume.new(resume_params) 17 | @resume.user=@current_user.name 18 | if @resume.attachment.present? 19 | if @resume.save 20 | @resume.update_attributes(hashfile: hash_calc(create_valid_upload_link(@resume.attachment_url)) ) 21 | redirect_to resumes_path, notice: "The resume #{@resume.name} has been uploaded." 22 | else 23 | render "new" 24 | end 25 | else 26 | render "new" 27 | end 28 | end 29 | 30 | def destroy 31 | @resume = Resume.where(user: current_user.name).find(params[:id]) 32 | @resume.destroy 33 | redirect_to resumes_path, notice: "The resume #{@resume.name} has been deleted." 34 | end 35 | 36 | private 37 | def resume_params 38 | params.require(:resume).permit(:name, :attachment) 39 | end 40 | 41 | end -------------------------------------------------------------------------------- /challenges/EzGrammar/app/controllers/sessions_controller.rb: -------------------------------------------------------------------------------- 1 | class SessionsController < ApplicationController 2 | 3 | skip_before_action :require_login, only: [:new, :create] 4 | 5 | def new 6 | end 7 | 8 | def create 9 | user = User.find_by name: params[:session][:name].downcase 10 | if user && user.authenticate(params[:session][:password]) 11 | flash[:success]="Login success" 12 | log_in user 13 | redirect_to users_path 14 | else 15 | flash[:danger]="Something Wrong" 16 | render :new 17 | end 18 | end 19 | 20 | def destroy 21 | log_out 22 | flash[:success]="You're Logged out" 23 | redirect_to login_path 24 | end 25 | end -------------------------------------------------------------------------------- /challenges/EzGrammar/app/controllers/users_controller.rb: -------------------------------------------------------------------------------- 1 | class UsersController < ApplicationController 2 | 3 | skip_before_action :require_login, only: [:new, :create] 4 | 5 | def index 6 | end 7 | 8 | def new 9 | redirect_to users_path if logged_in? 10 | @user=User.new 11 | end 12 | 13 | def create 14 | @user=User.new user_params 15 | if !User.exists?(name: params[:user][:name]) 16 | @user.save 17 | flash[:success]="Register Success" 18 | redirect_to users_path 19 | else 20 | flash[:success]="Register Failed" 21 | render :new 22 | end 23 | end 24 | 25 | def show 26 | @user=User.find_by id: params[:id] 27 | redirect_to users_path if @current_user != @user 28 | end 29 | 30 | private 31 | def user_params 32 | params.require(:user).permit :name, :password, :password_confirmation 33 | end 34 | end -------------------------------------------------------------------------------- /challenges/EzGrammar/app/helpers/application_helper.rb: -------------------------------------------------------------------------------- 1 | module ApplicationHelper 2 | end 3 | -------------------------------------------------------------------------------- /challenges/EzGrammar/app/helpers/check_helper.rb: -------------------------------------------------------------------------------- 1 | module CheckHelper 2 | def process_help url 3 | begin 4 | @file_check=File.open(url).read 5 | if File.size(url)<200 6 | @file_check=grammar_check @file_check 7 | return @file_check 8 | else 9 | return "Too large" 10 | end 11 | rescue 12 | exit("Something Wrong") 13 | return 0 14 | end 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /challenges/EzGrammar/app/helpers/errors_helper.rb: -------------------------------------------------------------------------------- 1 | module ErrorsHelper 2 | end 3 | -------------------------------------------------------------------------------- /challenges/EzGrammar/app/helpers/resumes_helper.rb: -------------------------------------------------------------------------------- 1 | module ResumesHelper 2 | def hash_calc filepath 3 | pepper='V3Ry_Pr1v4t3@tsu' # Sorry, can't give you this 4 | salt=Secretttt.first.thinkoutoftheboxsmileicon 5 | # see why we are doing this: https://security.stackexchange.com/questions/3272/password-hashing-add-salt-pepper-or-is-salt-enough 6 | return Digest::SHA1.hexdigest(pepper+filepath+salt).to_s 7 | end 8 | 9 | def create_valid_upload_link filepath 10 | return filepath[1..-1] 11 | end 12 | 13 | def avoid_error input_string 14 | idx= input_string=~ /\~|\`|\!|\@|\#|\$|\%|\^|\&|\*|\-|\_|\+|\=|\[|\]|\{|\}|\:|\;|\'|\"|\<|\>|\,|\.|\?|\/|\|/ 15 | if !idx 16 | return true 17 | else 18 | return false 19 | end 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /challenges/EzGrammar/app/helpers/sessions_helper.rb: -------------------------------------------------------------------------------- 1 | module SessionsHelper 2 | def log_in user 3 | session[:user_id]=user.id 4 | end 5 | 6 | def log_out 7 | session.delete :user_id 8 | end 9 | 10 | def current_user 11 | @current_user ||= User.find_by id: session[:user_id] 12 | end 13 | 14 | def logged_in? 15 | current_user.present? 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /challenges/EzGrammar/app/helpers/users_helper.rb: -------------------------------------------------------------------------------- 1 | module UsersHelper 2 | def grammar_check word 3 | begin 4 | parser = Gingerice::Parser.new 5 | result = parser.parse word 6 | return result['result'] 7 | rescue 8 | return 'Something Wrong' 9 | end 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /challenges/EzGrammar/app/jobs/application_job.rb: -------------------------------------------------------------------------------- 1 | class ApplicationJob < ActiveJob::Base 2 | end 3 | -------------------------------------------------------------------------------- /challenges/EzGrammar/app/mailers/application_mailer.rb: -------------------------------------------------------------------------------- 1 | class ApplicationMailer < ActionMailer::Base 2 | default from: 'from@example.com' 3 | layout 'mailer' 4 | end 5 | -------------------------------------------------------------------------------- /challenges/EzGrammar/app/models/application_record.rb: -------------------------------------------------------------------------------- 1 | class ApplicationRecord < ActiveRecord::Base 2 | self.abstract_class = true 3 | end 4 | -------------------------------------------------------------------------------- /challenges/EzGrammar/app/models/concerns/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/EzGrammar/app/models/concerns/.keep -------------------------------------------------------------------------------- /challenges/EzGrammar/app/models/resume.rb: -------------------------------------------------------------------------------- 1 | class Resume < ApplicationRecord 2 | mount_uploader :attachment, AttachmentUploader # Tells rails to use this uploader for this model. 3 | validates :name, presence: true # Make sure the owner's name is present. 4 | end -------------------------------------------------------------------------------- /challenges/EzGrammar/app/models/secretttt.rb: -------------------------------------------------------------------------------- 1 | class Secretttt < ApplicationRecord 2 | end 3 | -------------------------------------------------------------------------------- /challenges/EzGrammar/app/models/user.rb: -------------------------------------------------------------------------------- 1 | class User < ApplicationRecord 2 | has_secure_password 3 | end 4 | -------------------------------------------------------------------------------- /challenges/EzGrammar/app/uploaders/attachment_uploader.rb: -------------------------------------------------------------------------------- 1 | class AttachmentUploader < CarrierWave::Uploader::Base 2 | # Include RMagick or MiniMagick support: 3 | # include CarrierWave::RMagick 4 | # include CarrierWave::MiniMagick 5 | 6 | # Choose what kind of storage to use for this uploader: 7 | storage :file 8 | # storage :fog 9 | 10 | # Override the directory where uploaded files will be stored. 11 | # This is a sensible default for uploaders that are meant to be mounted: 12 | def store_dir 13 | #"uploads/#{model.class.to_s.underscore}/#{mounted_as}" 14 | "/tmp/save/" 15 | end 16 | 17 | # Provide a default URL as a default if there hasn't been a file uploaded: 18 | # def default_url(*args) 19 | # # For Rails 3.1+ asset pipeline compatibility: 20 | # # ActionController::Base.helpers.asset_path("fallback/" + [version_name, "default.png"].compact.join('_')) 21 | # 22 | # "/images/fallback/" + [version_name, "default.png"].compact.join('_') 23 | # end 24 | 25 | # Process files as they are uploaded: 26 | # process scale: [200, 300] 27 | # 28 | # def scale(width, height) 29 | # # do something 30 | # end 31 | 32 | # Create different versions of your uploaded files: 33 | # version :thumb do 34 | # process resize_to_fit: [50, 50] 35 | # end 36 | 37 | # Add a white list of extensions which are allowed to be uploaded. 38 | # For images you might use something like this: 39 | # def extension_whitelist 40 | # %w(jpg jpeg gif png) 41 | # end 42 | 43 | # Override the filename of the uploaded files: 44 | # Avoid using model.id or version_name here, see uploader/store.rb for details. 45 | def filename 46 | rename_file="temp_file_#{model.id}.txt" 47 | "#{rename_file}" if original_filename.present? 48 | end 49 | end 50 | -------------------------------------------------------------------------------- /challenges/EzGrammar/app/views/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/EzGrammar/app/views/.DS_Store -------------------------------------------------------------------------------- /challenges/EzGrammar/app/views/check/create.html.erb: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |

Grammar Checker Service

5 |
6 |
7 | 8 | <%= current_user.name %> - 9 | 10 | <%= link_to "Home", users_path, method: :get %> - 11 | 12 | <%= link_to "Check", check_index_path, method: :get %> - 13 | 14 | <%= link_to "Upload", resumes_path, method: :get %> - 15 | 16 | <%= link_to "Logout", logout_path, method: :delete %> 17 |
18 |
19 |
20 |
21 |
22 |
<%= @file_check.html_safe %>
23 |
24 |
25 |
Fast check
26 |
27 |
28 | <%= form_tag("/check", method: "get") do %> 29 | <%= label_tag(:q, "") %> 30 |
31 | <%= text_field_tag :q, nil, class: "form-control" %> 32 |
33 | <%= submit_tag "Check", class: "btn btn-primary" %> 34 | <% end %> 35 |
36 |
37 |
38 |

39 |
40 |
Load from System
41 |
42 |
43 | <%= form_tag("/check", method: "post") do %> 44 | <%= label_tag(:link, "Input") %> 45 | <%= text_field_tag :link, nil, class: "form-control" %> 46 |
47 | <%= label_tag(:signature,"Hash") %> 48 | <%= text_field_tag :signature, nil, class: "form-control" %> 49 |
50 | <%= submit_tag "Check", class: "btn btn-info" %> 51 |
52 | <% end %> 53 |
54 |
55 |
56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /challenges/EzGrammar/app/views/errors/file_not_found.html.erb: -------------------------------------------------------------------------------- 1 | 8 | 9 |
10 |
11 |
-------------------------------------------------------------------------------- /challenges/EzGrammar/app/views/errors/internal_server_error.html.erb: -------------------------------------------------------------------------------- 1 | 8 | 9 |
10 |
11 |
-------------------------------------------------------------------------------- /challenges/EzGrammar/app/views/errors/unprocessable.html.erb: -------------------------------------------------------------------------------- 1 | 8 | 9 |
10 |
11 |
-------------------------------------------------------------------------------- /challenges/EzGrammar/app/views/layouts/application.html.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | EzGrammar 5 | <%= csrf_meta_tags %> 6 | <%= csp_meta_tag %> 7 | 8 | <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %> 9 | <%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %> 10 | 11 | 12 | 13 |
14 | <% flash.each do |key, value| %> 15 |
16 | 17 | 18 |
19 | 20 | <% end %> 21 |
22 | <%= yield %> 23 | 24 | 25 | -------------------------------------------------------------------------------- /challenges/EzGrammar/app/views/layouts/mailer.html.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 10 | 11 | <%= yield %> 12 | 13 | 14 | -------------------------------------------------------------------------------- /challenges/EzGrammar/app/views/layouts/mailer.text.erb: -------------------------------------------------------------------------------- 1 | <%= yield %> 2 | -------------------------------------------------------------------------------- /challenges/EzGrammar/app/views/resumes/new.html.erb: -------------------------------------------------------------------------------- 1 | <% if !@resume.errors.empty? %> 2 |
3 | 4 | 9 | 10 |
11 | <% end %> 12 | 13 |
14 | <%= form_for @resume, html: { multipart: true } do |f| %> 15 | <%= f.label :name, "Note" %> 16 | <%= f.text_field :name %> 17 | <%= f.label :attachment,"~" %> 18 | <%= f.file_field :attachment %> 19 | <%= f.submit "Save", class: "btn btn-primary" %> 20 | <% end %> 21 |
-------------------------------------------------------------------------------- /challenges/EzGrammar/app/views/sessions/new.html.erb: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |

Login

5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | <%= form_for :session, url: login_path do |f| %> 13 |
14 | <%= f.label :name %> 15 | <%= f.text_field :name, placeholder: "Enter your name", class: "form-control" %> 16 |
17 |
18 | <%= f.label :password %> 19 | <%= f.password_field :password, placeholder: "Enter your password", 20 | class: "form-control" %> 21 |
22 |
23 | <%= f.submit "Login", class: "btn btn-info col-lg-12" %> 24 |
25 |
26 | 27 | <%= link_to "Register", new_user_path %> 28 |
29 | <% end %> 30 | <% if !flash[:success].blank? %> 31 |
32 | <%= flash[:success] %> 33 |
34 | <% end %> 35 |
36 |
37 | -------------------------------------------------------------------------------- /challenges/EzGrammar/app/views/users/new.html.erb: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |

Register

5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | <%= form_for @user, html: {class: "form-horizontal"} do |f| %> 13 |
14 | <%= f.label :name, "Name", class: "col-md-2 control-label" %> 15 |
16 | <%= f.text_field :name, class: "form-control", placeholder: "Enter user name" %> 17 |
18 |
19 |
20 | <%= f.label :password, "Password", class: "col-md-2 control-label" %> 21 |
22 | <%= f.password_field :password, class: "form-control", placeholder: "Enter password" %> 23 |
24 |
25 |
26 | <%= f.label :password_confirmation, "Password Confirmation", class: "col-md-2 control-label" %> 27 |
28 | <%= f.password_field :password_confirmation, class: "form-control", placeholder: "Enter password confirmation" %> 29 |
30 |
31 |
32 |
33 | <%= f.submit "Register", class: "btn btn-success" %> 34 |
35 |
36 | <% end %> 37 | <% if !flash[:success].blank? %> 38 |
39 | <%= flash[:success] %> 40 |
41 | <% end %> 42 |
43 |
44 | -------------------------------------------------------------------------------- /challenges/EzGrammar/bin/bundle: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) 3 | load Gem.bin_path('bundler', 'bundle') 4 | -------------------------------------------------------------------------------- /challenges/EzGrammar/bin/rails: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | begin 3 | load File.expand_path('../spring', __FILE__) 4 | rescue LoadError => e 5 | raise unless e.message.include?('spring') 6 | end 7 | APP_PATH = File.expand_path('../config/application', __dir__) 8 | require_relative '../config/boot' 9 | require 'rails/commands' 10 | -------------------------------------------------------------------------------- /challenges/EzGrammar/bin/rake: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | begin 3 | load File.expand_path('../spring', __FILE__) 4 | rescue LoadError => e 5 | raise unless e.message.include?('spring') 6 | end 7 | require_relative '../config/boot' 8 | require 'rake' 9 | Rake.application.run 10 | -------------------------------------------------------------------------------- /challenges/EzGrammar/bin/setup: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require 'fileutils' 3 | include FileUtils 4 | 5 | # path to your application root. 6 | APP_ROOT = File.expand_path('..', __dir__) 7 | 8 | def system!(*args) 9 | system(*args) || abort("\n== Command #{args} failed ==") 10 | end 11 | 12 | chdir APP_ROOT do 13 | # This script is a starting point to setup your application. 14 | # Add necessary setup steps to this file. 15 | 16 | puts '== Installing dependencies ==' 17 | system! 'gem install bundler --conservative' 18 | system('bundle check') || system!('bundle install') 19 | 20 | # Install JavaScript dependencies if using Yarn 21 | # system('bin/yarn') 22 | 23 | # puts "\n== Copying sample files ==" 24 | # unless File.exist?('config/database.yml') 25 | # cp 'config/database.yml.sample', 'config/database.yml' 26 | # end 27 | 28 | puts "\n== Preparing database ==" 29 | system! 'bin/rails db:setup' 30 | 31 | puts "\n== Removing old logs and tempfiles ==" 32 | system! 'bin/rails log:clear tmp:clear' 33 | 34 | puts "\n== Restarting application server ==" 35 | system! 'bin/rails restart' 36 | end 37 | -------------------------------------------------------------------------------- /challenges/EzGrammar/bin/spring: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | 3 | # This file loads spring without using Bundler, in order to be fast. 4 | # It gets overwritten when you run the `spring binstub` command. 5 | 6 | unless defined?(Spring) 7 | require 'rubygems' 8 | require 'bundler' 9 | 10 | lockfile = Bundler::LockfileParser.new(Bundler.default_lockfile.read) 11 | spring = lockfile.specs.detect { |spec| spec.name == "spring" } 12 | if spring 13 | Gem.use_paths Gem.dir, Bundler.bundle_path.to_s, *Gem.path 14 | gem 'spring', spring.version 15 | require 'spring/binstub' 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /challenges/EzGrammar/bin/update: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require 'fileutils' 3 | include FileUtils 4 | 5 | # path to your application root. 6 | APP_ROOT = File.expand_path('..', __dir__) 7 | 8 | def system!(*args) 9 | system(*args) || abort("\n== Command #{args} failed ==") 10 | end 11 | 12 | chdir APP_ROOT do 13 | # This script is a way to update your development environment automatically. 14 | # Add necessary update steps to this file. 15 | 16 | puts '== Installing dependencies ==' 17 | system! 'gem install bundler --conservative' 18 | system('bundle check') || system!('bundle install') 19 | 20 | # Install JavaScript dependencies if using Yarn 21 | # system('bin/yarn') 22 | 23 | puts "\n== Updating database ==" 24 | system! 'bin/rails db:migrate' 25 | 26 | puts "\n== Removing old logs and tempfiles ==" 27 | system! 'bin/rails log:clear tmp:clear' 28 | 29 | puts "\n== Restarting application server ==" 30 | system! 'bin/rails restart' 31 | end 32 | -------------------------------------------------------------------------------- /challenges/EzGrammar/bin/yarn: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | APP_ROOT = File.expand_path('..', __dir__) 3 | Dir.chdir(APP_ROOT) do 4 | begin 5 | exec "yarnpkg", *ARGV 6 | rescue Errno::ENOENT 7 | $stderr.puts "Yarn executable was not detected in the system." 8 | $stderr.puts "Download Yarn at https://yarnpkg.com/en/docs/install" 9 | exit 1 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /challenges/EzGrammar/chall_config.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | echo "I haven't created docker for it yet (Will do it later), so if you want to test it, install: "; 3 | echo "- ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-darwin17]"; 4 | echo "- Rails (5.2.0)"; 5 | echo "- mysql"; 6 | echo "Then create rails project with mysql is a database, create database, migrate it, then rails start, you're done" 7 | echo "remember to change the db user/pw connect in config/database.yml" 8 | -------------------------------------------------------------------------------- /challenges/EzGrammar/config.ru: -------------------------------------------------------------------------------- 1 | # This file is used by Rack-based servers to start the application. 2 | 3 | require_relative 'config/environment' 4 | 5 | run Rails.application 6 | -------------------------------------------------------------------------------- /challenges/EzGrammar/config/application.rb: -------------------------------------------------------------------------------- 1 | require_relative 'boot' 2 | 3 | require 'rails/all' 4 | 5 | # Require the gems listed in Gemfile, including any gems 6 | # you've limited to :test, :development, or :production. 7 | Bundler.require(*Rails.groups) 8 | 9 | module EzGrammar 10 | class Application < Rails::Application 11 | # Initialize configuration defaults for originally generated Rails version. 12 | config.load_defaults 5.2 13 | config.exceptions_app = self.routes 14 | # Settings in config/environments/* take precedence over those specified here. 15 | # Application configuration can go into files in config/initializers 16 | # -- all .rb files in that directory are automatically loaded after loading 17 | # the framework and any gems in your application. 18 | end 19 | end 20 | -------------------------------------------------------------------------------- /challenges/EzGrammar/config/boot.rb: -------------------------------------------------------------------------------- 1 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) 2 | 3 | require 'bundler/setup' # Set up gems listed in the Gemfile. 4 | require 'bootsnap/setup' # Speed up boot time by caching expensive operations. 5 | -------------------------------------------------------------------------------- /challenges/EzGrammar/config/cable.yml: -------------------------------------------------------------------------------- 1 | development: 2 | adapter: async 3 | 4 | test: 5 | adapter: async 6 | 7 | production: 8 | adapter: redis 9 | url: <%= ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" } %> 10 | channel_prefix: EzGrammar_production 11 | -------------------------------------------------------------------------------- /challenges/EzGrammar/config/credentials.yml.enc: -------------------------------------------------------------------------------- 1 | l1HRoUnRhqTs8B1xEzaXn+QjANBJDpQSl5g1rxt58KRapygCPdoVdaoiA3vyfnyzEW7W/oqHG6KiMQHhXSul0VfUYXyxkN+JasH4IgugpoWF4617HMrE5sTi7EI5Ye8mLz/ElN9kzos7CZokpjSb647YMfDnuYzK25KoNj02fNIk891gl+9G6O6HhYrfDQ5S6bWzK+n0GEEewmTyphIObobwtLTt5d6hdZcojgcX+VXkr4qyrAQEC+F43Vn6l3NmNM1mCfoR46GtoJkUlZhOIwn6/qiBLeuJ8ZyPkPxLsel4mbn21QoRDThoE4b/wlCTeuba2nxQznZmEKatgHc+CVtM+bfh0CycRsaKz5/oLQUKa9DTHczIHBj/aiKkaLUsgFA5JJSG37GSP9sH6hdSYpoY7wzfL+eFPpkl--mks2J982cYixT00S--KthsJ/2+/ucmc25pxnoo1Q== -------------------------------------------------------------------------------- /challenges/EzGrammar/config/database.yml: -------------------------------------------------------------------------------- 1 | # MySQL. Versions 5.1.10 and up are supported. 2 | # 3 | # Install the MySQL driver 4 | # gem install mysql2 5 | # 6 | # Ensure the MySQL gem is defined in your Gemfile 7 | # gem 'mysql2' 8 | # 9 | # And be sure to use new-style password hashing: 10 | # https://dev.mysql.com/doc/refman/5.7/en/password-hashing.html 11 | # 12 | default: &default 13 | adapter: mysql2 14 | encoding: utf8 15 | pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %> 16 | username: root 17 | password: 18 | socket: /tmp/mysql.sock 19 | 20 | development: 21 | <<: *default 22 | database: EzGrammar_development 23 | 24 | # Warning: The database defined as "test" will be erased and 25 | # re-generated from your development database when you run "rake". 26 | # Do not set this db to the same as development or production. 27 | test: 28 | <<: *default 29 | database: EzGrammar_test 30 | 31 | # As with config/secrets.yml, you never want to store sensitive information, 32 | # like your database password, in your source code. If your source code is 33 | # ever seen by anyone, they now have access to your database. 34 | # 35 | # Instead, provide the password as a unix environment variable when you boot 36 | # the app. Read http://guides.rubyonrails.org/configuring.html#configuring-a-database 37 | # for a full rundown on how to provide these environment variables in a 38 | # production deployment. 39 | # 40 | # On Heroku and other platform providers, you may have a full connection URL 41 | # available as an environment variable. For example: 42 | # 43 | # DATABASE_URL="mysql2://myuser:mypass@localhost/somedatabase" 44 | # 45 | # You can use this database configuration with: 46 | # 47 | # production: 48 | # url: <%= ENV['DATABASE_URL'] %> 49 | # 50 | production: 51 | <<: *default 52 | database: EzGrammar_production 53 | username: EzGrammar 54 | password: <%= ENV['EZGRAMMAR_DATABASE_PASSWORD'] %> 55 | -------------------------------------------------------------------------------- /challenges/EzGrammar/config/environment.rb: -------------------------------------------------------------------------------- 1 | # Load the Rails application. 2 | require_relative 'application' 3 | 4 | # Initialize the Rails application. 5 | Rails.application.initialize! 6 | -------------------------------------------------------------------------------- /challenges/EzGrammar/config/environments/test.rb: -------------------------------------------------------------------------------- 1 | Rails.application.configure do 2 | # Settings specified here will take precedence over those in config/application.rb. 3 | 4 | # The test environment is used exclusively to run your application's 5 | # test suite. You never need to work with it otherwise. Remember that 6 | # your test database is "scratch space" for the test suite and is wiped 7 | # and recreated between test runs. Don't rely on the data there! 8 | config.cache_classes = true 9 | 10 | # Do not eager load code on boot. This avoids loading your whole application 11 | # just for the purpose of running a single test. If you are using a tool that 12 | # preloads Rails for running tests, you may have to set it to true. 13 | config.eager_load = false 14 | 15 | # Configure public file server for tests with Cache-Control for performance. 16 | config.public_file_server.enabled = true 17 | config.public_file_server.headers = { 18 | 'Cache-Control' => "public, max-age=#{1.hour.to_i}" 19 | } 20 | 21 | # Show full error reports and disable caching. 22 | config.consider_all_requests_local = true 23 | config.action_controller.perform_caching = false 24 | 25 | # Raise exceptions instead of rendering exception templates. 26 | config.action_dispatch.show_exceptions = false 27 | 28 | # Disable request forgery protection in test environment. 29 | config.action_controller.allow_forgery_protection = false 30 | 31 | # Store uploaded files on the local file system in a temporary directory 32 | config.active_storage.service = :test 33 | 34 | config.action_mailer.perform_caching = false 35 | 36 | # Tell Action Mailer not to deliver emails to the real world. 37 | # The :test delivery method accumulates sent emails in the 38 | # ActionMailer::Base.deliveries array. 39 | config.action_mailer.delivery_method = :test 40 | 41 | # Print deprecation notices to the stderr. 42 | config.active_support.deprecation = :stderr 43 | 44 | # Raises error for missing translations 45 | # config.action_view.raise_on_missing_translations = true 46 | end 47 | -------------------------------------------------------------------------------- /challenges/EzGrammar/config/initializers/application_controller_renderer.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # ActiveSupport::Reloader.to_prepare do 4 | # ApplicationController.renderer.defaults.merge!( 5 | # http_host: 'example.org', 6 | # https: false 7 | # ) 8 | # end 9 | -------------------------------------------------------------------------------- /challenges/EzGrammar/config/initializers/assets.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Version of your assets, change this if you want to expire all your assets. 4 | Rails.application.config.assets.version = '1.0' 5 | 6 | # Add additional assets to the asset load path. 7 | # Rails.application.config.assets.paths << Emoji.images_path 8 | # Add Yarn node_modules folder to the asset load path. 9 | Rails.application.config.assets.paths << Rails.root.join('node_modules') 10 | 11 | # Precompile additional assets. 12 | # application.js, application.css, and all non-JS/CSS in the app/assets 13 | # folder are already added. 14 | # Rails.application.config.assets.precompile += %w( admin.js admin.css ) 15 | -------------------------------------------------------------------------------- /challenges/EzGrammar/config/initializers/backtrace_silencers.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. 4 | # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ } 5 | 6 | # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code. 7 | # Rails.backtrace_cleaner.remove_silencers! 8 | -------------------------------------------------------------------------------- /challenges/EzGrammar/config/initializers/content_security_policy.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Define an application-wide content security policy 4 | # For further information see the following documentation 5 | # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy 6 | 7 | # Rails.application.config.content_security_policy do |policy| 8 | # policy.default_src :self, :https 9 | # policy.font_src :self, :https, :data 10 | # policy.img_src :self, :https, :data 11 | # policy.object_src :none 12 | # policy.script_src :self, :https 13 | # policy.style_src :self, :https 14 | 15 | # # Specify URI for violation reports 16 | # # policy.report_uri "/csp-violation-report-endpoint" 17 | # end 18 | 19 | # If you are using UJS then enable automatic nonce generation 20 | # Rails.application.config.content_security_policy_nonce_generator = -> request { SecureRandom.base64(16) } 21 | 22 | # Report CSP violations to a specified URI 23 | # For further information see the following documentation: 24 | # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy-Report-Only 25 | # Rails.application.config.content_security_policy_report_only = true 26 | -------------------------------------------------------------------------------- /challenges/EzGrammar/config/initializers/cookies_serializer.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Specify a serializer for the signed and encrypted cookie jars. 4 | # Valid options are :json, :marshal, and :hybrid. 5 | Rails.application.config.action_dispatch.cookies_serializer = :json 6 | -------------------------------------------------------------------------------- /challenges/EzGrammar/config/initializers/filter_parameter_logging.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Configure sensitive parameters which will be filtered from the log file. 4 | Rails.application.config.filter_parameters += [:password] 5 | -------------------------------------------------------------------------------- /challenges/EzGrammar/config/initializers/inflections.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Add new inflection rules using the following format. Inflections 4 | # are locale specific, and you may define rules for as many different 5 | # locales as you wish. All of these examples are active by default: 6 | # ActiveSupport::Inflector.inflections(:en) do |inflect| 7 | # inflect.plural /^(ox)$/i, '\1en' 8 | # inflect.singular /^(ox)en/i, '\1' 9 | # inflect.irregular 'person', 'people' 10 | # inflect.uncountable %w( fish sheep ) 11 | # end 12 | 13 | # These inflection rules are supported but not enabled by default: 14 | # ActiveSupport::Inflector.inflections(:en) do |inflect| 15 | # inflect.acronym 'RESTful' 16 | # end 17 | -------------------------------------------------------------------------------- /challenges/EzGrammar/config/initializers/mime_types.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Add new mime types for use in respond_to blocks: 4 | # Mime::Type.register "text/richtext", :rtf 5 | -------------------------------------------------------------------------------- /challenges/EzGrammar/config/initializers/wrap_parameters.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # This file contains settings for ActionController::ParamsWrapper which 4 | # is enabled by default. 5 | 6 | # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array. 7 | ActiveSupport.on_load(:action_controller) do 8 | wrap_parameters format: [:json] 9 | end 10 | 11 | # To enable root element in JSON for ActiveRecord objects. 12 | # ActiveSupport.on_load(:active_record) do 13 | # self.include_root_in_json = true 14 | # end 15 | -------------------------------------------------------------------------------- /challenges/EzGrammar/config/locales/en.yml: -------------------------------------------------------------------------------- 1 | # Files in the config/locales directory are used for internationalization 2 | # and are automatically loaded by Rails. If you want to use locales other 3 | # than English, add the necessary files in this directory. 4 | # 5 | # To use the locales, use `I18n.t`: 6 | # 7 | # I18n.t 'hello' 8 | # 9 | # In views, this is aliased to just `t`: 10 | # 11 | # <%= t('hello') %> 12 | # 13 | # To use a different locale, set it with `I18n.locale`: 14 | # 15 | # I18n.locale = :es 16 | # 17 | # This would use the information in config/locales/es.yml. 18 | # 19 | # The following keys must be escaped otherwise they will not be retrieved by 20 | # the default I18n backend: 21 | # 22 | # true, false, on, off, yes, no 23 | # 24 | # Instead, surround them with single quotes. 25 | # 26 | # en: 27 | # 'true': 'foo' 28 | # 29 | # To learn more, please read the Rails Internationalization guide 30 | # available at http://guides.rubyonrails.org/i18n.html. 31 | 32 | en: 33 | hello: "Hello world" 34 | -------------------------------------------------------------------------------- /challenges/EzGrammar/config/puma.rb: -------------------------------------------------------------------------------- 1 | # Puma can serve each request in a thread from an internal thread pool. 2 | # The `threads` method setting takes two numbers: a minimum and maximum. 3 | # Any libraries that use thread pools should be configured to match 4 | # the maximum value specified for Puma. Default is set to 5 threads for minimum 5 | # and maximum; this matches the default thread size of Active Record. 6 | # 7 | threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 } 8 | threads threads_count, threads_count 9 | 10 | # Specifies the `port` that Puma will listen on to receive requests; default is 3000. 11 | # 12 | port ENV.fetch("PORT") { 3000 } 13 | 14 | # Specifies the `environment` that Puma will run in. 15 | # 16 | environment ENV.fetch("RAILS_ENV") { "development" } 17 | 18 | # Specifies the number of `workers` to boot in clustered mode. 19 | # Workers are forked webserver processes. If using threads and workers together 20 | # the concurrency of the application would be max `threads` * `workers`. 21 | # Workers do not work on JRuby or Windows (both of which do not support 22 | # processes). 23 | # 24 | # workers ENV.fetch("WEB_CONCURRENCY") { 2 } 25 | 26 | # Use the `preload_app!` method when specifying a `workers` number. 27 | # This directive tells Puma to first boot the application and load code 28 | # before forking the application. This takes advantage of Copy On Write 29 | # process behavior so workers use less memory. 30 | # 31 | # preload_app! 32 | 33 | # Allow puma to be restarted by `rails restart` command. 34 | plugin :tmp_restart 35 | -------------------------------------------------------------------------------- /challenges/EzGrammar/config/routes.rb: -------------------------------------------------------------------------------- 1 | Rails.application.routes.draw do 2 | get 'errors/file_not_found' 3 | get 'errors/unprocessable' 4 | get 'errors/internal_server_error' 5 | get 'login' => 'sessions#new' 6 | post 'login' => 'sessions#create' 7 | delete 'logout' => 'sessions#destroy' 8 | # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html 9 | resources :users 10 | resources :check, only: [:index, :create] 11 | resources :resumes, only: [:index, :new, :create, :destroy] 12 | root "resumes#index" 13 | 14 | match "/404", to: "errors#file_not_found", via: :all 15 | match "/422", to: "errors#unprocessable", via: :all 16 | match "/500", to: "errors#internal_server_error", via: :all 17 | end 18 | -------------------------------------------------------------------------------- /challenges/EzGrammar/config/spring.rb: -------------------------------------------------------------------------------- 1 | %w[ 2 | .ruby-version 3 | .rbenv-vars 4 | tmp/restart.txt 5 | tmp/caching-dev.txt 6 | ].each { |path| Spring.watch(path) } 7 | -------------------------------------------------------------------------------- /challenges/EzGrammar/config/storage.yml: -------------------------------------------------------------------------------- 1 | test: 2 | service: Disk 3 | root: <%= Rails.root.join("tmp/storage") %> 4 | 5 | local: 6 | service: Disk 7 | root: <%= Rails.root.join("storage") %> 8 | 9 | # Use rails credentials:edit to set the AWS secrets (as aws:access_key_id|secret_access_key) 10 | # amazon: 11 | # service: S3 12 | # access_key_id: <%= Rails.application.credentials.dig(:aws, :access_key_id) %> 13 | # secret_access_key: <%= Rails.application.credentials.dig(:aws, :secret_access_key) %> 14 | # region: us-east-1 15 | # bucket: your_own_bucket 16 | 17 | # Remember not to checkin your GCS keyfile to a repository 18 | # google: 19 | # service: GCS 20 | # project: your_project 21 | # credentials: <%= Rails.root.join("path/to/gcs.keyfile") %> 22 | # bucket: your_own_bucket 23 | 24 | # Use rails credentials:edit to set the Azure Storage secret (as azure_storage:storage_access_key) 25 | # microsoft: 26 | # service: AzureStorage 27 | # storage_account_name: your_account_name 28 | # storage_access_key: <%= Rails.application.credentials.dig(:azure_storage, :storage_access_key) %> 29 | # container: your_container_name 30 | 31 | # mirror: 32 | # service: Mirror 33 | # primary: local 34 | # mirrors: [ amazon, google, microsoft ] 35 | -------------------------------------------------------------------------------- /challenges/EzGrammar/db/migrate/20180806043352_create_users.rb: -------------------------------------------------------------------------------- 1 | class CreateUsers < ActiveRecord::Migration[5.2] 2 | def change 3 | create_table :users do |t| 4 | t.string :name 5 | t.string :password_digest 6 | 7 | t.timestamps 8 | end 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /challenges/EzGrammar/db/migrate/20180813093018_create_resumes.rb: -------------------------------------------------------------------------------- 1 | class CreateResumes < ActiveRecord::Migration[5.2] 2 | def change 3 | create_table :resumes do |t| 4 | t.string :name 5 | t.string :attachment 6 | 7 | t.timestamps 8 | end 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /challenges/EzGrammar/db/migrate/20180815082434_add_user_to_resume.rb: -------------------------------------------------------------------------------- 1 | class AddUserToResume < ActiveRecord::Migration[5.2] 2 | def change 3 | add_column :resumes, :user, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /challenges/EzGrammar/db/migrate/20180815082519_add_hash_to_resume.rb: -------------------------------------------------------------------------------- 1 | class AddHashToResume < ActiveRecord::Migration[5.2] 2 | def change 3 | add_column :resumes, :hash, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /challenges/EzGrammar/db/migrate/20180815091226_remove_hash_from_resume.rb: -------------------------------------------------------------------------------- 1 | class RemoveHashFromResume < ActiveRecord::Migration[5.2] 2 | def change 3 | remove_column :resumes, :hash, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /challenges/EzGrammar/db/migrate/20180815091308_add_hashfile_to_resume.rb: -------------------------------------------------------------------------------- 1 | class AddHashfileToResume < ActiveRecord::Migration[5.2] 2 | def change 3 | add_column :resumes, :hashfile, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /challenges/EzGrammar/db/migrate/20180820035221_create_secretttts.rb: -------------------------------------------------------------------------------- 1 | class CreateSecretttts < ActiveRecord::Migration[5.2] 2 | def change 3 | create_table :secretttts do |t| 4 | t.string :thinkoutoftheboxsmileicon 5 | 6 | t.timestamps 7 | end 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /challenges/EzGrammar/db/schema.rb: -------------------------------------------------------------------------------- 1 | # This file is auto-generated from the current state of the database. Instead 2 | # of editing this file, please use the migrations feature of Active Record to 3 | # incrementally modify your database, and then regenerate this schema definition. 4 | # 5 | # Note that this schema.rb definition is the authoritative source for your 6 | # database schema. If you need to create the application database on another 7 | # system, you should be using db:schema:load, not running all the migrations 8 | # from scratch. The latter is a flawed and unsustainable approach (the more migrations 9 | # you'll amass, the slower it'll run and the greater likelihood for issues). 10 | # 11 | # It's strongly recommended that you check this file into your version control system. 12 | 13 | ActiveRecord::Schema.define(version: 2018_08_20_035221) do 14 | 15 | create_table "resumes", options: "ENGINE=InnoDB DEFAULT CHARSET=utf8", force: :cascade do |t| 16 | t.string "name" 17 | t.string "attachment" 18 | t.datetime "created_at", null: false 19 | t.datetime "updated_at", null: false 20 | t.string "user" 21 | t.string "hashfile" 22 | end 23 | 24 | create_table "secretttts", options: "ENGINE=InnoDB DEFAULT CHARSET=utf8", force: :cascade do |t| 25 | t.string "thinkoutoftheboxsmileicon" 26 | t.datetime "created_at", null: false 27 | t.datetime "updated_at", null: false 28 | end 29 | 30 | create_table "users", options: "ENGINE=InnoDB DEFAULT CHARSET=utf8", force: :cascade do |t| 31 | t.string "name" 32 | t.string "password_digest" 33 | t.datetime "created_at", null: false 34 | t.datetime "updated_at", null: false 35 | end 36 | 37 | end 38 | -------------------------------------------------------------------------------- /challenges/EzGrammar/db/seeds.rb: -------------------------------------------------------------------------------- 1 | # This file should contain all the record creation needed to seed the database with its default values. 2 | # The data can then be loaded with the rails db:seed command (or created alongside the database with db:setup). 3 | # 4 | # Examples: 5 | # 6 | # movies = Movie.create([{ name: 'Star Wars' }, { name: 'Lord of the Rings' }]) 7 | # Character.create(name: 'Luke', movie: movies.first) 8 | -------------------------------------------------------------------------------- /challenges/EzGrammar/lib/assets/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/EzGrammar/lib/assets/.keep -------------------------------------------------------------------------------- /challenges/EzGrammar/lib/tasks/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/EzGrammar/lib/tasks/.keep -------------------------------------------------------------------------------- /challenges/EzGrammar/log/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/EzGrammar/log/.keep -------------------------------------------------------------------------------- /challenges/EzGrammar/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "EzGrammar", 3 | "private": true, 4 | "dependencies": {} 5 | } 6 | -------------------------------------------------------------------------------- /challenges/EzGrammar/public/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/EzGrammar/public/.DS_Store -------------------------------------------------------------------------------- /challenges/EzGrammar/public/404.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | The page you were looking for doesn't exist (404) 5 | 6 | 55 | 56 | 57 | 58 | 59 |
60 |
61 |

The page you were looking for doesn't exist.

62 |

You may have mistyped the address or the page may have moved.

63 |
64 |

If you are the application owner check the logs for more information.

65 |
66 | 67 | 68 | -------------------------------------------------------------------------------- /challenges/EzGrammar/public/422.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | The change you wanted was rejected (422) 5 | 6 | 55 | 56 | 57 | 58 | 59 |
60 |
61 |

The change you wanted was rejected.

62 |

Maybe you tried to change something you didn't have access to.

63 |
64 |

If you are the application owner check the logs for more information.

65 |
66 | 67 | 68 | -------------------------------------------------------------------------------- /challenges/EzGrammar/public/500.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | We're sorry, but something went wrong (500) 5 | 6 | 55 | 56 | 57 | 58 | 59 |
60 |
61 |

We're sorry, but something went wrong.

62 |
63 |

If you are the application owner check the logs for more information.

64 |
65 | 66 | 67 | -------------------------------------------------------------------------------- /challenges/EzGrammar/public/apple-touch-icon-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/EzGrammar/public/apple-touch-icon-precomposed.png -------------------------------------------------------------------------------- /challenges/EzGrammar/public/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/EzGrammar/public/apple-touch-icon.png -------------------------------------------------------------------------------- /challenges/EzGrammar/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/EzGrammar/public/favicon.ico -------------------------------------------------------------------------------- /challenges/EzGrammar/public/robots.txt: -------------------------------------------------------------------------------- 1 | # See http://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file 2 | -------------------------------------------------------------------------------- /challenges/EzGrammar/public/uploads/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/EzGrammar/public/uploads/.DS_Store -------------------------------------------------------------------------------- /challenges/EzGrammar/test/application_system_test_case.rb: -------------------------------------------------------------------------------- 1 | require "test_helper" 2 | 3 | class ApplicationSystemTestCase < ActionDispatch::SystemTestCase 4 | driven_by :selenium, using: :chrome, screen_size: [1400, 1400] 5 | end 6 | -------------------------------------------------------------------------------- /challenges/EzGrammar/test/controllers/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/EzGrammar/test/controllers/.keep -------------------------------------------------------------------------------- /challenges/EzGrammar/test/controllers/check_controller_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class CheckControllerTest < ActionDispatch::IntegrationTest 4 | # test "the truth" do 5 | # assert true 6 | # end 7 | end 8 | -------------------------------------------------------------------------------- /challenges/EzGrammar/test/controllers/errors_controller_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class ErrorsControllerTest < ActionDispatch::IntegrationTest 4 | test "should get file_not_found" do 5 | get errors_file_not_found_url 6 | assert_response :success 7 | end 8 | 9 | test "should get unprocessable" do 10 | get errors_unprocessable_url 11 | assert_response :success 12 | end 13 | 14 | test "should get internal_server_error" do 15 | get errors_internal_server_error_url 16 | assert_response :success 17 | end 18 | 19 | end 20 | -------------------------------------------------------------------------------- /challenges/EzGrammar/test/controllers/resumes_controller_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class ResumesControllerTest < ActionDispatch::IntegrationTest 4 | test "should get index" do 5 | get resumes_index_url 6 | assert_response :success 7 | end 8 | 9 | test "should get new" do 10 | get resumes_new_url 11 | assert_response :success 12 | end 13 | 14 | test "should get create" do 15 | get resumes_create_url 16 | assert_response :success 17 | end 18 | 19 | test "should get destroy" do 20 | get resumes_destroy_url 21 | assert_response :success 22 | end 23 | 24 | end 25 | -------------------------------------------------------------------------------- /challenges/EzGrammar/test/controllers/sessions_controller_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class SessionsControllerTest < ActionDispatch::IntegrationTest 4 | test "should get new" do 5 | get sessions_new_url 6 | assert_response :success 7 | end 8 | 9 | end 10 | -------------------------------------------------------------------------------- /challenges/EzGrammar/test/controllers/users_controller_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class UsersControllerTest < ActionDispatch::IntegrationTest 4 | # test "the truth" do 5 | # assert true 6 | # end 7 | end 8 | -------------------------------------------------------------------------------- /challenges/EzGrammar/test/fixtures/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/EzGrammar/test/fixtures/.keep -------------------------------------------------------------------------------- /challenges/EzGrammar/test/fixtures/files/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/EzGrammar/test/fixtures/files/.keep -------------------------------------------------------------------------------- /challenges/EzGrammar/test/fixtures/resumes.yml: -------------------------------------------------------------------------------- 1 | # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html 2 | 3 | one: 4 | name: MyString 5 | attachment: MyString 6 | 7 | two: 8 | name: MyString 9 | attachment: MyString 10 | -------------------------------------------------------------------------------- /challenges/EzGrammar/test/fixtures/secretttts.yml: -------------------------------------------------------------------------------- 1 | # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html 2 | 3 | one: 4 | thinkoutoftheboxsmileicon: MyString 5 | 6 | two: 7 | thinkoutoftheboxsmileicon: MyString 8 | -------------------------------------------------------------------------------- /challenges/EzGrammar/test/fixtures/users.yml: -------------------------------------------------------------------------------- 1 | # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html 2 | 3 | one: 4 | name: MyString 5 | password_digest: MyString 6 | 7 | two: 8 | name: MyString 9 | password_digest: MyString 10 | -------------------------------------------------------------------------------- /challenges/EzGrammar/test/helpers/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/EzGrammar/test/helpers/.keep -------------------------------------------------------------------------------- /challenges/EzGrammar/test/integration/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/EzGrammar/test/integration/.keep -------------------------------------------------------------------------------- /challenges/EzGrammar/test/mailers/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/EzGrammar/test/mailers/.keep -------------------------------------------------------------------------------- /challenges/EzGrammar/test/models/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/EzGrammar/test/models/.keep -------------------------------------------------------------------------------- /challenges/EzGrammar/test/models/resume_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class ResumeTest < ActiveSupport::TestCase 4 | # test "the truth" do 5 | # assert true 6 | # end 7 | end 8 | -------------------------------------------------------------------------------- /challenges/EzGrammar/test/models/secretttt_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class SecrettttTest < ActiveSupport::TestCase 4 | # test "the truth" do 5 | # assert true 6 | # end 7 | end 8 | -------------------------------------------------------------------------------- /challenges/EzGrammar/test/models/user_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class UserTest < ActiveSupport::TestCase 4 | # test "the truth" do 5 | # assert true 6 | # end 7 | end 8 | -------------------------------------------------------------------------------- /challenges/EzGrammar/test/system/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/EzGrammar/test/system/.keep -------------------------------------------------------------------------------- /challenges/EzGrammar/test/test_helper.rb: -------------------------------------------------------------------------------- 1 | ENV['RAILS_ENV'] ||= 'test' 2 | require_relative '../config/environment' 3 | require 'rails/test_help' 4 | 5 | class ActiveSupport::TestCase 6 | # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order. 7 | fixtures :all 8 | 9 | # Add more helper methods to be used by all tests here... 10 | end 11 | -------------------------------------------------------------------------------- /challenges/EzGrammar/tmp/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/EzGrammar/tmp/.keep -------------------------------------------------------------------------------- /challenges/EzGrammar/vendor/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/EzGrammar/vendor/.keep -------------------------------------------------------------------------------- /challenges/FreeToFlag/chall_config.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | echo "configuring FreeToFlag..."; docker-compose up -d; -------------------------------------------------------------------------------- /challenges/FreeToFlag/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '2' 2 | services: 3 | php: 4 | build: ./php 5 | ports: 6 | - '8003:80' 7 | volumes: 8 | - ./html:/var/www/html 9 | 10 | -------------------------------------------------------------------------------- /challenges/FreeToFlag/html/secret.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /challenges/FreeToFlag/php/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM php:5-apache 2 | COPY php.ini /usr/local/etc/php/ 3 | RUN apt-get update \ 4 | && apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng-dev libmcrypt-dev \ 5 | && docker-php-ext-install pdo_mysql mysqli mbstring gd iconv 6 | -------------------------------------------------------------------------------- /challenges/FreeToFlag/php/php.ini: -------------------------------------------------------------------------------- 1 | [Date] 2 | date.timezone = "Asia/Tokyo" 3 | [mbstring] 4 | mbstring.internal_encoding = "UTF-8" 5 | mbstring.language = "Japanese" 6 | -------------------------------------------------------------------------------- /challenges/HackEmAll/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/HackEmAll/.DS_Store -------------------------------------------------------------------------------- /challenges/HackEmAll/chall_config.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | echo "Please note that inside docker container service run on port 80, not 9004, configuring HackEmAll..."; docker-compose up -d; -------------------------------------------------------------------------------- /challenges/HackEmAll/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '2' 2 | services: 3 | php: 4 | build: ./php 5 | ports: 6 | - '9004:80' 7 | volumes: 8 | - ./html:/var/www/html 9 | 10 | -------------------------------------------------------------------------------- /challenges/HackEmAll/html/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/HackEmAll/html/.DS_Store -------------------------------------------------------------------------------- /challenges/HackEmAll/html/assets/Flag.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/HackEmAll/html/assets/Flag.png -------------------------------------------------------------------------------- /challenges/HackEmAll/html/assets/Meow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/HackEmAll/html/assets/Meow.png -------------------------------------------------------------------------------- /challenges/HackEmAll/html/assets/Pikachu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/HackEmAll/html/assets/Pikachu.png -------------------------------------------------------------------------------- /challenges/HackEmAll/html/assets/Pippi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/HackEmAll/html/assets/Pippi.png -------------------------------------------------------------------------------- /challenges/HackEmAll/html/assets/Pokedex_Source.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/HackEmAll/html/assets/Pokedex_Source.png -------------------------------------------------------------------------------- /challenges/HackEmAll/html/assets/masterball.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/HackEmAll/html/assets/masterball.jpg -------------------------------------------------------------------------------- /challenges/HackEmAll/html/assets/pokeball.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/HackEmAll/html/assets/pokeball.jpg -------------------------------------------------------------------------------- /challenges/HackEmAll/html/get_more_ball.php: -------------------------------------------------------------------------------- 1 | '; 6 | if (!isset($_SESSION['poke_ball']) or !isset($_SESSION['master_ball'])) 7 | { 8 | die('Are you a trainer?'); 9 | } 10 | 11 | if (isset($_POST['ball']) && $_POST['ball'] === "master_ball") 12 | { 13 | if($_SERVER["REMOTE_ADDR"]==="127.0.0.1" or $_SERVER["REMOTE_ADDR"]==="::1") 14 | { 15 | $_SESSION['master_ball'] += 1; 16 | } 17 | else 18 | { 19 | die('No ball for you!!!'); 20 | } 21 | } 22 | elseif (isset($_POST['ball']) && $_POST['ball'] === "poke_ball") 23 | { 24 | $_SESSION['poke_ball'] += 1; 25 | } 26 | else 27 | { 28 | show_source(__FILE__); 29 | } 30 | 31 | ?> 32 | -------------------------------------------------------------------------------- /challenges/HackEmAll/html/secret.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /challenges/HackEmAll/php/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM php:5-apache 2 | COPY php.ini /usr/local/etc/php/ 3 | RUN apt-get update \ 4 | && apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng-dev libmcrypt-dev libxml2-dev \ 5 | && docker-php-ext-install pdo_mysql mysqli mbstring gd iconv soap 6 | -------------------------------------------------------------------------------- /challenges/HackEmAll/php/php.ini: -------------------------------------------------------------------------------- 1 | [Date] 2 | date.timezone = "Asia/Tokyo" 3 | [mbstring] 4 | mbstring.internal_encoding = "UTF-8" 5 | mbstring.language = "Japanese" 6 | -------------------------------------------------------------------------------- /challenges/IQTest/chall_config.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | echo "configuring IQTest..."; docker-compose up -d; -------------------------------------------------------------------------------- /challenges/IQTest/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '2' 2 | services: 3 | php: 4 | build: ./php 5 | ports: 6 | - '8002:80' 7 | volumes: 8 | - ./html:/var/www/html 9 | 10 | -------------------------------------------------------------------------------- /challenges/IQTest/php/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM php:5-apache 2 | COPY php.ini /usr/local/etc/php/ 3 | RUN apt-get update \ 4 | && apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng-dev libmcrypt-dev \ 5 | && docker-php-ext-install pdo_mysql mysqli mbstring gd iconv 6 | -------------------------------------------------------------------------------- /challenges/IQTest/php/php.ini: -------------------------------------------------------------------------------- 1 | [Date] 2 | date.timezone = "Asia/Tokyo" 3 | [mbstring] 4 | mbstring.internal_encoding = "UTF-8" 5 | mbstring.language = "Japanese" 6 | -------------------------------------------------------------------------------- /challenges/LonelyBoy/chall_config.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | echo "configuring LonelyBoy..."; docker-compose up -d; -------------------------------------------------------------------------------- /challenges/LonelyBoy/docker-compose.yml: -------------------------------------------------------------------------------- 1 | php7: 2 | build: ./php 3 | ports: 4 | - '7001:7001' 5 | links: 6 | - mysql 7 | mysql: 8 | image: mysql:5.7 9 | restart: always 10 | hostname: mysqlserver 11 | expose: 12 | - "3701" 13 | environment: 14 | - MYSQL_ROOT_PASSWORD=111111 15 | - MYSQL_DATABASE=lonelyboy 16 | - MYSQL_USER=root 17 | - MYSQL_PASSWORD=111111 18 | volumes: 19 | - ./database:/docker-entrypoint-initdb.d 20 | -------------------------------------------------------------------------------- /challenges/LonelyBoy/mysql/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mysql:5.7 2 | COPY ./my.cnf /etc/mysql/conf.d/ 3 | -------------------------------------------------------------------------------- /challenges/LonelyBoy/mysql/my.cnf: -------------------------------------------------------------------------------- 1 | [mysqld] 2 | character-set-server=utf8 3 | -------------------------------------------------------------------------------- /challenges/LonelyBoy/php/000-default.conf: -------------------------------------------------------------------------------- 1 | 2 | # The ServerName directive sets the request scheme, hostname and port that 3 | # the server uses to identify itself. This is used when creating 4 | # redirection URLs. In the context of virtual hosts, the ServerName 5 | # specifies what hostname must appear in the request's Host: header to 6 | # match this virtual host. For the default virtual host (this file) this 7 | # value is not decisive as it is used as a last resort host regardless. 8 | # However, you must set it for any further virtual host explicitly. 9 | #ServerName www.example.com 10 | 11 | ServerAdmin webmaster@localhost 12 | DocumentRoot /var/www/html 13 | 14 | # Available loglevels: trace8, ..., trace1, debug, info, notice, warn, 15 | # error, crit, alert, emerg. 16 | # It is also possible to configure the loglevel for particular 17 | # modules, e.g. 18 | #LogLevel info ssl:warn 19 | 20 | ErrorLog ${APACHE_LOG_DIR}/error.log 21 | CustomLog ${APACHE_LOG_DIR}/access.log combined 22 | 23 | # For most configuration files from conf-available/, which are 24 | # enabled or disabled at a global level, it is possible to 25 | # include a line for only one particular virtual host. For example the 26 | # following line enables the CGI configuration for this host only 27 | # after it has been globally disabled with "a2disconf". 28 | #Include conf-available/serve-cgi-bin.conf 29 | 30 | 31 | # vim: syntax=apache ts=4 sw=4 sts=4 sr noet 32 | -------------------------------------------------------------------------------- /challenges/LonelyBoy/php/crontab: -------------------------------------------------------------------------------- 1 | */20 * * * * bash /var/www/crondel.sh 2 | -------------------------------------------------------------------------------- /challenges/LonelyBoy/php/goodjobnowgetyoursfl4g: -------------------------------------------------------------------------------- 1 | MeePwnCTF{_A_B34ut1ful_ExPl01t_1s_4n_ART___} -------------------------------------------------------------------------------- /challenges/LonelyBoy/php/interfaces: -------------------------------------------------------------------------------- 1 | # interfaces(5) file used by ifup(8) and ifdown(8) 2 | auto lo 3 | iface lo inet loopback 4 | dns-nameservers 8.8.8.8 5 | -------------------------------------------------------------------------------- /challenges/LonelyBoy/php/phantomjs/LICENSE.BSD: -------------------------------------------------------------------------------- 1 | Redistribution and use in source and binary forms, with or without 2 | modification, are permitted provided that the following conditions are met: 3 | 4 | * Redistributions of source code must retain the above copyright 5 | notice, this list of conditions and the following disclaimer. 6 | * Redistributions in binary form must reproduce the above copyright 7 | notice, this list of conditions and the following disclaimer in the 8 | documentation and/or other materials provided with the distribution. 9 | * Neither the name of the nor the 10 | names of its contributors may be used to endorse or promote products 11 | derived from this software without specific prior written permission. 12 | 13 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 14 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 16 | ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY 17 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 18 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 19 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 20 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 21 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 22 | THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 | -------------------------------------------------------------------------------- /challenges/LonelyBoy/php/phantomjs/bin/phantomjs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/LonelyBoy/php/phantomjs/bin/phantomjs -------------------------------------------------------------------------------- /challenges/LonelyBoy/php/phantomjs/examples/arguments.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var system = require('system'); 3 | if (system.args.length === 1) { 4 | console.log('Try to pass some args when invoking this script!'); 5 | } else { 6 | system.args.forEach(function (arg, i) { 7 | console.log(i + ': ' + arg); 8 | }); 9 | } 10 | phantom.exit(); 11 | -------------------------------------------------------------------------------- /challenges/LonelyBoy/php/phantomjs/examples/child_process-examples.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var spawn = require("child_process").spawn 3 | var execFile = require("child_process").execFile 4 | 5 | var child = spawn("ls", ["-lF", "/rooot"]) 6 | 7 | child.stdout.on("data", function (data) { 8 | console.log("spawnSTDOUT:", JSON.stringify(data)) 9 | }) 10 | 11 | child.stderr.on("data", function (data) { 12 | console.log("spawnSTDERR:", JSON.stringify(data)) 13 | }) 14 | 15 | child.on("exit", function (code) { 16 | console.log("spawnEXIT:", code) 17 | }) 18 | 19 | //child.kill("SIGKILL") 20 | 21 | execFile("ls", ["-lF", "/usr"], null, function (err, stdout, stderr) { 22 | console.log("execFileSTDOUT:", JSON.stringify(stdout)) 23 | console.log("execFileSTDERR:", JSON.stringify(stderr)) 24 | }) 25 | 26 | setTimeout(function () { 27 | phantom.exit(0) 28 | }, 2000) 29 | -------------------------------------------------------------------------------- /challenges/LonelyBoy/php/phantomjs/examples/colorwheel.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var page = require('webpage').create(); 3 | page.viewportSize = { width: 400, height : 400 }; 4 | page.content = ''; 5 | page.evaluate(function() { 6 | var el = document.getElementById('surface'), 7 | context = el.getContext('2d'), 8 | width = window.innerWidth, 9 | height = window.innerHeight, 10 | cx = width / 2, 11 | cy = height / 2, 12 | radius = width / 2.3, 13 | imageData, 14 | pixels, 15 | hue, sat, value, 16 | i = 0, x, y, rx, ry, d, 17 | f, g, p, u, v, w, rgb; 18 | 19 | el.width = width; 20 | el.height = height; 21 | imageData = context.createImageData(width, height); 22 | pixels = imageData.data; 23 | 24 | for (y = 0; y < height; y = y + 1) { 25 | for (x = 0; x < width; x = x + 1, i = i + 4) { 26 | rx = x - cx; 27 | ry = y - cy; 28 | d = rx * rx + ry * ry; 29 | if (d < radius * radius) { 30 | hue = 6 * (Math.atan2(ry, rx) + Math.PI) / (2 * Math.PI); 31 | sat = Math.sqrt(d) / radius; 32 | g = Math.floor(hue); 33 | f = hue - g; 34 | u = 255 * (1 - sat); 35 | v = 255 * (1 - sat * f); 36 | w = 255 * (1 - sat * (1 - f)); 37 | pixels[i] = [255, v, u, u, w, 255, 255][g]; 38 | pixels[i + 1] = [w, 255, 255, v, u, u, w][g]; 39 | pixels[i + 2] = [u, u, w, 255, 255, v, u][g]; 40 | pixels[i + 3] = 255; 41 | } 42 | } 43 | } 44 | 45 | context.putImageData(imageData, 0, 0); 46 | document.body.style.backgroundColor = 'white'; 47 | document.body.style.margin = '0px'; 48 | }); 49 | 50 | page.render('colorwheel.png'); 51 | 52 | phantom.exit(); 53 | -------------------------------------------------------------------------------- /challenges/LonelyBoy/php/phantomjs/examples/countdown.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var t = 10, 3 | interval = setInterval(function(){ 4 | if ( t > 0 ) { 5 | console.log(t--); 6 | } else { 7 | console.log("BLAST OFF!"); 8 | phantom.exit(); 9 | } 10 | }, 1000); 11 | -------------------------------------------------------------------------------- /challenges/LonelyBoy/php/phantomjs/examples/detectsniff.js: -------------------------------------------------------------------------------- 1 | // Detect if a web page sniffs the user agent or not. 2 | 3 | "use strict"; 4 | var page = require('webpage').create(), 5 | system = require('system'), 6 | sniffed, 7 | address; 8 | 9 | page.onInitialized = function () { 10 | page.evaluate(function () { 11 | 12 | (function () { 13 | var userAgent = window.navigator.userAgent, 14 | platform = window.navigator.platform; 15 | 16 | window.navigator = { 17 | appCodeName: 'Mozilla', 18 | appName: 'Netscape', 19 | cookieEnabled: false, 20 | sniffed: false 21 | }; 22 | 23 | window.navigator.__defineGetter__('userAgent', function () { 24 | window.navigator.sniffed = true; 25 | return userAgent; 26 | }); 27 | 28 | window.navigator.__defineGetter__('platform', function () { 29 | window.navigator.sniffed = true; 30 | return platform; 31 | }); 32 | })(); 33 | }); 34 | }; 35 | 36 | if (system.args.length === 1) { 37 | console.log('Usage: detectsniff.js '); 38 | phantom.exit(1); 39 | } else { 40 | address = system.args[1]; 41 | console.log('Checking ' + address + '...'); 42 | page.open(address, function (status) { 43 | if (status !== 'success') { 44 | console.log('FAIL to load the address'); 45 | phantom.exit(); 46 | } else { 47 | window.setTimeout(function () { 48 | sniffed = page.evaluate(function () { 49 | return navigator.sniffed; 50 | }); 51 | if (sniffed) { 52 | console.log('The page tried to sniff the user agent.'); 53 | } else { 54 | console.log('The page did not try to sniff the user agent.'); 55 | } 56 | phantom.exit(); 57 | }, 1500); 58 | } 59 | }); 60 | } 61 | -------------------------------------------------------------------------------- /challenges/LonelyBoy/php/phantomjs/examples/echoToFile.js: -------------------------------------------------------------------------------- 1 | // echoToFile.js - Write in a given file all the parameters passed on the CLI 2 | "use strict"; 3 | var fs = require('fs'), 4 | system = require('system'); 5 | 6 | if (system.args.length < 3) { 7 | console.log("Usage: echoToFile.js DESTINATION_FILE "); 8 | phantom.exit(1); 9 | } else { 10 | var content = '', 11 | f = null, 12 | i; 13 | for ( i= 2; i < system.args.length; ++i ) { 14 | content += system.args[i] + (i === system.args.length-1 ? '' : ' '); 15 | } 16 | 17 | try { 18 | fs.write(system.args[1], content, 'w'); 19 | } catch(e) { 20 | console.log(e); 21 | } 22 | 23 | phantom.exit(); 24 | } 25 | -------------------------------------------------------------------------------- /challenges/LonelyBoy/php/phantomjs/examples/features.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var feature, supported = [], unsupported = []; 3 | 4 | phantom.injectJs('modernizr.js'); 5 | console.log('Detected features (using Modernizr ' + Modernizr._version + '):'); 6 | for (feature in Modernizr) { 7 | if (Modernizr.hasOwnProperty(feature)) { 8 | if (feature[0] !== '_' && typeof Modernizr[feature] !== 'function' && 9 | feature !== 'input' && feature !== 'inputtypes') { 10 | if (Modernizr[feature]) { 11 | supported.push(feature); 12 | } else { 13 | unsupported.push(feature); 14 | } 15 | } 16 | } 17 | } 18 | 19 | console.log(''); 20 | console.log('Supported:'); 21 | supported.forEach(function (e) { 22 | console.log(' ' + e); 23 | }); 24 | 25 | console.log(''); 26 | console.log('Not supported:'); 27 | unsupported.forEach(function (e) { 28 | console.log(' ' + e); 29 | }); 30 | phantom.exit(); 31 | -------------------------------------------------------------------------------- /challenges/LonelyBoy/php/phantomjs/examples/fibo.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var fibs = [0, 1]; 3 | var ticker = window.setInterval(function () { 4 | console.log(fibs[fibs.length - 1]); 5 | fibs.push(fibs[fibs.length - 1] + fibs[fibs.length - 2]); 6 | if (fibs.length > 10) { 7 | window.clearInterval(ticker); 8 | phantom.exit(); 9 | } 10 | }, 300); 11 | -------------------------------------------------------------------------------- /challenges/LonelyBoy/php/phantomjs/examples/hello.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | console.log('Hello, world!'); 3 | phantom.exit(); 4 | -------------------------------------------------------------------------------- /challenges/LonelyBoy/php/phantomjs/examples/injectme.js: -------------------------------------------------------------------------------- 1 | // Use 'page.injectJs()' to load the script itself in the Page context 2 | 3 | "use strict"; 4 | if ( typeof(phantom) !== "undefined" ) { 5 | var page = require('webpage').create(); 6 | 7 | // Route "console.log()" calls from within the Page context to the main Phantom context (i.e. current "this") 8 | page.onConsoleMessage = function(msg) { 9 | console.log(msg); 10 | }; 11 | 12 | page.onAlert = function(msg) { 13 | console.log(msg); 14 | }; 15 | 16 | console.log("* Script running in the Phantom context."); 17 | console.log("* Script will 'inject' itself in a page..."); 18 | page.open("about:blank", function(status) { 19 | if ( status === "success" ) { 20 | console.log(page.injectJs("injectme.js") ? "... done injecting itself!" : "... fail! Check the $PWD?!"); 21 | } 22 | phantom.exit(); 23 | }); 24 | } else { 25 | alert("* Script running in the Page context."); 26 | } 27 | -------------------------------------------------------------------------------- /challenges/LonelyBoy/php/phantomjs/examples/loadspeed.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var page = require('webpage').create(), 3 | system = require('system'), 4 | t, address; 5 | 6 | if (system.args.length === 1) { 7 | console.log('Usage: loadspeed.js '); 8 | phantom.exit(1); 9 | } else { 10 | t = Date.now(); 11 | address = system.args[1]; 12 | page.open(address, function (status) { 13 | if (status !== 'success') { 14 | console.log('FAIL to load the address'); 15 | } else { 16 | t = Date.now() - t; 17 | console.log('Page title is ' + page.evaluate(function () { 18 | return document.title; 19 | })); 20 | console.log('Loading time ' + t + ' msec'); 21 | } 22 | phantom.exit(); 23 | }); 24 | } 25 | -------------------------------------------------------------------------------- /challenges/LonelyBoy/php/phantomjs/examples/loadurlwithoutcss.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var page = require('webpage').create(), 3 | system = require('system'); 4 | 5 | if (system.args.length < 2) { 6 | console.log('Usage: loadurlwithoutcss.js URL'); 7 | phantom.exit(); 8 | } 9 | 10 | var address = system.args[1]; 11 | 12 | page.onResourceRequested = function(requestData, request) { 13 | if ((/http:\/\/.+?\.css/gi).test(requestData['url']) || requestData.headers['Content-Type'] == 'text/css') { 14 | console.log('The url of the request is matching. Aborting: ' + requestData['url']); 15 | request.abort(); 16 | } 17 | }; 18 | 19 | page.open(address, function(status) { 20 | if (status === 'success') { 21 | phantom.exit(); 22 | } else { 23 | console.log('Unable to load the address!'); 24 | phantom.exit(); 25 | } 26 | }); -------------------------------------------------------------------------------- /challenges/LonelyBoy/php/phantomjs/examples/module.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var universe = require('./universe'); 3 | universe.start(); 4 | console.log('The answer is ' + universe.answer); 5 | phantom.exit(); 6 | -------------------------------------------------------------------------------- /challenges/LonelyBoy/php/phantomjs/examples/netlog.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var page = require('webpage').create(), 3 | system = require('system'), 4 | address; 5 | 6 | if (system.args.length === 1) { 7 | console.log('Usage: netlog.js '); 8 | phantom.exit(1); 9 | } else { 10 | address = system.args[1]; 11 | 12 | page.onResourceRequested = function (req) { 13 | console.log('requested: ' + JSON.stringify(req, undefined, 4)); 14 | }; 15 | 16 | page.onResourceReceived = function (res) { 17 | console.log('received: ' + JSON.stringify(res, undefined, 4)); 18 | }; 19 | 20 | page.open(address, function (status) { 21 | if (status !== 'success') { 22 | console.log('FAIL to load the address'); 23 | } 24 | phantom.exit(); 25 | }); 26 | } 27 | -------------------------------------------------------------------------------- /challenges/LonelyBoy/php/phantomjs/examples/openurlwithproxy.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var page = require('webpage').create(), 3 | system = require('system'), 4 | host, port, address; 5 | 6 | if (system.args.length < 4) { 7 | console.log('Usage: openurlwithproxy.js '); 8 | phantom.exit(1); 9 | } else { 10 | host = system.args[1]; 11 | port = system.args[2]; 12 | address = system.args[3]; 13 | phantom.setProxy(host, port, 'manual', '', ''); 14 | page.open(address, function (status) { 15 | if (status !== 'success') { 16 | console.log('FAIL to load the address "' + 17 | address + '" using proxy "' + host + ':' + port + '"'); 18 | } else { 19 | console.log('Page title is ' + page.evaluate(function () { 20 | return document.title; 21 | })); 22 | } 23 | phantom.exit(); 24 | }); 25 | } 26 | -------------------------------------------------------------------------------- /challenges/LonelyBoy/php/phantomjs/examples/outputEncoding.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | function helloWorld() { 3 | console.log(phantom.outputEncoding + ": こんにちは、世界!"); 4 | } 5 | 6 | console.log("Using default encoding..."); 7 | helloWorld(); 8 | 9 | console.log("\nUsing other encodings..."); 10 | 11 | var encodings = ["euc-jp", "sjis", "utf8", "System"]; 12 | for (var i = 0; i < encodings.length; i++) { 13 | phantom.outputEncoding = encodings[i]; 14 | helloWorld(); 15 | } 16 | 17 | phantom.exit() 18 | -------------------------------------------------------------------------------- /challenges/LonelyBoy/php/phantomjs/examples/pagecallback.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var p = require("webpage").create(); 3 | 4 | p.onConsoleMessage = function(msg) { console.log(msg); }; 5 | 6 | // Calls to "callPhantom" within the page 'p' arrive here 7 | p.onCallback = function(msg) { 8 | console.log("Received by the 'phantom' main context: "+msg); 9 | return "Hello there, I'm coming to you from the 'phantom' context instead"; 10 | }; 11 | 12 | p.evaluate(function() { 13 | // Return-value of the "onCallback" handler arrive here 14 | var callbackResponse = window.callPhantom("Hello, I'm coming to you from the 'page' context"); 15 | console.log("Received by the 'page' context: "+callbackResponse); 16 | }); 17 | 18 | phantom.exit(); 19 | -------------------------------------------------------------------------------- /challenges/LonelyBoy/php/phantomjs/examples/phantomwebintro.js: -------------------------------------------------------------------------------- 1 | // Read the Phantom webpage '#intro' element text using jQuery and "includeJs" 2 | 3 | "use strict"; 4 | var page = require('webpage').create(); 5 | 6 | page.onConsoleMessage = function(msg) { 7 | console.log(msg); 8 | }; 9 | 10 | page.open("http://phantomjs.org/", function(status) { 11 | if (status === "success") { 12 | page.includeJs("http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js", function() { 13 | page.evaluate(function() { 14 | console.log("$(\".explanation\").text() -> " + $(".explanation").text()); 15 | }); 16 | phantom.exit(0); 17 | }); 18 | } else { 19 | phantom.exit(1); 20 | } 21 | }); 22 | -------------------------------------------------------------------------------- /challenges/LonelyBoy/php/phantomjs/examples/post.js: -------------------------------------------------------------------------------- 1 | // Example using HTTP POST operation 2 | 3 | "use strict"; 4 | var page = require('webpage').create(), 5 | server = 'http://posttestserver.com/post.php?dump', 6 | data = 'universe=expanding&answer=42'; 7 | 8 | page.open(server, 'post', data, function (status) { 9 | if (status !== 'success') { 10 | console.log('Unable to post!'); 11 | } else { 12 | console.log(page.content); 13 | } 14 | phantom.exit(); 15 | }); 16 | -------------------------------------------------------------------------------- /challenges/LonelyBoy/php/phantomjs/examples/postjson.js: -------------------------------------------------------------------------------- 1 | // Example using HTTP POST operation 2 | 3 | "use strict"; 4 | var page = require('webpage').create(), 5 | server = 'http://posttestserver.com/post.php?dump', 6 | data = '{"universe": "expanding", "answer": 42}'; 7 | 8 | var headers = { 9 | "Content-Type": "application/json" 10 | } 11 | 12 | page.open(server, 'post', data, headers, function (status) { 13 | if (status !== 'success') { 14 | console.log('Unable to post!'); 15 | } else { 16 | console.log(page.content); 17 | } 18 | phantom.exit(); 19 | }); 20 | -------------------------------------------------------------------------------- /challenges/LonelyBoy/php/phantomjs/examples/postserver.js: -------------------------------------------------------------------------------- 1 | // Example using HTTP POST operation 2 | 3 | "use strict"; 4 | var page = require('webpage').create(), 5 | server = require('webserver').create(), 6 | system = require('system'), 7 | data = 'universe=expanding&answer=42'; 8 | 9 | if (system.args.length !== 2) { 10 | console.log('Usage: postserver.js '); 11 | phantom.exit(1); 12 | } 13 | 14 | var port = system.args[1]; 15 | 16 | service = server.listen(port, function (request, response) { 17 | console.log('Request received at ' + new Date()); 18 | 19 | response.statusCode = 200; 20 | response.headers = { 21 | 'Cache': 'no-cache', 22 | 'Content-Type': 'text/plain;charset=utf-8' 23 | }; 24 | response.write(JSON.stringify(request, null, 4)); 25 | response.close(); 26 | }); 27 | 28 | page.open('http://localhost:' + port + '/', 'post', data, function (status) { 29 | if (status !== 'success') { 30 | console.log('Unable to post!'); 31 | } else { 32 | console.log(page.plainText); 33 | } 34 | phantom.exit(); 35 | }); 36 | -------------------------------------------------------------------------------- /challenges/LonelyBoy/php/phantomjs/examples/printenv.js: -------------------------------------------------------------------------------- 1 | var system = require('system'), 2 | env = system.env, 3 | key; 4 | 5 | for (key in env) { 6 | if (env.hasOwnProperty(key)) { 7 | console.log(key + '=' + env[key]); 8 | } 9 | } 10 | phantom.exit(); 11 | -------------------------------------------------------------------------------- /challenges/LonelyBoy/php/phantomjs/examples/printmargins.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var page = require('webpage').create(), 3 | system = require('system'); 4 | 5 | if (system.args.length < 7) { 6 | console.log('Usage: printmargins.js URL filename LEFT TOP RIGHT BOTTOM'); 7 | console.log(' margin examples: "1cm", "10px", "7mm", "5in"'); 8 | phantom.exit(1); 9 | } else { 10 | var address = system.args[1]; 11 | var output = system.args[2]; 12 | var marginLeft = system.args[3]; 13 | var marginTop = system.args[4]; 14 | var marginRight = system.args[5]; 15 | var marginBottom = system.args[6]; 16 | page.viewportSize = { width: 600, height: 600 }; 17 | page.paperSize = { 18 | format: 'A4', 19 | margin: { 20 | left: marginLeft, 21 | top: marginTop, 22 | right: marginRight, 23 | bottom: marginBottom 24 | } 25 | }; 26 | page.open(address, function (status) { 27 | if (status !== 'success') { 28 | console.log('Unable to load the address!'); 29 | } else { 30 | window.setTimeout(function () { 31 | page.render(output); 32 | phantom.exit(); 33 | }, 200); 34 | } 35 | }); 36 | } 37 | -------------------------------------------------------------------------------- /challenges/LonelyBoy/php/phantomjs/examples/scandir.js: -------------------------------------------------------------------------------- 1 | // List all the files in a Tree of Directories 2 | 3 | "use strict"; 4 | var system = require('system'); 5 | 6 | if (system.args.length !== 2) { 7 | console.log("Usage: phantomjs scandir.js DIRECTORY_TO_SCAN"); 8 | phantom.exit(1); 9 | } 10 | 11 | var scanDirectory = function (path) { 12 | var fs = require('fs'); 13 | if (fs.exists(path) && fs.isFile(path)) { 14 | console.log(path); 15 | } else if (fs.isDirectory(path)) { 16 | fs.list(path).forEach(function (e) { 17 | if ( e !== "." && e !== ".." ) { //< Avoid loops 18 | scanDirectory(path + '/' + e); 19 | } 20 | }); 21 | } 22 | }; 23 | scanDirectory(system.args[1]); 24 | phantom.exit(); 25 | -------------------------------------------------------------------------------- /challenges/LonelyBoy/php/phantomjs/examples/server.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var page = require('webpage').create(); 3 | var server = require('webserver').create(); 4 | var system = require('system'); 5 | var host, port; 6 | 7 | if (system.args.length !== 2) { 8 | console.log('Usage: server.js '); 9 | phantom.exit(1); 10 | } else { 11 | port = system.args[1]; 12 | var listening = server.listen(port, function (request, response) { 13 | console.log("GOT HTTP REQUEST"); 14 | console.log(JSON.stringify(request, null, 4)); 15 | 16 | // we set the headers here 17 | response.statusCode = 200; 18 | response.headers = {"Cache": "no-cache", "Content-Type": "text/html"}; 19 | // this is also possible: 20 | response.setHeader("foo", "bar"); 21 | // now we write the body 22 | // note: the headers above will now be sent implictly 23 | response.write("YES!"); 24 | // note: writeBody can be called multiple times 25 | response.write("

pretty cool :)"); 26 | response.close(); 27 | }); 28 | if (!listening) { 29 | console.log("could not create web server listening on port " + port); 30 | phantom.exit(); 31 | } 32 | var url = "http://localhost:" + port + "/foo/bar.php?asdf=true"; 33 | console.log("SENDING REQUEST TO:"); 34 | console.log(url); 35 | page.open(url, function (status) { 36 | if (status !== 'success') { 37 | console.log('FAIL to load the address'); 38 | } else { 39 | console.log("GOT REPLY FROM SERVER:"); 40 | console.log(page.content); 41 | } 42 | phantom.exit(); 43 | }); 44 | } 45 | -------------------------------------------------------------------------------- /challenges/LonelyBoy/php/phantomjs/examples/serverkeepalive.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var port, server, service, 3 | system = require('system'); 4 | 5 | if (system.args.length !== 2) { 6 | console.log('Usage: serverkeepalive.js '); 7 | phantom.exit(1); 8 | } else { 9 | port = system.args[1]; 10 | server = require('webserver').create(); 11 | 12 | service = server.listen(port, { keepAlive: true }, function (request, response) { 13 | console.log('Request at ' + new Date()); 14 | console.log(JSON.stringify(request, null, 4)); 15 | 16 | var body = JSON.stringify(request, null, 4); 17 | response.statusCode = 200; 18 | response.headers = { 19 | 'Cache': 'no-cache', 20 | 'Content-Type': 'text/plain', 21 | 'Connection': 'Keep-Alive', 22 | 'Keep-Alive': 'timeout=5, max=100', 23 | 'Content-Length': body.length 24 | }; 25 | response.write(body); 26 | response.close(); 27 | }); 28 | 29 | if (service) { 30 | console.log('Web server running on port ' + port); 31 | } else { 32 | console.log('Error: Could not create web server listening on port ' + port); 33 | phantom.exit(); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /challenges/LonelyBoy/php/phantomjs/examples/simpleserver.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var port, server, service, 3 | system = require('system'); 4 | 5 | if (system.args.length !== 2) { 6 | console.log('Usage: simpleserver.js '); 7 | phantom.exit(1); 8 | } else { 9 | port = system.args[1]; 10 | server = require('webserver').create(); 11 | 12 | service = server.listen(port, function (request, response) { 13 | 14 | console.log('Request at ' + new Date()); 15 | console.log(JSON.stringify(request, null, 4)); 16 | 17 | response.statusCode = 200; 18 | response.headers = { 19 | 'Cache': 'no-cache', 20 | 'Content-Type': 'text/html' 21 | }; 22 | response.write(''); 23 | response.write(''); 24 | response.write('Hello, world!'); 25 | response.write(''); 26 | response.write(''); 27 | response.write('

This is from PhantomJS web server.

'); 28 | response.write('

Request data:

'); 29 | response.write('
');
30 |         response.write(JSON.stringify(request, null, 4));
31 |         response.write('
'); 32 | response.write(''); 33 | response.write(''); 34 | response.close(); 35 | }); 36 | 37 | if (service) { 38 | console.log('Web server running on port ' + port); 39 | } else { 40 | console.log('Error: Could not create web server listening on port ' + port); 41 | phantom.exit(); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /challenges/LonelyBoy/php/phantomjs/examples/sleepsort.js: -------------------------------------------------------------------------------- 1 | // sleepsort.js - Sort integers from the commandline in a very ridiculous way: leveraging timeouts :P 2 | 3 | "use strict"; 4 | var system = require('system'); 5 | 6 | function sleepSort(array, callback) { 7 | var sortedCount = 0, 8 | i, len; 9 | for ( i = 0, len = array.length; i < len; ++i ) { 10 | setTimeout((function(j){ 11 | return function() { 12 | console.log(array[j]); 13 | ++sortedCount; 14 | (len === sortedCount) && callback(); 15 | }; 16 | }(i)), array[i]); 17 | } 18 | } 19 | 20 | if ( system.args.length < 2 ) { 21 | console.log("Usage: phantomjs sleepsort.js PUT YOUR INTEGERS HERE SEPARATED BY SPACES"); 22 | phantom.exit(1); 23 | } else { 24 | sleepSort(system.args.slice(1), function() { 25 | phantom.exit(); 26 | }); 27 | } 28 | -------------------------------------------------------------------------------- /challenges/LonelyBoy/php/phantomjs/examples/stdin-stdout-stderr.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var system = require('system'); 3 | 4 | system.stdout.write('Hello, system.stdout.write!'); 5 | system.stdout.writeLine('\nHello, system.stdout.writeLine!'); 6 | 7 | system.stderr.write('Hello, system.stderr.write!'); 8 | system.stderr.writeLine('\nHello, system.stderr.writeLine!'); 9 | 10 | system.stdout.writeLine('system.stdin.readLine(): '); 11 | var line = system.stdin.readLine(); 12 | system.stdout.writeLine(JSON.stringify(line)); 13 | 14 | // This is essentially a `readAll` 15 | system.stdout.writeLine('system.stdin.read(5): (ctrl+D to end)'); 16 | var input = system.stdin.read(5); 17 | system.stdout.writeLine(JSON.stringify(input)); 18 | 19 | phantom.exit(0); 20 | -------------------------------------------------------------------------------- /challenges/LonelyBoy/php/phantomjs/examples/universe.js: -------------------------------------------------------------------------------- 1 | // This is to be used by "module.js" (and "module.coffee") example(s). 2 | // There should NOT be a "universe.coffee" as only 1 of the 2 would 3 | // ever be loaded unless the file extension was specified. 4 | 5 | "use strict"; 6 | exports.answer = 42; 7 | 8 | exports.start = function () { 9 | console.log('Starting the universe....'); 10 | } 11 | -------------------------------------------------------------------------------- /challenges/LonelyBoy/php/phantomjs/examples/unrandomize.js: -------------------------------------------------------------------------------- 1 | // Modify global object at the page initialization. 2 | // In this example, effectively Math.random() always returns 0.42. 3 | 4 | "use strict"; 5 | var page = require('webpage').create(); 6 | 7 | page.onInitialized = function () { 8 | page.evaluate(function () { 9 | Math.random = function() { 10 | return 42 / 100; 11 | }; 12 | }); 13 | }; 14 | 15 | page.open('http://ariya.github.com/js/random/', function (status) { 16 | var result; 17 | if (status !== 'success') { 18 | console.log('Network error.'); 19 | } else { 20 | console.log(page.evaluate(function () { 21 | return document.getElementById('numbers').textContent; 22 | })); 23 | } 24 | phantom.exit(); 25 | }); 26 | -------------------------------------------------------------------------------- /challenges/LonelyBoy/php/phantomjs/examples/useragent.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var page = require('webpage').create(); 3 | console.log('The default user agent is ' + page.settings.userAgent); 4 | page.settings.userAgent = 'SpecialAgent'; 5 | page.open('http://www.httpuseragent.org', function (status) { 6 | if (status !== 'success') { 7 | console.log('Unable to access network'); 8 | } else { 9 | var ua = page.evaluate(function () { 10 | return document.getElementById('myagent').innerText; 11 | }); 12 | console.log(ua); 13 | } 14 | phantom.exit(); 15 | }); 16 | -------------------------------------------------------------------------------- /challenges/LonelyBoy/php/phantomjs/examples/version.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | console.log('using PhantomJS version ' + 3 | phantom.version.major + '.' + 4 | phantom.version.minor + '.' + 5 | phantom.version.patch); 6 | phantom.exit(); 7 | -------------------------------------------------------------------------------- /challenges/LonelyBoy/php/phantomjs/third-party.txt: -------------------------------------------------------------------------------- 1 | This document contains the list of Third Party Software included with 2 | PhantomJS, along with the license information. 3 | 4 | Third Party Software may impose additional restrictions and it is the 5 | user's responsibility to ensure that they have met the licensing 6 | requirements of PhantomJS and the relevant license of the Third Party 7 | Software they are using. 8 | 9 | Qt - http://qt-project.org/ 10 | License: GNU Lesser General Public License (LGPL) version 2.1. 11 | Reference: http://qt-project.org/doc/qt-4.8/lgpl.html. 12 | 13 | WebKit - http://www.webkit.org/ 14 | License: GNU Lesser General Public License (LGPL) version 2.1 and BSD. 15 | Reference: http://www.webkit.org/coding/lgpl-license.html and 16 | http://www.webkit.org/coding/bsd-license.html. 17 | 18 | Mongoose - https://github.com/cesanta/mongoose 19 | License: MIT 20 | Reference: https://github.com/cesanta/mongoose/commit/abbf27338ef554cce0281ac157aa71a9c1b82a55 21 | 22 | OpenSSL - http://www.openssl.org/ 23 | License: OpenSSL License, SSLeay License. 24 | Reference: http://www.openssl.org/source/license.html. 25 | 26 | Linenoise - https://github.com/tadmarshall/linenoise 27 | License: BSD. 28 | Reference: https://github.com/tadmarshall/linenoise/blob/master/linenoise.h. 29 | 30 | QCommandLine - http://xf.iksaif.net/dev/qcommandline.html 31 | License: GNU Lesser General Public License (LGPL) version 2.1. 32 | Reference: http://dev.iksaif.net/projects/qcommandline/repository/revisions/master/entry/COPYING 33 | 34 | wkhtmlpdf - http://code.google.com/p/wkhtmltopdf/ 35 | License: GNU Lesser General Public License (LGPL) 36 | Reference: http://code.google.com/p/wkhtmltopdf/ 37 | -------------------------------------------------------------------------------- /challenges/LonelyBoy/php/php7.1-fpm.conf: -------------------------------------------------------------------------------- 1 | 2 | Require all granted 3 | 4 | 5 | 6 | AddHandler php7-fcgi .php 7 | Action php7-fcgi /php7-fcgi 8 | Alias /php7-fcgi /usr/lib/cgi-bin/php7-fcgi 9 | FastCgiExternalServer /usr/lib/cgi-bin/php7-fcgi -socket /var/run/php/php7.1-fpm.sock -pass-header Authorization -idle-timeout 3600 10 | 11 | -------------------------------------------------------------------------------- /challenges/LonelyBoy/php/ports.conf: -------------------------------------------------------------------------------- 1 | # If you just change the port or add more ports here, you will likely also 2 | # have to change the VirtualHost statement in 3 | # /etc/apache2/sites-enabled/000-default.conf 4 | 5 | Listen 7001 6 | 7 | 8 | Listen 7001 9 | 10 | 11 | 12 | Listen 7001 13 | 14 | 15 | # vim: syntax=apache ts=4 sw=4 sts=4 sr noet 16 | -------------------------------------------------------------------------------- /challenges/LonelyBoy/php/resolv.conf: -------------------------------------------------------------------------------- 1 | nameserver 8.8.8.8 2 | nameserver 8.8.4.4 3 | -------------------------------------------------------------------------------- /challenges/LonelyBoy/php/shell.sh: -------------------------------------------------------------------------------- 1 | 2 | #!/bin/bash 3 | /var/www/cron350.sh & 4 | -------------------------------------------------------------------------------- /challenges/LonelyBoy/php/source/www/cron.php: -------------------------------------------------------------------------------- 1 | link: '.$link; 25 | 26 | //phantomjs here 27 | if (!empty($link)) 28 | { 29 | $cmd="phantomjs /var/www/something.js ".$link; 30 | system($cmd); 31 | } 32 | 33 | //then delete 34 | mysqli_query($conn,"DELETE FROM saved_link WHERE id=$id"); 35 | 36 | /* 37 | CREATE TABLE saved_link ( 38 | id int NOT NULL AUTO_INCREMENT, 39 | link varchar(500) NOT NULL, 40 | PRIMARY KEY (id) 41 | ); 42 | */ 43 | ?> 44 | -------------------------------------------------------------------------------- /challenges/LonelyBoy/php/source/www/cron350.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | sleep 100 3 | while : 4 | do 5 | sleep 1 6 | php /var/www/cron.php || break 7 | done 8 | 9 | 10 | -------------------------------------------------------------------------------- /challenges/LonelyBoy/php/source/www/crondel.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | rm -rf /var/www/html/upload/* 4 | -------------------------------------------------------------------------------- /challenges/LonelyBoy/php/source/www/html/assets/css/index.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /challenges/LonelyBoy/php/source/www/html/assets/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/LonelyBoy/php/source/www/html/assets/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /challenges/LonelyBoy/php/source/www/html/assets/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/LonelyBoy/php/source/www/html/assets/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /challenges/LonelyBoy/php/source/www/html/assets/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/LonelyBoy/php/source/www/html/assets/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /challenges/LonelyBoy/php/source/www/html/assets/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/LonelyBoy/php/source/www/html/assets/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /challenges/LonelyBoy/php/source/www/html/assets/fonts/index.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /challenges/LonelyBoy/php/source/www/html/assets/index.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /challenges/LonelyBoy/php/source/www/html/assets/js/index.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /challenges/LonelyBoy/php/source/www/html/assets/js/npm.js: -------------------------------------------------------------------------------- 1 | // This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment. 2 | require('../../js/transition.js') 3 | require('../../js/alert.js') 4 | require('../../js/button.js') 5 | require('../../js/carousel.js') 6 | require('../../js/collapse.js') 7 | require('../../js/dropdown.js') 8 | require('../../js/modal.js') 9 | require('../../js/tooltip.js') 10 | require('../../js/popover.js') 11 | require('../../js/scrollspy.js') 12 | require('../../js/tab.js') 13 | require('../../js/affix.js') -------------------------------------------------------------------------------- /challenges/LonelyBoy/php/source/www/html/dbconnect.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /challenges/LonelyBoy/php/source/www/something.js: -------------------------------------------------------------------------------- 1 | var page = require('webpage').create(); 2 | var system = require('system'); 3 | var login="http://localhost:7001/index.php" 4 | var data="email=admin@gmail.com&pass=t_Su__I_s_N_o1&btn-login=" 5 | var url=system.args[1]; 6 | page.open(login,'post',data, function (status) { 7 | if (status !== 'success') { 8 | console.log('fail!'); 9 | phantom.exit(1); 10 | } else { 11 | page.evaluate(function(){ 12 | 13 | }); 14 | setTimeout(function(){ 15 | page.open(url, function(status){ 16 | if (status !== "success") { 17 | console.log('fail2'); 18 | phantom.exit(1); 19 | return; 20 | } 21 | //page.render('page.png'); 22 | console.log('finished!'); 23 | phantom.exit(); 24 | }); 25 | }, 500); 26 | } 27 | }); 28 | -------------------------------------------------------------------------------- /challenges/MaplStory/chall_config.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | echo "configuring MaplStory..."; docker-compose up -d; -------------------------------------------------------------------------------- /challenges/MaplStory/docker-compose.yml: -------------------------------------------------------------------------------- 1 | mysql: 2 | image: mysql:5.7 3 | volumes: 4 | - ./db_data:/var/lib/mysql 5 | restart: always 6 | hostname: mysqlserver 7 | environment: 8 | - MYSQL_ROOT_PASSWORD=tsu_tsu_tsu_tsu 9 | - MYSQL_DATABASE=mapl_story 10 | - MYSQL_USER=tsug0d 11 | - MYSQL_PASSWORD=chin_chan_chon 12 | volumes: 13 | - ./sql_dump/:/docker-entrypoint-initdb.d 14 | expose: 15 | - "3703" 16 | 17 | nginx-php-fpm: 18 | build: ./php 19 | cap_add: 20 | - ALL 21 | links: 22 | - mysql:mysql 23 | ports: 24 | - "7003:80" 25 | - "4444:443" 26 | restart: always 27 | environment: 28 | - DB_HOST=mysqlserver 29 | 30 | -------------------------------------------------------------------------------- /challenges/MaplStory/php/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM antonienko/nginx-php-fpm 2 | COPY ./src/www/public /var/www/public 3 | ADD configuration.sh /tmp/configuration.sh 4 | RUN chmod 777 /tmp/configuration.sh 5 | CMD /tmp/configuration.sh 6 | -------------------------------------------------------------------------------- /challenges/MaplStory/php/configuration.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | chmod 777 /var/www/public/upload 3 | chattr +i /var/www/public/upload/index.php 4 | sh /start.sh 5 | -------------------------------------------------------------------------------- /challenges/MaplStory/php/src/www/public/assets/background.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/MaplStory/php/src/www/public/assets/background.jpg -------------------------------------------------------------------------------- /challenges/MaplStory/php/src/www/public/assets/css/index.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /challenges/MaplStory/php/src/www/public/assets/css/style.css: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | /* CSS Document */ 3 | 4 | *{ 5 | margin:0; 6 | padding:0; 7 | } 8 | #login-form { 9 | margin:5% auto; 10 | max-width:500px; 11 | } 12 | /* home page */ 13 | #wrapper{ 14 | padding-top:50px; 15 | } 16 | 17 | @font-face { 18 | font-family: pagetitle; 19 | src: url('assets/fonts/maple.ttf'); 20 | } 21 | 22 | h1#pagetitle { 23 | font-family: pagetitle; 24 | } 25 | 26 | @font-face { 27 | font-family: charactername; 28 | src: url('assets/fonts/maple_character_name.ttf'); 29 | } 30 | 31 | h2#charactername { 32 | font-family: charactername; 33 | } 34 | 35 | input[type=submit]:hover { 36 | background-color: #45a049; 37 | } 38 | 39 | .cenback { 40 | height: 90vh; 41 | background-size: cover; 42 | } -------------------------------------------------------------------------------- /challenges/MaplStory/php/src/www/public/assets/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/MaplStory/php/src/www/public/assets/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /challenges/MaplStory/php/src/www/public/assets/fonts/index.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /challenges/MaplStory/php/src/www/public/assets/fonts/main.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/MaplStory/php/src/www/public/assets/fonts/main.woff -------------------------------------------------------------------------------- /challenges/MaplStory/php/src/www/public/assets/fonts/maple.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/MaplStory/php/src/www/public/assets/fonts/maple.woff -------------------------------------------------------------------------------- /challenges/MaplStory/php/src/www/public/assets/fonts/maple_character_name.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/MaplStory/php/src/www/public/assets/fonts/maple_character_name.woff -------------------------------------------------------------------------------- /challenges/MaplStory/php/src/www/public/assets/fonts/menu.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/MaplStory/php/src/www/public/assets/fonts/menu.woff -------------------------------------------------------------------------------- /challenges/MaplStory/php/src/www/public/assets/freemarket.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/MaplStory/php/src/www/public/assets/freemarket.mp3 -------------------------------------------------------------------------------- /challenges/MaplStory/php/src/www/public/assets/image/chubby.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/MaplStory/php/src/www/public/assets/image/chubby.gif -------------------------------------------------------------------------------- /challenges/MaplStory/php/src/www/public/assets/image/default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/MaplStory/php/src/www/public/assets/image/default.png -------------------------------------------------------------------------------- /challenges/MaplStory/php/src/www/public/assets/image/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/MaplStory/php/src/www/public/assets/image/logo.png -------------------------------------------------------------------------------- /challenges/MaplStory/php/src/www/public/assets/image/npc_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/MaplStory/php/src/www/public/assets/image/npc_1.png -------------------------------------------------------------------------------- /challenges/MaplStory/php/src/www/public/assets/image/npc_2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/MaplStory/php/src/www/public/assets/image/npc_2.gif -------------------------------------------------------------------------------- /challenges/MaplStory/php/src/www/public/assets/image/npc_3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/MaplStory/php/src/www/public/assets/image/npc_3.gif -------------------------------------------------------------------------------- /challenges/MaplStory/php/src/www/public/assets/image/npc_4.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/MaplStory/php/src/www/public/assets/image/npc_4.gif -------------------------------------------------------------------------------- /challenges/MaplStory/php/src/www/public/assets/image/npc_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/MaplStory/php/src/www/public/assets/image/npc_5.png -------------------------------------------------------------------------------- /challenges/MaplStory/php/src/www/public/assets/image/pet/babydragon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/MaplStory/php/src/www/public/assets/image/pet/babydragon.png -------------------------------------------------------------------------------- /challenges/MaplStory/php/src/www/public/assets/image/pet/blackpig.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/MaplStory/php/src/www/public/assets/image/pet/blackpig.png -------------------------------------------------------------------------------- /challenges/MaplStory/php/src/www/public/assets/image/pet/brownkitty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/MaplStory/php/src/www/public/assets/image/pet/brownkitty.png -------------------------------------------------------------------------------- /challenges/MaplStory/php/src/www/public/assets/image/pet/brownpuppy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/MaplStory/php/src/www/public/assets/image/pet/brownpuppy.png -------------------------------------------------------------------------------- /challenges/MaplStory/php/src/www/public/assets/image/pet/goldenpig.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/MaplStory/php/src/www/public/assets/image/pet/goldenpig.png -------------------------------------------------------------------------------- /challenges/MaplStory/php/src/www/public/assets/image/pet/husky.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/MaplStory/php/src/www/public/assets/image/pet/husky.png -------------------------------------------------------------------------------- /challenges/MaplStory/php/src/www/public/assets/image/pet/jrbalrog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/MaplStory/php/src/www/public/assets/image/pet/jrbalrog.png -------------------------------------------------------------------------------- /challenges/MaplStory/php/src/www/public/assets/image/pet/jrreaper.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/MaplStory/php/src/www/public/assets/image/pet/jrreaper.png -------------------------------------------------------------------------------- /challenges/MaplStory/php/src/www/public/assets/image/pet/minikargo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/MaplStory/php/src/www/public/assets/image/pet/minikargo.png -------------------------------------------------------------------------------- /challenges/MaplStory/php/src/www/public/assets/image/pet/panda.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/MaplStory/php/src/www/public/assets/image/pet/panda.png -------------------------------------------------------------------------------- /challenges/MaplStory/php/src/www/public/assets/image/pet/penguin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/MaplStory/php/src/www/public/assets/image/pet/penguin.png -------------------------------------------------------------------------------- /challenges/MaplStory/php/src/www/public/assets/image/pet/rudolph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/MaplStory/php/src/www/public/assets/image/pet/rudolph.png -------------------------------------------------------------------------------- /challenges/MaplStory/php/src/www/public/assets/image/spearman.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/MaplStory/php/src/www/public/assets/image/spearman.png -------------------------------------------------------------------------------- /challenges/MaplStory/php/src/www/public/assets/image/thief.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/MaplStory/php/src/www/public/assets/image/thief.png -------------------------------------------------------------------------------- /challenges/MaplStory/php/src/www/public/assets/image/wrong.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/MaplStory/php/src/www/public/assets/image/wrong.jpg -------------------------------------------------------------------------------- /challenges/MaplStory/php/src/www/public/assets/index.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /challenges/MaplStory/php/src/www/public/assets/js/index.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /challenges/MaplStory/php/src/www/public/assets/js/npm.js: -------------------------------------------------------------------------------- 1 | // This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment. 2 | require('../../js/transition.js') 3 | require('../../js/alert.js') 4 | require('../../js/button.js') 5 | require('../../js/carousel.js') 6 | require('../../js/collapse.js') 7 | require('../../js/dropdown.js') 8 | require('../../js/modal.js') 9 | require('../../js/tooltip.js') 10 | require('../../js/popover.js') 11 | require('../../js/scrollspy.js') 12 | require('../../js/tab.js') 13 | require('../../js/affix.js') -------------------------------------------------------------------------------- /challenges/MaplStory/php/src/www/public/assets/maplcursor.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/MaplStory/php/src/www/public/assets/maplcursor.cur -------------------------------------------------------------------------------- /challenges/MaplStory/php/src/www/public/assets/maple_story.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/MaplStory/php/src/www/public/assets/maple_story.swf -------------------------------------------------------------------------------- /challenges/MaplStory/php/src/www/public/dbconnect.php: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | EOF; 12 | die($wrong); 13 | } 14 | 15 | ?> -------------------------------------------------------------------------------- /challenges/MaplStory/php/src/www/public/index.php: -------------------------------------------------------------------------------- 1 | $value) 20 | { 21 | if (is_array($value)) 22 | { 23 | mapl_die(); 24 | } 25 | $value=bad_words($value); 26 | $_GET[$key]=$value; 27 | } 28 | 29 | foreach($_POST as $key2=>$value2) 30 | { 31 | if (is_array($value2)) 32 | { 33 | mapl_die(); 34 | } 35 | $value2=bad_words($value2); 36 | $_POST[$key2]=$value2; 37 | } 38 | 39 | 40 | if(isset($_GET['page']) && !empty($_GET['page'])) 41 | { 42 | include($_GET['page']); 43 | } 44 | else 45 | { 46 | header("Location: ?page=login.php"); 47 | } 48 | 49 | ?> 50 | 51 | 52 | -------------------------------------------------------------------------------- /challenges/MaplStory/php/src/www/public/logout.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /challenges/MaplStory/php/src/www/public/upload/75834e75aa2c2e500a84e4cdc10986fc/jrbalrog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/MaplStory/php/src/www/public/upload/75834e75aa2c2e500a84e4cdc10986fc/jrbalrog.png -------------------------------------------------------------------------------- /challenges/MaplStory/php/src/www/public/upload/75834e75aa2c2e500a84e4cdc10986fc/jrreaper.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/MaplStory/php/src/www/public/upload/75834e75aa2c2e500a84e4cdc10986fc/jrreaper.png -------------------------------------------------------------------------------- /challenges/MaplStory/php/src/www/public/upload/75834e75aa2c2e500a84e4cdc10986fc/minikargo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/MaplStory/php/src/www/public/upload/75834e75aa2c2e500a84e4cdc10986fc/minikargo.png -------------------------------------------------------------------------------- /challenges/MaplStory/php/src/www/public/upload/75834e75aa2c2e500a84e4cdc10986fc/penguin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/MaplStory/php/src/www/public/upload/75834e75aa2c2e500a84e4cdc10986fc/penguin.png -------------------------------------------------------------------------------- /challenges/MaplStory/php/src/www/public/upload/75834e75aa2c2e500a84e4cdc10986fc/rudolph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/MaplStory/php/src/www/public/upload/75834e75aa2c2e500a84e4cdc10986fc/rudolph.png -------------------------------------------------------------------------------- /challenges/MaplStory/php/src/www/public/upload/index.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /challenges/MaplStory/sql_dump/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | mysql -u root -ptsu_tsu_tsu_tsu mapl_story < database.sql 3 | -------------------------------------------------------------------------------- /challenges/NumberMakeup/chall_config.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | echo "configuring NumberMakeup..."; docker-compose up -d; -------------------------------------------------------------------------------- /challenges/NumberMakeup/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '2' 2 | services: 3 | php: 4 | build: ./php 5 | ports: 6 | - '9002:80' 7 | volumes: 8 | - ./html:/var/www/html 9 | 10 | -------------------------------------------------------------------------------- /challenges/NumberMakeup/html/assets/galaxy.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/NumberMakeup/html/assets/galaxy.jpg -------------------------------------------------------------------------------- /challenges/NumberMakeup/html/assets/index.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/NumberMakeup/html/assets/index.php -------------------------------------------------------------------------------- /challenges/NumberMakeup/html/assets/tsu_layout.css: -------------------------------------------------------------------------------- 1 | * { 2 | box-sizing: border-box; 3 | } 4 | 5 | body { 6 | margin: 0; 7 | } 8 | 9 | /* Style the header */ 10 | .header { 11 | background-color: #f1f1f1; 12 | padding: 20px; 13 | text-align: center; 14 | } 15 | 16 | /* Style the top navigation bar */ 17 | .topnav { 18 | overflow: hidden; 19 | background-color: #333; 20 | } 21 | 22 | /* Style the topnav links */ 23 | .topnav a { 24 | float: right; 25 | display: block; 26 | color: #f2f2f2; 27 | text-align: center; 28 | padding: 14px 16px; 29 | text-decoration: none; 30 | } 31 | 32 | /* Change color on hover */ 33 | .topnav a:hover { 34 | background-color: #ddd; 35 | color: black; 36 | } -------------------------------------------------------------------------------- /challenges/NumberMakeup/html/index.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |
7 | Report Bug 8 | Product 9 | Home 10 |
11 | 12 |


Hello h4x0rs, we've created NumberMakeup, pls buy our product we are too poor...


13 |
14 | 15 | 16 | -------------------------------------------------------------------------------- /challenges/NumberMakeup/html/report.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |
7 | Report Bug 8 | Product 9 | Home 10 |
11 | 12 | 29 | 30 |

31 | 32 |

if you can pop up an alert, you win, no need to find flag!

33 |

34 | 35 | 36 | -------------------------------------------------------------------------------- /challenges/NumberMakeup/php/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM php:5-apache 2 | COPY php.ini /usr/local/etc/php/ 3 | RUN apt-get update \ 4 | && apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng-dev libmcrypt-dev \ 5 | && docker-php-ext-install pdo_mysql mysqli mbstring gd iconv 6 | -------------------------------------------------------------------------------- /challenges/NumberMakeup/php/php.ini: -------------------------------------------------------------------------------- 1 | [Date] 2 | date.timezone = "Asia/Tokyo" 3 | [mbstring] 4 | mbstring.internal_encoding = "UTF-8" 5 | mbstring.language = "Japanese" 6 | -------------------------------------------------------------------------------- /challenges/OmegaSector/chall_config.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | echo "configuring OmegaSector..."; 3 | docker-compose up -d; 4 | wait $(pgrep docker-compose); 5 | docker exec -it $(docker ps -aqf "name=omegasector_php") chmod 777 /var/www/html/alien_message; 6 | docker exec -it $(docker ps -aqf "name=omegasector_php") chmod 777 /var/www/html/human_message; -------------------------------------------------------------------------------- /challenges/OmegaSector/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '2' 2 | services: 3 | php: 4 | build: ./php 5 | ports: 6 | - '9003:80' 7 | volumes: 8 | - ./html:/var/www/html 9 | 10 | -------------------------------------------------------------------------------- /challenges/OmegaSector/html/alien_message/index.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/OmegaSector/html/alien_message/index.php -------------------------------------------------------------------------------- /challenges/OmegaSector/html/assets/alien.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/OmegaSector/html/assets/alien.woff -------------------------------------------------------------------------------- /challenges/OmegaSector/html/assets/alien_sector.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/OmegaSector/html/assets/alien_sector.jpg -------------------------------------------------------------------------------- /challenges/OmegaSector/html/assets/background.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/OmegaSector/html/assets/background.jpg -------------------------------------------------------------------------------- /challenges/OmegaSector/html/assets/index.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/OmegaSector/html/assets/index.php -------------------------------------------------------------------------------- /challenges/OmegaSector/html/assets/map.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/OmegaSector/html/assets/map.jpg -------------------------------------------------------------------------------- /challenges/OmegaSector/html/assets/maplcursor.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/OmegaSector/html/assets/maplcursor.cur -------------------------------------------------------------------------------- /challenges/OmegaSector/html/assets/maple.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/OmegaSector/html/assets/maple.woff -------------------------------------------------------------------------------- /challenges/OmegaSector/html/assets/mesoranger.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/OmegaSector/html/assets/mesoranger.png -------------------------------------------------------------------------------- /challenges/OmegaSector/html/assets/omega_sector.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/OmegaSector/html/assets/omega_sector.jpg -------------------------------------------------------------------------------- /challenges/OmegaSector/html/assets/omegasector.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/OmegaSector/html/assets/omegasector.mp3 -------------------------------------------------------------------------------- /challenges/OmegaSector/html/assets/taxi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/OmegaSector/html/assets/taxi.png -------------------------------------------------------------------------------- /challenges/OmegaSector/html/assets/wrong.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/OmegaSector/html/assets/wrong.jpg -------------------------------------------------------------------------------- /challenges/OmegaSector/html/human_message/index.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/OmegaSector/html/human_message/index.php -------------------------------------------------------------------------------- /challenges/OmegaSector/html/omega_sector.php: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 25 | 26 | 40) 43 | { 44 | echo "

Too long, we can only receive 40 letters for each message

"; 45 | } 46 | else 47 | { 48 | file_put_contents('human_message/'.$unique.'.'.$_POST['type'], $check); 49 | echo "

Saved in human_message/$unique.$type

"; 50 | } 51 | } 52 | else 53 | { 54 | echo "

Uh huh? Wut is this language?

"; 55 | } 56 | } 57 | 58 | ?> 59 | 60 |

Its MesoRangers Time!!!! Please cheer us via your letter ^_^

61 |
62 | 63 | 64 | 65 |
66 | 67 | 68 | 71 | 72 | -------------------------------------------------------------------------------- /challenges/OmegaSector/html/secret.php: -------------------------------------------------------------------------------- 1 | 11 | EOF; 12 | die($wrong); 13 | } 14 | 15 | ?> -------------------------------------------------------------------------------- /challenges/OmegaSector/php/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM php:5-apache 2 | COPY php.ini /usr/local/etc/php/ 3 | RUN apt-get update \ 4 | && apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng-dev libmcrypt-dev \ 5 | && docker-php-ext-install pdo_mysql mysqli mbstring gd iconv 6 | -------------------------------------------------------------------------------- /challenges/OmegaSector/php/php.ini: -------------------------------------------------------------------------------- 1 | [Date] 2 | date.timezone = "Asia/Tokyo" 3 | [mbstring] 4 | mbstring.internal_encoding = "UTF-8" 5 | mbstring.language = "Japanese" 6 | -------------------------------------------------------------------------------- /challenges/Pentest/chall_config.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | echo "configuring Pentest..."; docker-compose up -d; -------------------------------------------------------------------------------- /challenges/Pentest/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '2' 2 | services: 3 | php: 4 | build: ./php 5 | ports: 6 | - '8004:80' 7 | volumes: 8 | - ./html:/var/www/html 9 | - ./htaccess/htaccess.txt:/var/www/html/upload/.htaccess 10 | 11 | -------------------------------------------------------------------------------- /challenges/Pentest/htaccess/htaccess.txt: -------------------------------------------------------------------------------- 1 | Options +Indexes -------------------------------------------------------------------------------- /challenges/Pentest/html/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/Pentest/html/.DS_Store -------------------------------------------------------------------------------- /challenges/Pentest/html/index.php: -------------------------------------------------------------------------------- 1 |
PAGE TIÊN TRI 🔮 2 |
Cố Zấn tối cao của tổng thống đô la chum, tiên tri dú trụ Trần 🐯




3 | 4 | Đọc tiên tri tại đây:


5 | 6 |
7 | 8 | 9 |
10 | 14 | '.$a.''; 34 | } 35 | else 36 | { 37 | die('Đồ Dô Dăn Qóa 😡!'); 38 | } 39 | } 40 | }; 41 | 42 | ?> 43 |
-------------------------------------------------------------------------------- /challenges/Pentest/html/upload/.htaccess: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/Pentest/html/upload/.htaccess -------------------------------------------------------------------------------- /challenges/Pentest/html/upload/flag.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /challenges/Pentest/html/upload/tientri/1.txt: -------------------------------------------------------------------------------- 1 | Tiếc diên 2015, Sanh Diên An Toàn Thông Tin đội Na`Vi sẽ vô địch !!! -------------------------------------------------------------------------------- /challenges/Pentest/html/upload/tientri/2.txt: -------------------------------------------------------------------------------- 1 | Thích thì dô mà không thích thì dô... -------------------------------------------------------------------------------- /challenges/Pentest/html/upload/tientri/3.txt: -------------------------------------------------------------------------------- 1 | Tiết diên năm 2003, tui đang trên tòa nhà phao sờn pa lây, lúc đó tui thấy 1 hiện tượng lạ, ủa sao kì quá, lúc đó có trái tim, trái tym màu hồng có ánh hào quang ra sao. 2 | -------------------------------------------------------------------------------- /challenges/Pentest/html/upload/tientri/4.txt: -------------------------------------------------------------------------------- 1 | tiết diên tui là quốc sư mà nên tôi nói thật quí zị nghe, lúc đó tôi dụi mắt, tiết diên ko nằm chiêm bao, tự nhiên tui thấy 🐯, 🐯 lại nói với tôi bằng tiếng ziệt -------------------------------------------------------------------------------- /challenges/Pentest/html/upload/tientri/5.txt: -------------------------------------------------------------------------------- 1 | Cầu xin thượng đế hồn thiên sông núi, các bậc siêu.... nhân -------------------------------------------------------------------------------- /challenges/Pentest/php/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM php:5-apache 2 | COPY php.ini /usr/local/etc/php/ 3 | RUN apt-get update \ 4 | && apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng-dev libmcrypt-dev \ 5 | && docker-php-ext-install pdo_mysql mysqli mbstring gd iconv 6 | -------------------------------------------------------------------------------- /challenges/Pentest/php/php.ini: -------------------------------------------------------------------------------- 1 | [Date] 2 | date.timezone = "Asia/Tokyo" 3 | [mbstring] 4 | mbstring.internal_encoding = "UTF-8" 5 | mbstring.language = "Japanese" 6 | -------------------------------------------------------------------------------- /challenges/PhpLimitRevenge2/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/PhpLimitRevenge2/.DS_Store -------------------------------------------------------------------------------- /challenges/PhpLimitRevenge2/chall_config.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | echo "configuring phplimit revenge 2..."; docker-compose up -d; -------------------------------------------------------------------------------- /challenges/PhpLimitRevenge2/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '2' 2 | services: 3 | php: 4 | build: ./php 5 | ports: 6 | - '9006:80' 7 | volumes: 8 | - ./html:/var/www/html 9 | - ./flag:/var/www 10 | 11 | -------------------------------------------------------------------------------- /challenges/PhpLimitRevenge2/flag/well_play_take_fl4g_here.php: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /challenges/PhpLimitRevenge2/html/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/PhpLimitRevenge2/html/.DS_Store -------------------------------------------------------------------------------- /challenges/PhpLimitRevenge2/html/index.php: -------------------------------------------------------------------------------- 1 | va anh dech can gi nhieu ngoai em :('); 8 | } 9 | else 10 | { 11 | eval($_GET['code']); 12 | } 13 | } 14 | else 15 | { 16 | show_source(__FILE__); 17 | } 18 | 19 | ?> 20 | -------------------------------------------------------------------------------- /challenges/PhpLimitRevenge2/html/well_play_but_flag_not_here.php: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /challenges/PhpLimitRevenge2/php/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM php:5-apache 2 | COPY php.ini /usr/local/etc/php/ 3 | RUN apt-get update \ 4 | && apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng-dev libmcrypt-dev \ 5 | && docker-php-ext-install pdo_mysql mysqli mbstring gd iconv 6 | -------------------------------------------------------------------------------- /challenges/PhpLimitRevenge2/php/php.ini: -------------------------------------------------------------------------------- 1 | [Date] 2 | date.timezone = "Asia/Tokyo" 3 | [mbstring] 4 | mbstring.internal_encoding = "UTF-8" 5 | mbstring.language = "Japanese" 6 | -------------------------------------------------------------------------------- /challenges/SQLiNinjaClass/chall_config.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | echo "configuring SQLiNinjaClass..."; docker-compose up -d; -------------------------------------------------------------------------------- /challenges/SQLiNinjaClass/docker-compose.yml: -------------------------------------------------------------------------------- 1 | mysql: 2 | image: mysql:5.7 3 | volumes: 4 | - ./db_data:/var/lib/mysql 5 | restart: always 6 | hostname: mysqlserver 7 | environment: 8 | - MYSQL_ROOT_PASSWORD=tsu_tsu_tsu_tsu 9 | - MYSQL_DATABASE=sql_courses 10 | - MYSQL_USER=web400 11 | - MYSQL_PASSWORD=chin_chan_chon 12 | expose: 13 | - "3702" 14 | volumes: 15 | - ./sql_dump/:/docker-entrypoint-initdb.d 16 | 17 | nginx-php-fpm: 18 | image: antonienko/nginx-php-fpm 19 | volumes: 20 | - ./src:/var/www/public 21 | links: 22 | - mysql:mysql 23 | ports: 24 | - "7002:80" 25 | - "4443:443" 26 | restart: always 27 | environment: 28 | - DB_HOST=mysqlserver 29 | 30 | -------------------------------------------------------------------------------- /challenges/SQLiNinjaClass/sql_dump/database.sql: -------------------------------------------------------------------------------- 1 | -- phpMyAdmin SQL Dump 2 | -- version 4.6.4 3 | -- https://www.phpmyadmin.net/ 4 | -- 5 | -- Host: 127.0.0.1 6 | -- Generation Time: Aug 04, 2017 at 06:47 AM 7 | -- Server version: 5.7.14 8 | -- PHP Version: 5.6.25 9 | 10 | SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; 11 | SET time_zone = "+00:00"; 12 | 13 | 14 | /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; 15 | /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; 16 | /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; 17 | /*!40101 SET NAMES utf8mb4 */; 18 | 19 | -- 20 | -- Database: `sql_courses` 21 | -- 22 | CREATE DATABASE IF NOT EXISTS `sql_courses` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci; 23 | USE `sql_courses`; 24 | 25 | -- -------------------------------------------------------- 26 | 27 | -- 28 | -- Table structure for table `the_awes0me_flag` 29 | -- 30 | 31 | CREATE TABLE `the_awes0me_flag` ( 32 | `id` int(11) NOT NULL, 33 | `nubflAg` text NOT NULL 34 | ); 35 | 36 | -- 37 | -- Dumping data for table `the_awes0me_flag` 38 | -- 39 | 40 | INSERT INTO `the_awes0me_flag` (`id`, `nubflAg`) VALUES 41 | (1, 'PwC{SQLi_n1nj4_Th3_B3st_Ch1n-J4}'); 42 | 43 | /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; 44 | /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; 45 | /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; 46 | -------------------------------------------------------------------------------- /challenges/SQLiNinjaClass/sql_dump/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | mysql -u root -ptsu_tsu_tsu_tsu sql_courses < database.sql 3 | -------------------------------------------------------------------------------- /challenges/SQLiNinjaClass/src/background.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/SQLiNinjaClass/src/background.jpg -------------------------------------------------------------------------------- /challenges/SQLiNinjaClass/src/dbconnect.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /challenges/SimpleMessage/html/contact.php: -------------------------------------------------------------------------------- 1 |




leak your cookie to your host to win, no need bot ;)

-------------------------------------------------------------------------------- /challenges/SimpleMessage/html/index.php: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 |
8 |

Simple Message Storage Service

9 |
10 |
11 |

12 | 13 | 150) 25 | { 26 | die('

Too Long :(
'); 27 | } 28 | $filename = './message/'.uniqid().'.txt'; 29 | file_put_contents($filename, $_GET['message']); 30 | echo "

Your Message '". $_GET['message'] . "' is located here, wanna share it with me?"; 31 | } 32 | 33 | ?> 34 | 35 |

We implement many security solutions on this site, so no worries, you are safe by default even somebody hack you!
36 | - Here our Client-side protection info: Click here
37 | - Here our Server-side protection info: Click here
38 | 39 |
40 | -------------------------------------------------------------------------------- /challenges/SimpleMessage/html/message/index.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/SimpleMessage/html/message/index.php -------------------------------------------------------------------------------- /challenges/SimpleMessage/html/serverinfo.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /challenges/SimpleMessage/php/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM php:5-apache 2 | COPY php.ini /usr/local/etc/php/ 3 | RUN apt-get update \ 4 | && apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng-dev libmcrypt-dev \ 5 | && docker-php-ext-install pdo_mysql mysqli mbstring gd iconv 6 | -------------------------------------------------------------------------------- /challenges/SimpleMessage/php/php.ini: -------------------------------------------------------------------------------- 1 | [Date] 2 | date.timezone = "Asia/Tokyo" 3 | [mbstring] 4 | mbstring.internal_encoding = "UTF-8" 5 | mbstring.language = "Japanese" 6 | -------------------------------------------------------------------------------- /challenges/TSULOTT/chall_config.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | echo "configuring TSULOTT..."; docker-compose up -d; -------------------------------------------------------------------------------- /challenges/TSULOTT/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '2' 2 | services: 3 | php: 4 | build: ./php 5 | ports: 6 | - '8001:80' 7 | volumes: 8 | - ./html:/var/www/html 9 | 10 | -------------------------------------------------------------------------------- /challenges/TSULOTT/html/money.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/TSULOTT/html/money.jpg -------------------------------------------------------------------------------- /challenges/TSULOTT/html/secret.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /challenges/TSULOTT/php/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM php:5-apache 2 | COPY php.ini /usr/local/etc/php/ 3 | RUN apt-get update \ 4 | && apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng-dev libmcrypt-dev \ 5 | && docker-php-ext-install pdo_mysql mysqli mbstring gd iconv 6 | -------------------------------------------------------------------------------- /challenges/TSULOTT/php/php.ini: -------------------------------------------------------------------------------- 1 | [Date] 2 | date.timezone = "Asia/Tokyo" 3 | [mbstring] 4 | mbstring.internal_encoding = "UTF-8" 5 | mbstring.language = "Japanese" 6 | -------------------------------------------------------------------------------- /challenges/TSULOTT2/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/TSULOTT2/.DS_Store -------------------------------------------------------------------------------- /challenges/TSULOTT2/chall_config.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | echo "Configuring TSULOTT2..."; docker-compose up -d; -------------------------------------------------------------------------------- /challenges/TSULOTT2/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '2' 2 | services: 3 | web: 4 | build: ./python 5 | ports: 6 | - "7005:7005" 7 | volumes: 8 | - ./src:/code 9 | -------------------------------------------------------------------------------- /challenges/TSULOTT2/python/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.7 2 | ADD . /code 3 | WORKDIR /code 4 | RUN pip install -r requirements.txt 5 | CMD python app.py 6 | -------------------------------------------------------------------------------- /challenges/TSULOTT2/python/requirements.txt: -------------------------------------------------------------------------------- 1 | flask 2 | pycryptodome 3 | Flask-Session -------------------------------------------------------------------------------- /challenges/TSULOTT2/src/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/TSULOTT2/src/.DS_Store -------------------------------------------------------------------------------- /challenges/TSULOTT2/src/fl4gggg.txt: -------------------------------------------------------------------------------- 1 | TetCTF{__Pyth0n__3___hahahah4hahaha__} -------------------------------------------------------------------------------- /challenges/TSULOTT2/src/secret_key.py: -------------------------------------------------------------------------------- 1 | def key_calc(): 2 | return 'Tsu_fl0wer_s3cr3t' -------------------------------------------------------------------------------- /challenges/TSULOTT2/src/static/background.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/TSULOTT2/src/static/background.jpg -------------------------------------------------------------------------------- /challenges/TSULOTT2/src/static/flag.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/TSULOTT2/src/static/flag.png -------------------------------------------------------------------------------- /challenges/TSULOTT2/src/static/flower.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/TSULOTT2/src/static/flower.png -------------------------------------------------------------------------------- /challenges/TSULOTT2/src/static/source.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/TSULOTT2/src/static/source.png -------------------------------------------------------------------------------- /challenges/TSULOTT2/src/static/tsu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/TSULOTT2/src/static/tsu.png -------------------------------------------------------------------------------- /challenges/TSULOTT2/src/static/wth.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/TSULOTT2/src/static/wth.mp4 -------------------------------------------------------------------------------- /challenges/TSULOTT2/src/templates/error.html: -------------------------------------------------------------------------------- 1 |
2 | 5 |
-------------------------------------------------------------------------------- /challenges/TSULOTT2/src/templates/index.html: -------------------------------------------------------------------------------- 1 | TSULOTT2 2 | 3 | 4 | 5 | 6 | 7 |
8 | Home 9 | Ticket 10 | Lott 11 | Market 12 | Reset 13 |
14 | 15 |

Welcome to TSULOTT2, let's play a lucky game~

16 |

Amount: ${{money}}

17 | 18 |
19 | Your Items:

20 |
21 | {% if tsu != None %}
{% endif %} 22 | {% if flower != None %}
{% endif %} 23 | {% if source != None %}
{% endif %} 24 | {% if flag != None %}
{% endif %} 25 | {% if content != None %} {% endif %} 26 |
27 |
28 |
-------------------------------------------------------------------------------- /challenges/TSULOTT2/src/templates/lott.html: -------------------------------------------------------------------------------- 1 | TSULOTT2 2 | 3 | 4 | 5 | 6 | 7 |
8 | Home 9 | Ticket 10 | Lott 11 | Market 12 | Reset 13 |
14 | 15 |

Input ticket to lott! winner will get money, loser lost the bet

16 |

Amount: ${{money}}

17 |
18 |
19 | {% if status!=None %} 20 | {{status}} 21 | {% endif %} 22 |
23 | 24 |
25 |
26 |
27 |
28 | 29 |
30 |
31 | 32 | 33 | 34 |
-------------------------------------------------------------------------------- /challenges/TSULOTT2/src/templates/ticket.html: -------------------------------------------------------------------------------- 1 | TSULOTT2 2 | 3 | 4 | 5 | 6 | 7 |
8 | Home 9 | Ticket 10 | Lott 11 | Market 12 | Reset 13 |
14 | 15 |

Yo! Please pick your number (0 - 50), and the money you bet on it!

16 |

Amount: ${{money}}

17 |
18 |
19 | {% if status!=None %} 20 | {{status}} 21 | {% endif %} 22 |
23 | 24 |
25 |
26 |
27 |
28 | 29 |
30 | 31 |
32 |
33 | 34 | 35 |
-------------------------------------------------------------------------------- /challenges/TheProphet/chall_config.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | echo "Configuring TheProphet..."; docker-compose up -d; 3 | docker exec -it $(docker ps -aqf "name=theprophet_web") mkdir /phao_san_pa_lay___1337; 4 | docker exec -it $(docker ps -aqf "name=theprophet_web") touch /phao_san_pa_lay___1337/flagggg.txt; -------------------------------------------------------------------------------- /challenges/TheProphet/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '2' 2 | services: 3 | web: 4 | build: ./python 5 | ports: 6 | - "9005:9005" 7 | volumes: 8 | - ./src:/code 9 | -------------------------------------------------------------------------------- /challenges/TheProphet/python/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.7 2 | ADD . /code 3 | WORKDIR /code 4 | RUN pip install -r requirements.txt 5 | CMD python app.py 6 | -------------------------------------------------------------------------------- /challenges/TheProphet/python/requirements.txt: -------------------------------------------------------------------------------- 1 | flask 2 | -------------------------------------------------------------------------------- /challenges/TheProphet/src/app.py: -------------------------------------------------------------------------------- 1 | from flask import Flask 2 | from flask import render_template 3 | import random 4 | app = Flask(__name__) 5 | 6 | @app.route('/') 7 | def index(): 8 | rand = str(random.randint(1,5)) 9 | return render_template('index.html', random=rand) 10 | 11 | @app.route('/read/') 12 | def read(filename=None): 13 | rand = str(random.randint(1,5)) 14 | try: 15 | content = open(filename,'r').read() 16 | except: 17 | raise 18 | return render_template('file.html', filename=content, random=rand) 19 | 20 | if __name__ == '__main__': 21 | app.run(host='0.0.0.0', port='9005', debug=True) 22 | -------------------------------------------------------------------------------- /challenges/TheProphet/src/oracle/1.txt: -------------------------------------------------------------------------------- 1 | Flag is in random folder at /, but what is it name? Who know 🤷‍♂️ Can you "tiên tri" with me? -------------------------------------------------------------------------------- /challenges/TheProphet/src/oracle/2.txt: -------------------------------------------------------------------------------- 1 | Tiếc ziên 2020 tự nhiên tui thấy 1 hiện tượng lạ, lúc đó tui mới thấy... ủa sao kì zậy? tui nhìn 1 cái CTF có trái tim màu hồng mà có cái ánh hào quang ra sao?? mà tiếc ziên là tui mắt thấy tai nghe chứ không phải nằm chiêm bao... tui thấy cái CTF nó dành cho người Việt. -------------------------------------------------------------------------------- /challenges/TheProphet/src/oracle/3.txt: -------------------------------------------------------------------------------- 1 | thằn Trắng nó tưởng nó zữ hả, nó zữ với ai, xời đấc ơi! -------------------------------------------------------------------------------- /challenges/TheProphet/src/oracle/4.txt: -------------------------------------------------------------------------------- 1 | Tự nhiên tui cầu ở trên Phao sần Pa lây đó. Tui thấy flag mà không lấy được, quý dị lấy giùm tui zới -------------------------------------------------------------------------------- /challenges/TheProphet/src/oracle/5.txt: -------------------------------------------------------------------------------- 1 | ... -------------------------------------------------------------------------------- /challenges/TheProphet/src/static/trandan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/TheProphet/src/static/trandan.png -------------------------------------------------------------------------------- /challenges/TheProphet/src/templates/file.html: -------------------------------------------------------------------------------- 1 |

🔮 Prophet Universe Nude Tiger Reborn 🔮

2 |


3 |
Read some oracle here
4 | {% if filename %} 5 |

{{ filename }}!

6 | {% endif %} -------------------------------------------------------------------------------- /challenges/TheProphet/src/templates/index.html: -------------------------------------------------------------------------------- 1 |

🔮 Prophet Universe Nude Tiger Reborn 🔮

2 |


3 |
Read some oracle here
-------------------------------------------------------------------------------- /challenges/TooManyCrypto/chall_config.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | echo "configuring TooManyCrypto..."; docker-compose up -d; -------------------------------------------------------------------------------- /challenges/TooManyCrypto/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '2' 2 | services: 3 | php: 4 | build: ./php 5 | ports: 6 | - '9001:80' 7 | volumes: 8 | - ./html:/var/www/html 9 | 10 | -------------------------------------------------------------------------------- /challenges/TooManyCrypto/html/css/owl.carousel.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Core Owl Carousel CSS File 3 | * v1.3.3 4 | */ 5 | 6 | /* clearfix */ 7 | .owl-carousel .owl-wrapper:after { 8 | content: "."; 9 | display: block; 10 | clear: both; 11 | visibility: hidden; 12 | line-height: 0; 13 | height: 0; 14 | } 15 | /* display none until init */ 16 | .owl-carousel{ 17 | display: none; 18 | position: relative; 19 | width: 100%; 20 | -ms-touch-action: pan-y; 21 | } 22 | .owl-carousel .owl-wrapper{ 23 | display: none; 24 | position: relative; 25 | -webkit-transform: translate3d(0px, 0px, 0px); 26 | } 27 | .owl-carousel .owl-wrapper-outer{ 28 | overflow: hidden; 29 | position: relative; 30 | width: 100%; 31 | } 32 | .owl-carousel .owl-wrapper-outer.autoHeight{ 33 | -webkit-transition: height 500ms ease-in-out; 34 | -moz-transition: height 500ms ease-in-out; 35 | -ms-transition: height 500ms ease-in-out; 36 | -o-transition: height 500ms ease-in-out; 37 | transition: height 500ms ease-in-out; 38 | } 39 | 40 | .owl-carousel .owl-item{ 41 | float: left; 42 | } 43 | .owl-controls .owl-page, 44 | .owl-controls .owl-buttons div{ 45 | cursor: pointer; 46 | } 47 | .owl-controls { 48 | -webkit-user-select: none; 49 | -khtml-user-select: none; 50 | -moz-user-select: none; 51 | -ms-user-select: none; 52 | user-select: none; 53 | -webkit-tap-highlight-color: rgba(0, 0, 0, 0); 54 | } 55 | 56 | /* mouse grab icon */ 57 | .grabbing { 58 | cursor:url(grabbing.png) 8 8, move; 59 | } 60 | 61 | /* fix */ 62 | .owl-carousel .owl-wrapper, 63 | .owl-carousel .owl-item{ 64 | -webkit-backface-visibility: hidden; 65 | -moz-backface-visibility: hidden; 66 | -ms-backface-visibility: hidden; 67 | -webkit-transform: translate3d(0,0,0); 68 | -moz-transform: translate3d(0,0,0); 69 | -ms-transform: translate3d(0,0,0); 70 | } 71 | 72 | -------------------------------------------------------------------------------- /challenges/TooManyCrypto/html/css/owl.theme.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Owl Carousel Owl Demo Theme 3 | * v1.3.3 4 | */ 5 | 6 | .owl-theme .owl-controls{ 7 | margin-top: 10px; 8 | text-align: center; 9 | } 10 | 11 | /* Styling Next and Prev buttons */ 12 | 13 | .owl-theme .owl-controls .owl-buttons div{ 14 | color: #FFF; 15 | display: inline-block; 16 | zoom: 1; 17 | *display: inline;/*IE7 life-saver */ 18 | margin: 5px; 19 | padding: 3px 10px; 20 | font-size: 12px; 21 | -webkit-border-radius: 30px; 22 | -moz-border-radius: 30px; 23 | border-radius: 30px; 24 | background: #869791; 25 | filter: Alpha(Opacity=50);/*IE7 fix*/ 26 | opacity: 0.5; 27 | } 28 | /* Clickable class fix problem with hover on touch devices */ 29 | /* Use it for non-touch hover action */ 30 | .owl-theme .owl-controls.clickable .owl-buttons div:hover{ 31 | filter: Alpha(Opacity=100);/*IE7 fix*/ 32 | opacity: 1; 33 | text-decoration: none; 34 | } 35 | 36 | /* Styling Pagination*/ 37 | 38 | .owl-theme .owl-controls .owl-page{ 39 | display: inline-block; 40 | zoom: 1; 41 | *display: inline;/*IE7 life-saver */ 42 | } 43 | .owl-theme .owl-controls .owl-page span{ 44 | display: block; 45 | width: 12px; 46 | height: 12px; 47 | margin: 5px 7px; 48 | filter: Alpha(Opacity=50);/*IE7 fix*/ 49 | opacity: 0.5; 50 | -webkit-border-radius: 20px; 51 | -moz-border-radius: 20px; 52 | border-radius: 20px; 53 | background: #869791; 54 | } 55 | 56 | .owl-theme .owl-controls .owl-page.active span, 57 | .owl-theme .owl-controls.clickable .owl-page:hover span{ 58 | filter: Alpha(Opacity=100);/*IE7 fix*/ 59 | opacity: 1; 60 | } 61 | 62 | /* If PaginationNumbers is true */ 63 | 64 | .owl-theme .owl-controls .owl-page span.owl-numbers{ 65 | height: auto; 66 | width: auto; 67 | color: #FFF; 68 | padding: 2px 10px; 69 | font-size: 12px; 70 | -webkit-border-radius: 30px; 71 | -moz-border-radius: 30px; 72 | border-radius: 30px; 73 | } 74 | 75 | /* preloading images */ 76 | .owl-item.loading{ 77 | min-height: 150px; 78 | background: url(AjaxLoader.gif) no-repeat center center 79 | } -------------------------------------------------------------------------------- /challenges/TooManyCrypto/html/decrypt.php: -------------------------------------------------------------------------------- 1 | 2 | Your message....here...baka: '.htmlentities(substr($plaintext,73)).''; 31 | } 32 | else 33 | { 34 | echo '
Onii-chan!!! I Cannot Decrypt It!
'; 35 | } 36 | } 37 | else 38 | { 39 | echo '
Hey Onii-chan, Wrong Input! Base64 Only Baka-desu
'; 40 | } 41 | } 42 | } 43 | 44 | 45 | ?> 46 | 47 | Please give me your crypt...onii-chan 48 |
49 |
50 | 51 | 52 | /> 53 |
54 |
-------------------------------------------------------------------------------- /challenges/TooManyCrypto/html/fonts/ionicons.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/TooManyCrypto/html/fonts/ionicons.eot -------------------------------------------------------------------------------- /challenges/TooManyCrypto/html/fonts/ionicons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/TooManyCrypto/html/fonts/ionicons.ttf -------------------------------------------------------------------------------- /challenges/TooManyCrypto/html/fonts/ionicons.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/TooManyCrypto/html/fonts/ionicons.woff -------------------------------------------------------------------------------- /challenges/TooManyCrypto/html/images/baka.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/TooManyCrypto/html/images/baka.gif -------------------------------------------------------------------------------- /challenges/TooManyCrypto/html/images/em.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/TooManyCrypto/html/images/em.png -------------------------------------------------------------------------------- /challenges/TooManyCrypto/html/images/icons/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/TooManyCrypto/html/images/icons/close.png -------------------------------------------------------------------------------- /challenges/TooManyCrypto/html/images/icons/i_next.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/TooManyCrypto/html/images/icons/i_next.png -------------------------------------------------------------------------------- /challenges/TooManyCrypto/html/images/icons/i_prev.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/TooManyCrypto/html/images/icons/i_prev.png -------------------------------------------------------------------------------- /challenges/TooManyCrypto/html/images/icons/left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/TooManyCrypto/html/images/icons/left.png -------------------------------------------------------------------------------- /challenges/TooManyCrypto/html/images/icons/map-marker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/TooManyCrypto/html/images/icons/map-marker.png -------------------------------------------------------------------------------- /challenges/TooManyCrypto/html/images/icons/next.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/TooManyCrypto/html/images/icons/next.png -------------------------------------------------------------------------------- /challenges/TooManyCrypto/html/images/icons/prev.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/TooManyCrypto/html/images/icons/prev.png -------------------------------------------------------------------------------- /challenges/TooManyCrypto/html/images/icons/quotes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/TooManyCrypto/html/images/icons/quotes.png -------------------------------------------------------------------------------- /challenges/TooManyCrypto/html/images/icons/right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/TooManyCrypto/html/images/icons/right.png -------------------------------------------------------------------------------- /challenges/TooManyCrypto/html/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/TooManyCrypto/html/images/logo.png -------------------------------------------------------------------------------- /challenges/TooManyCrypto/html/images/slider.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/TooManyCrypto/html/images/slider.jpg -------------------------------------------------------------------------------- /challenges/TooManyCrypto/html/images/wrongway.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tsug0d/MyAwesomeWebChallenge/7f92814ff647bf36aa836e30cb6044031149d574/challenges/TooManyCrypto/html/images/wrongway.jpg -------------------------------------------------------------------------------- /challenges/TooManyCrypto/php/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM php:5-apache 2 | COPY php.ini /usr/local/etc/php/ 3 | RUN apt-get update \ 4 | && apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng-dev libmcrypt-dev \ 5 | && docker-php-ext-install pdo_mysql mysqli mbstring gd iconv 6 | -------------------------------------------------------------------------------- /challenges/TooManyCrypto/php/php.ini: -------------------------------------------------------------------------------- 1 | [Date] 2 | date.timezone = "Asia/Tokyo" 3 | [mbstring] 4 | mbstring.internal_encoding = "UTF-8" 5 | mbstring.language = "Japanese" 6 | -------------------------------------------------------------------------------- /solutions/freetoflag.txt: -------------------------------------------------------------------------------- 1 | This challenge was released in UIT Hacking Contest 2 | ================== 3 | There is no writeup for this one, hint: Integer Overflow -------------------------------------------------------------------------------- /solutions/hackemall.txt: -------------------------------------------------------------------------------- 1 | This challenge was released in SVATTT 2019 2 | ================== 3 | [VN] https://www.youtube.com/watch?v=oTlXtBgDlSo -------------------------------------------------------------------------------- /solutions/iqtest.txt: -------------------------------------------------------------------------------- 1 | This challenge was released in PwC Hackaday 2017 2 | ================== 3 | [VN] https://medium.com/d3rjkt4t0r/write-up-pwcs-hackaday-2017-web-100-iqtest-north-korea-e00d7b5aa184 -------------------------------------------------------------------------------- /solutions/lonelyboy.txt: -------------------------------------------------------------------------------- 1 | This challenge was released in MeePwn CTF 2017 2 | ================== 3 | [VN] https://ctftime.org/task/4347 -------------------------------------------------------------------------------- /solutions/maplstory.txt: -------------------------------------------------------------------------------- 1 | This challenge was released in MeePwn CTF 2018 Quals 2 | =============== 3 | https://ctftime.org/task/6290 -------------------------------------------------------------------------------- /solutions/numbermakeup.txt: -------------------------------------------------------------------------------- 1 | I. HOF 2 | ---------------------------------------- 3 | Name Time 4 | ---------------------------------------- 5 | tinduong 00:30 pm GMT+7 17/3/2018 6 | LittleMonkey 11:43 pm GMT+7 17/3/2018 7 | ducnt 02:04 pm GMT+7 18/3/2018 8 | kad96 02:59 pm GMT+7 18/3/2018 9 | 10 | 11 | II. Solution 12 | ---------------------------------------- 13 | Name Payload 14 | ---------------------------------------- 15 | tinduong Point out the shit in my chall (fixed) 16 | LittleMonkey '||$['\147\154\157\142\141\154\105\166\141\154']('\141\154\145\162\164\50\61\51')||' 17 | ducnt 1'?[]['\155\141\160']['\143\157\156\163\164\162\165\143\164\157\162']('\143\157\156\146\151\162\155\50\61\51')():'# 18 | kad96 ',[]['\146\151\154\164\145\162']['\143\157\156\163\164\162\165\143\164\157\162']('\162\145\164\165\162\156\40\145\166\141\154')()('\141\154\145\162\164(1)'),' -------------------------------------------------------------------------------- /solutions/omegasector.txt: -------------------------------------------------------------------------------- 1 | This challenge was released in MeePwn CTF Quals 2018 2 | ======================= 3 | [EN] https://ctftime.org/task/6286 -------------------------------------------------------------------------------- /solutions/pentest.txt: -------------------------------------------------------------------------------- 1 | This challenge was released in SVATTT 2019 2 | ================== 3 | [VN] https://www.youtube.com/watch?v=88NafqPvMXE -------------------------------------------------------------------------------- /solutions/phplimitrevenge2.txt: -------------------------------------------------------------------------------- 1 | This challenge was released in TetCTF 2018 2 | ================== 3 | [CN] https://fatheadrat.tk/2019/09/16/php-no-agruments/#TetCTF-2018-PHP-limit-Revenge 4 | [EN] https://tuanlinh.gitbook.io/ctf/tetctf-2018 -------------------------------------------------------------------------------- /solutions/securesystem.txt: -------------------------------------------------------------------------------- 1 | This challenge was released in TetCTF 2020 2 | ======== 3 | https://ctftime.org/task/10272 -------------------------------------------------------------------------------- /solutions/simplemessage.txt: -------------------------------------------------------------------------------- 1 | This challenge was released in SVATTT 2019 FINAL 2 | ================== 3 | [VN] https://github.com/vinhjaxt/CTF-writeups/issues/1 -------------------------------------------------------------------------------- /solutions/sqlininjaclass.txt: -------------------------------------------------------------------------------- 1 | This challenge was released in PwC Hackaday 2017 2 | ================== 3 | [VN] https://kad96.wordpress.com/2017/09/12/pwcs-hackaday-web-500pts-write-up/ -------------------------------------------------------------------------------- /solutions/theprophet.txt: -------------------------------------------------------------------------------- 1 | This challenge was released in TetCTF 2020 2 | ================== 3 | [VN] https://ctftime.org/task/10271 -------------------------------------------------------------------------------- /solutions/toomanycrypto.txt: -------------------------------------------------------------------------------- 1 | This challenge was released in MeePwn CTF 2017 2 | ======================= 3 | [VI] https://www.youtube.com/watch?v=29z-kSZjS3I 4 | [VI] https://kad96.wordpress.com/2017/10/27/meepwnctf-toomanycrypto-crime/ 5 | [JP] https://st98.github.io/diary/posts/2017-07-16-meepwn-ctf-1st-2017.html -------------------------------------------------------------------------------- /solutions/tsulott.txt: -------------------------------------------------------------------------------- 1 | This challenge was released in MeePwn CTF 2017 2 | ======================= 3 | [EN] https://ctftime.org/task/4319 -------------------------------------------------------------------------------- /solutions/tsulott2.txt: -------------------------------------------------------------------------------- 1 | This challenge was released in TetCTF 2019 2 | ======= 3 | [VN] https://peterjson.medium.com/t%E1%BA%BFt-ctf-2019-web-write-ups-356977487033 --------------------------------------------------------------------------------