Skip to content

Commit 12d87ef

Browse files
django static files
1 parent e844ba8 commit 12d87ef

153 files changed

Lines changed: 33999 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
3.53 KB
Loading

staticfiles/Lab/icons/pygoat-mini.svg

Lines changed: 26 additions & 0 deletions
Loading
7.78 KB
Loading

staticfiles/Lab/icons/pygoat-small.svg

Lines changed: 26 additions & 0 deletions
Loading

staticfiles/Lab/icons/pygoat.png

54.4 KB
Loading

staticfiles/Lab/icons/pygoat.svg

Lines changed: 25 additions & 0 deletions
Loading

staticfiles/Lab/image/xxe.jpg

4.73 KB
Loading

staticfiles/Lab/ssrf.css

Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
@import url('https://fonts.googleapis.com/css2?family=Ubuntu+Mono&display=swap');
2+
3+
.playground{
4+
background-color: rgb(214, 252, 255);
5+
padding: 10px;
6+
padding-top: 20px;
7+
padding-bottom: 20px;
8+
border-radius: 10px;
9+
/* visibility: hidden; */
10+
}
11+
12+
#ssrf-progress-bar {
13+
margin-top : 30px;
14+
position: relative;
15+
width: 100%;
16+
height: 30px;
17+
background-color: #d5ecff;
18+
display: none;
19+
flex-direction: row;
20+
border-radius: 15px;
21+
border: 2px solid #4B8BBE;
22+
}
23+
24+
25+
.circle{
26+
/* width: 5%; */
27+
border: 5px solid #033157;
28+
border-radius: 100px;
29+
height: auto;
30+
width : 26px
31+
}
32+
.ssrf-progress-element{
33+
width: 30%;
34+
background-color: #d5ecee;
35+
border-radius: 15px;
36+
}
37+
38+
.ssrf-bar-status{
39+
height: 90%;
40+
background-color: #033157;
41+
border-radius: 15px;
42+
margin: 1px;
43+
}
44+
45+
#ssrf-frame-1{
46+
display: flex;
47+
flex-direction: row;
48+
justify-content: space-between;
49+
}
50+
#ssrf-frame-2{
51+
display: none;
52+
margin-top: 20px;
53+
flex-direction: column;
54+
align-items: center;
55+
}
56+
57+
.code{
58+
background-color: #fafafa;
59+
border-radius: 10px;
60+
padding: 0;
61+
}
62+
63+
.code-bar{
64+
background-color: #d5ecee;
65+
width: 100%;
66+
height: 30px;
67+
border-radius: 10px 10px 0px 0px;
68+
display: flex;
69+
justify-content: space-between
70+
}
71+
72+
.code form {
73+
margin: 30px;
74+
margin-top: 10px;
75+
margin-bottom: 10px;
76+
font-family: 'Ubuntu Mono', monospace;
77+
}
78+
79+
.code-circle {
80+
height: 18px;
81+
width: 18px;
82+
border-radius: 10px;
83+
border : 0px solid;
84+
margin: 5px;
85+
}
86+
.red {
87+
background-color: red;
88+
}
89+
.green{
90+
background-color: green;
91+
}
92+
.yellow{
93+
background-color: yellow;
94+
}
95+
96+
#ssrf-frame-3{
97+
display: none;
98+
margin-top: 20px;
99+
flex-direction: column;
100+
align-items: center;
101+
}
102+
103+
/* frame 4 */
104+
105+
#ssrf-frame-4{
106+
display: none;
107+
margin-top: 20px;
108+
flex-direction: column;
109+
align-items: center;
110+
}
111+
112+
textarea {
113+
min-height: 250px;
114+
overflow: scroll;
115+
margin: 20px;
116+
display: inline-block;
117+
background: #f4f4f9;
118+
outline: none;
119+
font-family: Courier, sans-serif;
120+
min-width: 500px;
121+
height: 500px;
122+
border-radius: 10px;
123+
font-size: 13px;
124+
padding: 10px;
125+
126+
}
127+
#textarea-container{
128+
display: flex;
129+
flex-direction: row;
130+
margin : 10px;
131+
flex-wrap: wrap
132+
}
133+
134+
#textarea1{
135+
display: flex;
136+
flex-direction: column;
137+
}
138+
.problem-Statement-desc{
139+
margin-left: 50px;
140+
margin-right: 50px;
141+
}
142+
143+
#ssrf-frame-5{
144+
display: none;
145+
margin-top: 20px;
146+
flex-direction: column;
147+
align-items: center;
148+
}

staticfiles/Lab/ssrf.js

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
2+
function frame1to2(){
3+
// frame 1 to 2
4+
document.getElementById('ssrf-frame-1').style.display = 'none';
5+
document.getElementById('ssrf-frame-2').style.display = 'flex';
6+
document.getElementById('ssrf-progress-bar').style.display = 'flex';
7+
}
8+
9+
function frame2to3(){
10+
var markedCheckbox = document.querySelectorAll('input[type="checkbox"]:checked');
11+
var arr = [];
12+
for (var checkbox of markedCheckbox){
13+
arr.push(parseInt(checkbox.value));
14+
}
15+
var score = 0;
16+
var result = [8,9,10,11,12];
17+
for (var items of arr){
18+
if(result.includes(items)){
19+
score++;
20+
}
21+
else{
22+
score--;
23+
}
24+
}
25+
if( score >= 4 ){
26+
document.getElementById('ssrf-frame-2').style.display = 'none';
27+
document.getElementById('ssrf-bar-status1').classList.add('ssrf-bar-status')
28+
alert('Congratulation! You have figure this out !!');
29+
document.getElementById('ssrf-frame-3').style.display = 'flex';
30+
}
31+
}
32+
33+
function frame3to4(){
34+
var markedCheckbox = document.querySelectorAll('input[name="form2"]:checked');
35+
var arr = [];
36+
for (var checkbox of markedCheckbox){
37+
arr.push(parseInt(checkbox.value));
38+
}
39+
var score = 0;
40+
var result = [3,7,11,15];
41+
for (var items of arr){
42+
if(result.includes(items)){
43+
score++;
44+
}
45+
else{
46+
score--;
47+
}
48+
}
49+
if( score >=4 ){
50+
document.getElementById('ssrf-frame-3').style.display = 'none';
51+
document.getElementById('ssrf-bar-status2').classList.add('ssrf-bar-status')
52+
alert('Congratulation! you have detected defective codes in html');
53+
document.getElementById('ssrf-frame-4').style.display = 'flex';
54+
}
55+
}
56+
57+
58+
function checkcode(){
59+
var python_code = document.getElementById('python').value
60+
var html_code = document.getElementById('html').value
61+
62+
var formdata = new FormData();
63+
formdata.append('python_code', python_code);
64+
formdata.append('html_code', html_code);
65+
var requestOptions = {
66+
method: 'POST',
67+
body: formdata,
68+
redirect: 'follow'
69+
};
70+
71+
fetch("api/ssrf", requestOptions)
72+
.then(response => response.text())
73+
.then((result) => {
74+
console.log(result);
75+
var obj = JSON.parse(result);
76+
alert(obj.message);
77+
if (obj.passed == 1 ){
78+
document.getElementById('ssrf-frame-4').style.display = 'none';
79+
document.getElementById('ssrf-bar-status3').classList.add('ssrf-bar-status')
80+
document.getElementById('ssrf-frame-5').style.display = 'flex';
81+
}
82+
})
83+
.catch(error => console.log('error', error));
84+
}

staticfiles/Lab/ssti.css

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
.container{align-items: center;
2+
max-width: 720px;
3+
display: flex;
4+
flex-direction: column;}
5+
6+
#ssti-inner-div2{
7+
display: flex;
8+
flex-direction: column;
9+
align-items: center;
10+
}
11+
12+
.ssti-form{
13+
display: flex;
14+
flex-direction: column;
15+
align-items: center;
16+
}
17+
ul{
18+
padding: 5px;
19+
}
20+
li{
21+
list-style-type: none;
22+
}
23+
24+
.code{
25+
background-color: #fafafaaa;
26+
}

0 commit comments

Comments
 (0)