fix syn2cat links color and location
parent
da2df3cf4d
commit
22090f158f
|
@ -1,89 +1,98 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
<head>
|
||||||
<title>Level2 decrypt challenge</title>
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<title>Level2 decrypt challenge</title>
|
||||||
<link rel="stylesheet" href="theme/bootstrap.css" media="screen">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<link rel="stylesheet" href="theme/usebootstrap.css">
|
<link rel="stylesheet" href="theme/bootstrap.css" media="screen">
|
||||||
<link rel="stylesheet" href="theme/css.css">
|
<link rel="stylesheet" href="theme/usebootstrap.css">
|
||||||
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
|
<link rel="stylesheet" href="theme/css.css">
|
||||||
<!--[if lt IE 9]>
|
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
|
||||||
<script src="bootstrap/html5shiv.js"></script>
|
<!--[if lt IE 9]>
|
||||||
<script src="bootstrap/respond.min.js"></script>
|
<script src="bootstrap/html5shiv.js"></script>
|
||||||
<![endif]-->
|
<script src="bootstrap/respond.min.js"></script>
|
||||||
</head>
|
<![endif]-->
|
||||||
<body>
|
</head>
|
||||||
<div class="container">
|
|
||||||
|
<body>
|
||||||
<div class="page-header" id="banner">
|
<div class="wrap">
|
||||||
<div class="row">
|
<div class="container">
|
||||||
<div class="col-lg-6 col-lg-offset-6" id="mainDiv">
|
<div class="page-header" id="banner">
|
||||||
<h1>Welcome to syn2cat decrypt challenge</h1>
|
<div class="row">
|
||||||
<form class="bs-component">
|
<div class="col-lg-6 col-lg-offset-6" id="mainDiv">
|
||||||
<div class="form-group">
|
<h1>Welcome to syn2cat decrypt challenge</h1>
|
||||||
<label class="control-label" for="enc">Encrypted message</label>
|
<form class="bs-component">
|
||||||
<input class="form-control" id="enc" type="text" placeholder="Mffmow mf pmiz!">
|
<div class="form-group">
|
||||||
</div>
|
<label class="control-label" for="enc">Encrypted message</label>
|
||||||
<div class="form-group">
|
<input class="form-control" id="enc" type="text" placeholder="Mffmow mf pmiz!">
|
||||||
<label class="control-label" for="dec">Decrypted message</label>
|
</div>
|
||||||
<input class="form-control" id="dec" type="text" value="">
|
<div class="form-group">
|
||||||
</div>
|
<label class="control-label" for="dec">Decrypted message</label>
|
||||||
<div class="form-group">
|
<input class="form-control" id="dec" type="text" value="">
|
||||||
<div class="col-lg-10 col-lg-offset-2 pull-right">
|
</div>
|
||||||
<button id="decBtn" type="submit" class="btn btn-primary">Submit</button>
|
<div class="form-group">
|
||||||
</div>
|
<div class="col-lg-10 col-lg-offset-2 pull-right">
|
||||||
</div>
|
<button id="decBtn" type="submit" class="btn btn-primary">Submit</button>
|
||||||
</form>
|
</div>
|
||||||
This page made by <a href=https://syn2cat.lu/>Syn2Cat</a>, the a.s.b.l. running the <a href=https://level2.lu/>Level2</a> hackerspace.
|
</div>
|
||||||
</div>
|
</form>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<script src="https://code.jquery.com/jquery-1.10.2.min.js"></script>
|
<div class="footer">
|
||||||
<script src="bootstrap/bootstrap.min.js"></script>
|
<div class="row">
|
||||||
<script src="bootstrap/usebootstrap.js"></script>
|
<div class="col-lg-4 col-lg-offset-8">
|
||||||
<script>
|
<p class="text-muted credit"> This page made by <a href=https://syn2cat.lu/>Syn2Cat</a>, the a.s.b.l. running the <a href=https://level2.lu/>Level2</a> hackerspace.</p>
|
||||||
var caesarShift = function(str, amount) {
|
</div>
|
||||||
if (amount < 0)
|
</div>
|
||||||
return caesarShift(str, amount + 26);
|
</div>
|
||||||
var output = '';
|
|
||||||
for (var i = 0; i < str.length; i ++) {
|
|
||||||
var c = str[i];
|
|
||||||
if (c.match(/[a-z]/i)) {
|
<script src="https://code.jquery.com/jquery-1.10.2.min.js"></script>
|
||||||
var code = str.charCodeAt(i);
|
<script src="bootstrap/bootstrap.min.js"></script>
|
||||||
if ((code >= 65) && (code <= 90))
|
<script src="bootstrap/usebootstrap.js"></script>
|
||||||
c = String.fromCharCode(((code - 65 + amount) % 26) + 65);
|
<script>
|
||||||
else if ((code >= 97) && (code <= 122))
|
var caesarShift = function(str, amount) {
|
||||||
c = String.fromCharCode(((code - 97 + amount) % 26) + 97);
|
if (amount < 0)
|
||||||
}
|
return caesarShift(str, amount + 26);
|
||||||
output += c;
|
var output = '';
|
||||||
}
|
for (var i = 0; i < str.length; i++) {
|
||||||
return output;
|
var c = str[i];
|
||||||
};
|
if (c.match(/[a-z]/i)) {
|
||||||
$( document ).ready(function() {
|
var code = str.charCodeAt(i);
|
||||||
$("#decBtn").click(function( event ) {
|
if ((code >= 65) && (code <= 90))
|
||||||
event.preventDefault();
|
c = String.fromCharCode(((code - 65 + amount) % 26) + 65);
|
||||||
var enc = $("#enc").val();
|
else if ((code >= 97) && (code <= 122))
|
||||||
var dec = $("#dec").val();
|
c = String.fromCharCode(((code - 97 + amount) % 26) + 97);
|
||||||
var result = "";//caesarShift(enc,-12);
|
}
|
||||||
var succeed = false;
|
output += c;
|
||||||
for (var i = 1; i <26; i++)
|
}
|
||||||
{
|
return output;
|
||||||
result = caesarShift(enc,i);
|
};
|
||||||
if (result === dec){
|
$(document).ready(function() {
|
||||||
$("#mainDiv").empty().append("<h1 class='text-success'>Congratulations, you made it!</h1><h3><a href='./index.html'>click here to<br>Try another code</a></h3>");
|
$("#decBtn").click(function(event) {
|
||||||
succeed = true;
|
event.preventDefault();
|
||||||
}
|
var enc = $("#enc").val();
|
||||||
if (!succeed)
|
var dec = $("#dec").val();
|
||||||
$("#mainDiv").empty().append("<h1 class='text-danger'>Sorry, you didn't succeed</h1><h3><a href='./index.html'>click here to<br>Try again</a></h3>");
|
var result = ""; //caesarShift(enc,-12);
|
||||||
}
|
var succeed = false;
|
||||||
});
|
for (var i = 1; i < 26; i++) {
|
||||||
});
|
result = caesarShift(enc, i);
|
||||||
|
if (result === dec) {
|
||||||
</script>
|
$("#mainDiv").empty().append("<h1 class='text-success'>Congratulations, you made it!</h1><h3><a href='./index.html'>click here to<br>Try another code</a></h3>");
|
||||||
</body>
|
succeed = true;
|
||||||
</html>
|
}
|
||||||
|
if (!succeed)
|
||||||
|
$("#mainDiv").empty().append("<h1 class='text-danger'>Sorry, you didn't succeed</h1><h3><a href='./index.html'>click here to<br>Try again</a></h3>");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
||||||
|
|
|
@ -9,21 +9,28 @@ body {
|
||||||
color:#fff;
|
color:#fff;
|
||||||
background-color:#333;
|
background-color:#333;
|
||||||
font-family: 'Open Sans',Arial,Helvetica,Sans-Serif;
|
font-family: 'Open Sans',Arial,Helvetica,Sans-Serif;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
/* Sticky footer styles
|
||||||
|
-------------------------------------------------- */
|
||||||
|
/* Wrapper for page content to push down footer */
|
||||||
|
.wrap {
|
||||||
|
min-height: 100%;
|
||||||
|
height: auto !important;
|
||||||
|
height: 100%;
|
||||||
|
/* Negative indent footer by its height */
|
||||||
|
margin: 0 auto -60px;
|
||||||
|
/* Pad bottom by footer height */
|
||||||
|
padding: 0 0 60px;
|
||||||
}
|
}
|
||||||
|
|
||||||
a:link, a:visited {
|
/* Set the fixed height of the footer here */
|
||||||
color:#eee;
|
.footer {
|
||||||
}
|
height: 60px;
|
||||||
|
background-color: #00000000;
|
||||||
.block {
|
position: absolute;
|
||||||
background-color:rgba(0,0,0,0.2);
|
left: 0;
|
||||||
height:370px;
|
bottom: 0;
|
||||||
padding-left:12px;
|
|
||||||
padding-right:12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.block-sm {
|
|
||||||
height:180px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-flat {
|
.btn-flat {
|
||||||
|
|
Loading…
Reference in New Issue