git clone https://github.com/v1bh0r/juice-shop.git
cd juice-shop
npm install
CTF_KEY=hellonullchandigarh16feb NODE_ENV=ctf npm start
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE accounts( | |
id serial PRIMARY KEY, | |
name VARCHAR(256) NOT NULL | |
); | |
CREATE TABLE entries( | |
id serial PRIMARY KEY, | |
description VARCHAR(1024) NOT NULL, | |
amount NUMERIC(20, 2) NOT NULL CHECK (amount > 0.0), | |
-- Every entry is a credit to one account... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> | |
<soapenv:Header/> | |
<soapenv:Body> | |
<api:Command xmlns:api="http://someservice.com/core/api"> | |
<api:Body> | |
<api:Item key="standardRequest"> | |
<IDScoreRequest schemaVersion="3.0" xmlns="http://someservice.com/request"> | |
<Identity> | |
<FirstName>John</FirstName> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
dos2unix mvnw | |
./mvnw spring-boot:run -Dspring-boot.run.jvmArguments="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005" & | |
while true; do | |
inotifywait -e modify,create,delete,move -r ./src/ && ./mvnw compile | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.3' | |
services: | |
api: | |
build: | |
context: ./ | |
dockerfile: Dockerfile | |
volumes: | |
- ./:/app | |
- ./.m2:/root/.m2 | |
working_dir: /app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM eclipse-temurin:11 | |
RUN apt-get update && apt-get -y upgrade | |
RUN apt-get install -y inotify-tools dos2unix | |
ENV HOME=/app | |
RUN mkdir -p $HOME | |
WORKDIR $HOME |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
check process sidekiq_myapp | |
with pidfile /path/to/sidekiq.pid | |
start program = "bundle exec sidekiq -C /path/to/sidekiq_conf.yml -P /path/to/sidekiq.pid" with timeout 30 seconds | |
stop program = "kill -s TERM `cat /path/to/sidekiq.pid`" with timeout 30 seconds | |
if totalmem is greater than 500 MB for 2 cycles then restart # VM bloat is common in Rails apps | |
if totalmem is greater than 800 MB for 1 cycles then restart # If a rogue job tries to consume memory quickly | |
group myapp_sidekiq |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'json' | |
require 'net/http' | |
url = URI.parse('http://lpdemo.thirdpillar.com/loanpath-piedmont-web/rest/get/request/16230.json') | |
req = Net::HTTP::Get.new(url.path) | |
res = Net::HTTP.start(url.host, url.port) {|http|http.request(req)} | |
parsed_json = JSON.parse res.body | |
document_type_details = [] | |
parsed_json["sr.getEntityResponse"]["list"].each do |list| |