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
9fdefc84
Commit
9fdefc84
authored
Apr 04, 2016
by
Dominik Rosiek
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of gitlab.telemabk.pl:jifwin/CTF
parents
ada7fde6
da59c9b5
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
10 additions
and
21 deletions
+10
-21
Gruntfile.js
Gruntfile.js
+1
-1
configuration.local.yml
service/configuration.local.yml
+1
-1
configuration.prod.yml
service/configuration.prod.yml
+3
-3
configuration.yml
service/configuration.yml
+1
-0
UtilResource.java
...m/telephoners/krakyournet/ctf/resources/UtilResource.java
+1
-3
redirect.html
service/src/main/resources/assets/redirect.html
+0
-10
loginController.js
...esources/assets/statics/js/controllers/loginController.js
+2
-2
main.js
service/src/main/resources/assets/statics/js/main.js
+1
-1
No files found.
Gruntfile.js
View file @
9fdefc84
service/configuration.local.yml
View file @
9fdefc84
...
...
@@ -4,7 +4,7 @@ server:
-
type
:
http
port
:
8080
dbHost
:
57.37.192.46
dbHost
:
92f653f4-cf83-4801-8475-cd748954c3b6.node.dockerapp.io
dbPort
:
27017
dbName
:
db
...
...
service/configuration.prod.yml
View file @
9fdefc84
...
...
@@ -4,12 +4,12 @@ server:
-
type
:
http
port
:
8080
dbHost
:
52.
37.192.46
dbHost
:
52.
58.79.68
dbPort
:
27017
dbName
:
db
startupConfiguration
:
domainName
:
"
52.2
5.28.6
4"
domainName
:
"
52.2
8.244.2
4"
port
:
8080
schema
:
"
http"
...
...
@@ -113,7 +113,7 @@ textTasks:
webTasks
:
-
name
:
"
SQL
Injection"
url
:
"
http://
google.pl
"
url
:
"
http://
52.29.190.67
"
level
:
3
flags
:
-
value
:
"
AGH_sdfg1fs"
...
...
service/configuration.yml
0 → 120000
View file @
9fdefc84
configuration.prod.yml
\ No newline at end of file
service/src/main/java/com/telephoners/krakyournet/ctf/resources/UtilResource.java
View file @
9fdefc84
...
...
@@ -6,7 +6,6 @@ import com.telephoners.krakyournet.ctf.beans.User;
import
com.telephoners.krakyournet.ctf.core.ApplicationConfiguration
;
import
com.telephoners.krakyournet.ctf.repositories.TeamsRepository
;
import
io.dropwizard.auth.Auth
;
import
org.apache.commons.io.FileUtils
;
import
javax.inject.Inject
;
import
javax.inject.Singleton
;
...
...
@@ -16,7 +15,6 @@ import javax.ws.rs.Produces;
import
javax.ws.rs.core.HttpHeaders
;
import
javax.ws.rs.core.MediaType
;
import
javax.ws.rs.core.Response
;
import
java.io.File
;
import
java.io.IOException
;
@Singleton
...
...
@@ -24,6 +22,7 @@ import java.io.IOException;
@Produces
(
MediaType
.
APPLICATION_JSON
)
public
class
UtilResource
{
private
static
String
redirectHtml
=
"<!DOCTYPE html><html lang=\"en\" ng-app=\"ctfApp\"><head></head><script type=\"text/javascript\">window.location = \"http://\" + window.location.host;</script></html>"
;
private
final
TeamsRepository
teamsRepository
;
private
final
ApplicationConfiguration
applicationConfiguration
;
...
...
@@ -65,7 +64,6 @@ public class UtilResource
@Path
(
"/auth"
)
public
Response
auth
(
@Auth
User
user
)
throws
IOException
{
String
redirectHtml
=
new
String
(
FileUtils
.
readFileToByteArray
(
new
File
(
"service/src/main/resources/assets/redirect.html"
)));
return
Response
.
ok
()
.
entity
(
redirectHtml
)
.
header
(
HttpHeaders
.
CONTENT_TYPE
,
"text/html"
)
...
...
service/src/main/resources/assets/redirect.html
deleted
100644 → 0
View file @
ada7fde6
<!DOCTYPE html>
<html
lang=
"en"
ng-app=
"ctfApp"
>
<head>
</head>
<script
type=
"text/javascript"
>
window
.
location
=
"http://"
+
window
.
location
.
host
;
</script>
</body>
</html>
service/src/main/resources/assets/statics/js/controllers/loginController.js
View file @
9fdefc84
...
...
@@ -13,7 +13,7 @@
$location
.
path
(
'/'
);
AuthenticationService
.
setCredentials
(
$scope
.
username
,
$scope
.
password
,
response
.
team
);
// redirect to additional external auth point
$window
.
location
.
href
=
"http://"
+
$scope
.
username
+
":"
+
$scope
.
password
+
"@52.2
5.28.64/
:8080/api/v1/auth"
;
$window
.
location
.
href
=
"http://"
+
$scope
.
username
+
":"
+
$scope
.
password
+
"@52.2
8.244.24
:8080/api/v1/auth"
;
}
else
{
Materialize
.
toast
(
'Błąd logowania! Spróbuj jeszcze raz.'
,
5000
,
'toast-error'
);
$scope
.
dataLoading
=
false
;
...
...
service/src/main/resources/assets/statics/js/main.js
View file @
9fdefc84
...
...
@@ -38,7 +38,7 @@
}]);
app
.
factory
(
'AppSettings'
,
function
()
{
var
dev
=
"localhost:8080/api/v1"
,
prod
=
"52.2
5.28.6
4:8080/api/v1"
;
var
dev
=
"localhost:8080/api/v1"
,
prod
=
"52.2
8.244.2
4:8080/api/v1"
;
return
{
apiAddress
:
prod
};
...
...
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