Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
CTF
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Grzegorz
CTF
Commits
2421e4d2
Commit
2421e4d2
authored
Apr 05, 2016
by
Dominik Rosiek
Browse files
Options
Browse Files
Download
Plain Diff
first php
parents
eca16422
5eb501f3
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
34 additions
and
10 deletions
+34
-10
deploy.sh
scripts/deploy.sh
+1
-1
configuration.local.yml
service/configuration.local.yml
+5
-0
configuration.prod.yml
service/configuration.prod.yml
+5
-1
configuration.yml
service/configuration.yml
+0
-1
Task.java
...ava/com/telephoners/krakyournet/ctf/beans/tasks/Task.java
+17
-2
TextTask.java
...com/telephoners/krakyournet/ctf/beans/tasks/TextTask.java
+2
-2
WebTask.java
.../com/telephoners/krakyournet/ctf/beans/tasks/WebTask.java
+2
-2
TasksRepository.java
...phoners/krakyournet/ctf/repositories/TasksRepository.java
+2
-1
No files found.
scripts/deploy.sh
View file @
2421e4d2
ssh grzesiek@52.25.28.64
"cd CTF && git pull && grunt && cd service && /sbin/fuser -k 8080/tcp; bash start.sh; echo done;"
\ No newline at end of file
ssh grzesiek@52.28.244.24
"cd CTF && git pull && grunt && cd service && /sbin/fuser -k 8080/tcp; bash start.sh; echo done;"
\ No newline at end of file
service/configuration.local.yml
View file @
2421e4d2
...
...
@@ -75,6 +75,7 @@ teams:
textTasks
:
-
name
:
"
Szyfro1"
text
:
"
Odszyfruj1"
description
:
"
Opis
zadania
1"
level
:
1
flags
:
-
value
:
"
AGH_sdfg1f1"
...
...
@@ -86,6 +87,7 @@ textTasks:
-
name
:
"
Szyfro2"
text
:
"
Odszyfruj2"
description
:
"
Opis
zadania
2"
level
:
2
flags
:
-
value
:
"
AGH_sdfg1"
...
...
@@ -95,6 +97,7 @@ textTasks:
-
name
:
"
UI"
text
:
"
Znajdz
flagi
w
jułaju"
description
:
"
Opis
zadania
UI"
level
:
5
flags
:
-
value
:
"
KYN2016_TervetullutKotisivuilleni"
...
...
@@ -114,6 +117,7 @@ textTasks:
webTasks
:
-
name
:
"
SQL
Injection"
url
:
"
http://google.pl"
description
:
"
Opis
zadania
SQL
INJECTION"
level
:
3
flags
:
-
value
:
"
AGH_sdfg1fs"
...
...
@@ -124,6 +128,7 @@ webTasks:
description
:
"
flaga
33"
-
name
:
"
Inna
dziura"
description
:
"
Opis
zadania
inna
dziura"
url
:
"
http://wikipedia.pl"
level
:
4
flags
:
...
...
service/configuration.prod.yml
View file @
2421e4d2
...
...
@@ -75,6 +75,7 @@ teams:
textTasks
:
-
name
:
"
Szyfro1"
text
:
"
Odszyfruj1"
description
:
"
Opis
zadania
1"
level
:
1
flags
:
-
value
:
"
AGH_sdfg1f1"
...
...
@@ -86,6 +87,7 @@ textTasks:
-
name
:
"
Szyfro2"
text
:
"
Odszyfruj2"
description
:
"
Opis
zadania
2"
level
:
2
flags
:
-
value
:
"
AGH_sdfg1"
...
...
@@ -95,6 +97,7 @@ textTasks:
-
name
:
"
UI"
text
:
"
Znajdz
flagi
w
jułaju"
description
:
"
Opis
zadania
UI"
level
:
5
flags
:
-
value
:
"
KYN2016_TervetullutKotisivuilleni"
...
...
@@ -113,7 +116,7 @@ textTasks:
webTasks
:
-
name
:
"
PHP
taki
bezpieczny"
text
:
"
A
może
by
tak
coś z
klasyki?
vol.
1"
description
:
"
A
może
by
tak
coś z
klasyki?
vol.
1"
url
:
"
http://52.29.190.67"
level
:
3
flags
:
...
...
@@ -123,6 +126,7 @@ webTasks:
description
:
"
Remote
File
Include"
-
name
:
"
Inna
dziura"
description
:
"
Opis
zadania
inna
dziura"
url
:
"
http://wikipedia.pl"
level
:
4
flags
:
...
...
service/configuration.yml
deleted
120000 → 0
View file @
eca16422
configuration.prod.yml
\ No newline at end of file
service/src/main/java/com/telephoners/krakyournet/ctf/beans/tasks/Task.java
View file @
2421e4d2
package
com
.
telephoners
.
krakyournet
.
ctf
.
beans
.
tasks
;
import
com.fasterxml.jackson.annotation.JsonInclude
;
import
com.telephoners.krakyournet.ctf.beans.Flag
;
import
com.telephoners.krakyournet.ctf.beans.User
;
import
com.telephoners.krakyournet.ctf.helpers.PublicProperty
;
import
com.telephoners.krakyournet.ctf.beans.Flag
;
import
org.bson.types.ObjectId
;
import
org.mongodb.morphia.annotations.Entity
;
import
org.mongodb.morphia.annotations.Id
;
...
...
@@ -20,13 +20,16 @@ public abstract class Task
@PublicProperty
private
String
name
;
@PublicProperty
private
String
description
;
@PublicProperty
private
int
level
;
private
List
<
Flag
>
flags
;
public
Task
(
String
name
,
int
level
,
List
<
Flag
>
flags
)
public
Task
(
String
name
,
int
level
,
String
description
,
List
<
Flag
>
flags
)
{
this
.
name
=
name
;
this
.
level
=
level
;
this
.
description
=
description
;
this
.
flags
=
flags
;
}
...
...
@@ -66,6 +69,16 @@ public abstract class Task
this
.
flags
=
flags
;
}
public
String
getDescription
()
{
return
description
;
}
public
void
setDescription
(
String
description
)
{
this
.
description
=
description
;
}
@Override
public
boolean
equals
(
Object
o
)
{
...
...
@@ -77,6 +90,7 @@ public abstract class Task
if
(
level
!=
task
.
level
)
return
false
;
if
(
id
!=
null
?
!
id
.
equals
(
task
.
id
)
:
task
.
id
!=
null
)
return
false
;
if
(
name
!=
null
?
!
name
.
equals
(
task
.
name
)
:
task
.
name
!=
null
)
return
false
;
if
(
description
!=
null
?
!
description
.
equals
(
task
.
description
)
:
task
.
description
!=
null
)
return
false
;
return
flags
!=
null
?
flags
.
equals
(
task
.
flags
)
:
task
.
flags
==
null
;
}
...
...
@@ -86,6 +100,7 @@ public abstract class Task
{
int
result
=
id
!=
null
?
id
.
hashCode
()
:
0
;
result
=
31
*
result
+
(
name
!=
null
?
name
.
hashCode
()
:
0
);
result
=
31
*
result
+
(
description
!=
null
?
description
.
hashCode
()
:
0
);
result
=
31
*
result
+
level
;
result
=
31
*
result
+
(
flags
!=
null
?
flags
.
hashCode
()
:
0
);
return
result
;
...
...
service/src/main/java/com/telephoners/krakyournet/ctf/beans/tasks/TextTask.java
View file @
2421e4d2
...
...
@@ -13,9 +13,9 @@ public class TextTask extends Task
{
private
String
text
;
public
TextTask
(
String
name
,
int
level
,
List
<
Flag
>
flags
,
String
text
)
public
TextTask
(
String
name
,
int
level
,
String
description
,
List
<
Flag
>
flags
,
String
text
)
{
super
(
name
,
level
,
flags
);
super
(
name
,
level
,
description
,
flags
);
this
.
text
=
text
;
}
...
...
service/src/main/java/com/telephoners/krakyournet/ctf/beans/tasks/WebTask.java
View file @
2421e4d2
...
...
@@ -23,9 +23,9 @@ public class WebTask extends Task
private
String
url
;
private
static
final
Joiner
URL_JOINER
=
Joiner
.
on
(
"/"
);
public
WebTask
(
String
name
,
int
level
,
List
<
Flag
>
flags
,
String
url
)
public
WebTask
(
String
name
,
int
level
,
String
description
,
List
<
Flag
>
flags
,
String
url
)
{
super
(
name
,
level
,
flags
);
super
(
name
,
level
,
description
,
flags
);
this
.
url
=
url
;
}
...
...
service/src/main/java/com/telephoners/krakyournet/ctf/repositories/TasksRepository.java
View file @
2421e4d2
...
...
@@ -33,9 +33,10 @@ public class TasksRepository extends Repository<Task>
public
List
<
Task
>
getAllPublic
()
{
return
datastore
.
createQuery
(
Task
.
class
)
List
<
Task
>
level
=
datastore
.
createQuery
(
Task
.
class
)
.
order
(
"level"
)
.
retrievedFields
(
true
,
DBObjectUtils
.
getPublicFields
(
Task
.
class
))
.
asList
();
return
level
;
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment