first commit
This commit is contained in:
parent
75cb1988a7
commit
25c230a427
6 changed files with 563 additions and 0 deletions
138
css/prism.css
Normal file
138
css/prism.css
Normal file
|
@ -0,0 +1,138 @@
|
|||
/* http://prismjs.com/download.html?themes=prism&languages=markup+css+clike+javascript+less */
|
||||
/**
|
||||
* prism.js default theme for JavaScript, CSS and HTML
|
||||
* Based on dabblet (http://dabblet.com)
|
||||
* @author Lea Verou
|
||||
*/
|
||||
|
||||
code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
color: black;
|
||||
text-shadow: 0 1px white;
|
||||
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
|
||||
direction: ltr;
|
||||
text-align: left;
|
||||
white-space: pre;
|
||||
word-spacing: normal;
|
||||
word-break: normal;
|
||||
word-wrap: normal;
|
||||
line-height: 1.5;
|
||||
|
||||
-moz-tab-size: 4;
|
||||
-o-tab-size: 4;
|
||||
tab-size: 4;
|
||||
|
||||
-webkit-hyphens: none;
|
||||
-moz-hyphens: none;
|
||||
-ms-hyphens: none;
|
||||
hyphens: none;
|
||||
}
|
||||
|
||||
pre[class*="language-"]::-moz-selection, pre[class*="language-"] ::-moz-selection,
|
||||
code[class*="language-"]::-moz-selection, code[class*="language-"] ::-moz-selection {
|
||||
text-shadow: none;
|
||||
background: #b3d4fc;
|
||||
}
|
||||
|
||||
pre[class*="language-"]::selection, pre[class*="language-"] ::selection,
|
||||
code[class*="language-"]::selection, code[class*="language-"] ::selection {
|
||||
text-shadow: none;
|
||||
background: #b3d4fc;
|
||||
}
|
||||
|
||||
@media print {
|
||||
code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
text-shadow: none;
|
||||
}
|
||||
}
|
||||
|
||||
/* Code blocks */
|
||||
pre[class*="language-"] {
|
||||
padding: 1em;
|
||||
margin: .5em 0;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
:not(pre) > code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
background: #f5f2f0;
|
||||
}
|
||||
|
||||
/* Inline code */
|
||||
:not(pre) > code[class*="language-"] {
|
||||
padding: .1em;
|
||||
border-radius: .3em;
|
||||
}
|
||||
|
||||
.token.comment,
|
||||
.token.prolog,
|
||||
.token.doctype,
|
||||
.token.cdata {
|
||||
color: slategray;
|
||||
}
|
||||
|
||||
.token.punctuation {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.namespace {
|
||||
opacity: .7;
|
||||
}
|
||||
|
||||
.token.property,
|
||||
.token.tag,
|
||||
.token.boolean,
|
||||
.token.number,
|
||||
.token.constant,
|
||||
.token.symbol,
|
||||
.token.deleted {
|
||||
color: #905;
|
||||
}
|
||||
|
||||
.token.selector,
|
||||
.token.attr-name,
|
||||
.token.string,
|
||||
.token.char,
|
||||
.token.builtin,
|
||||
.token.inserted {
|
||||
color: #690;
|
||||
}
|
||||
|
||||
.token.operator,
|
||||
.token.entity,
|
||||
.token.url,
|
||||
.language-css .token.string,
|
||||
.style .token.string {
|
||||
color: #a67f59;
|
||||
background: hsla(0, 0%, 100%, .5);
|
||||
}
|
||||
|
||||
.token.atrule,
|
||||
.token.attr-value,
|
||||
.token.keyword {
|
||||
color: #07a;
|
||||
}
|
||||
|
||||
.token.function {
|
||||
color: #DD4A68;
|
||||
}
|
||||
|
||||
.token.regex,
|
||||
.token.important,
|
||||
.token.variable {
|
||||
color: #e90;
|
||||
}
|
||||
|
||||
.token.important,
|
||||
.token.bold {
|
||||
font-weight: bold;
|
||||
}
|
||||
.token.italic {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.token.entity {
|
||||
cursor: help;
|
||||
}
|
||||
|
80
css/style.css
Normal file
80
css/style.css
Normal file
|
@ -0,0 +1,80 @@
|
|||
.site-content {
|
||||
text-align: left;
|
||||
max-width: 940px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
margin-top: 60px;
|
||||
margin-bottom: 90px;
|
||||
font-family: 'Enriqueta', serif;
|
||||
}
|
||||
.site-content h1 {
|
||||
margin-top: 0;
|
||||
font-family: 'Roboto', Arial, sans-serif;
|
||||
}
|
||||
.site-content p {
|
||||
margin-bottom: 25px;
|
||||
line-height: 1.8;
|
||||
}
|
||||
.site-content pre {
|
||||
position: relative;
|
||||
padding: 30px;
|
||||
}
|
||||
|
||||
.copy-button {
|
||||
cursor: pointer;
|
||||
border: 0;
|
||||
font-size: 10px;
|
||||
text-transform: uppercase;
|
||||
font-weight: 500;
|
||||
padding: 6px 10px 10px;
|
||||
color: #795548;
|
||||
background-color: transparent;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.copy-button:hover,
|
||||
.copy-button:focus,
|
||||
.copy-button:active {
|
||||
outline: 0;
|
||||
background-color: #eee9e6;
|
||||
}
|
||||
|
||||
.copy-button:before {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
margin-right: 3px;
|
||||
background-size: contain;
|
||||
background-image: url('../img/clipboard.svg');
|
||||
background-repeat: no-repeat;
|
||||
position: relative;
|
||||
top: 3px;
|
||||
}
|
||||
|
||||
.content-section {
|
||||
padding: 40px;
|
||||
}
|
||||
.content-section--paste {
|
||||
margin-top: 60px;
|
||||
background-color: #CFD8DC;
|
||||
}
|
||||
.content-section--paste h1 {
|
||||
font-size: 12px;
|
||||
color: #546E7A;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
#paste-content {
|
||||
border: 2px dashed #B0BEC5;
|
||||
min-height: 160px;
|
||||
}
|
||||
#paste-content:focus {
|
||||
outline: 0;
|
||||
border-color: #90A4AE;
|
||||
}
|
||||
#paste-content pre {
|
||||
margin: 0 !important;
|
||||
}
|
309
index.php
Normal file
309
index.php
Normal file
|
@ -0,0 +1,309 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<link rel="stylesheet" href="css/prism.css">
|
||||
<link rel="stylesheet" href="css/style.css">
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.4.2/clipboard.min.js"></script>
|
||||
<script src="js/prism.js"></script>
|
||||
|
||||
<style>
|
||||
@body-bg: #456;
|
||||
@color-light : #999;
|
||||
@color-dark : #777;
|
||||
body {
|
||||
background-color: #456;
|
||||
background-color: @body-bg;
|
||||
color: #EEE;
|
||||
color: contrast(@body-bg, @color-dark, @color-light);
|
||||
width:100%;
|
||||
}
|
||||
|
||||
input:invalid {
|
||||
border: 2px solid red;
|
||||
}
|
||||
|
||||
input:valid {
|
||||
border: 1px solid green;
|
||||
}
|
||||
|
||||
input:required {
|
||||
background:hsl(180, 50%, 90%);
|
||||
}
|
||||
|
||||
input, textarea, select {
|
||||
padding:3px;
|
||||
border:1px solid #F5C5C5;
|
||||
border-radius:5px;
|
||||
width:250px;
|
||||
box-shadow:1px 5px 5px #333;
|
||||
}
|
||||
|
||||
input[type=submit] {
|
||||
width:100px;
|
||||
margin-left:5px;
|
||||
box-shadow:1px 5px 5px #333;
|
||||
cursor:pointer;
|
||||
}
|
||||
|
||||
.post-it {
|
||||
background:#fefabc;
|
||||
padding:15px;
|
||||
font-family: 'Gloria Hallelujah', cursive;
|
||||
font-size:15px;
|
||||
color:#000;
|
||||
width:250px;
|
||||
|
||||
-moz-transform: rotate(7deg);
|
||||
-webkit-transform: rotate(7deg);
|
||||
-o-transform: rotate(7deg);
|
||||
-ms-transform: rotate(7deg);
|
||||
transform: rotate(7deg);
|
||||
|
||||
box-shadow: 0px 10px 12px #333;
|
||||
-moz-box-shadow: 0px 10px 12px #333;
|
||||
-webkit-box-shadow: 0px 10px 12px #333;
|
||||
}
|
||||
|
||||
.post-it2 {
|
||||
background:#FFFFB0;
|
||||
text-align: left;
|
||||
vertical-align: top;
|
||||
padding:10px;
|
||||
color: #000;
|
||||
width:100%;
|
||||
height:155px;
|
||||
box-shadow: 0px 10px 12px #333;
|
||||
-moz-box-shadow: 0px 10px 12px #333;
|
||||
-webkit-box-shadow: 0px 10px 12px #333;
|
||||
}
|
||||
|
||||
hr {
|
||||
width:35%;
|
||||
}
|
||||
|
||||
a
|
||||
{
|
||||
color: #c94663;
|
||||
}
|
||||
a:link {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
|
||||
strong, b
|
||||
{
|
||||
font-weight: 700;
|
||||
color: #232323;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="site-content" id="content">
|
||||
<center> <H1>Crypteur de Mot de Passe pour les .Htaccess </H1></center>
|
||||
<center>
|
||||
<?php
|
||||
|
||||
// Formulaire
|
||||
if (isset($_POST['login']) AND isset($_POST['pass']))
|
||||
{
|
||||
// SECU XSS
|
||||
$login = htmlspecialchars($_POST['login'], ENT_QUOTES, 'UTF-8');
|
||||
$pass = htmlspecialchars($_POST['pass'], ENT_QUOTES, 'UTF-8');
|
||||
// $pass_crypte = md5($_POST['pass']); // On crypte le mot de passe
|
||||
$pass_crypte = password_hash($_POST["pass"], PASSWORD_BCRYPT);
|
||||
$passdecry = ' . $login . ":" . $pass_crypte.'; // on affiche le passwd
|
||||
echo '<br><font size="5">Copier la ligne ci-dessous dans le fichier <b>.htpasswd</b></font><br /><br />';
|
||||
if (!isset($login)) $login = 'joe';
|
||||
if (!isset($pass_crypte)) $pass_crypte = '$1$ndTfdTH2$2nTqNz5KiTfDzAsVhPSu2.';
|
||||
echo '<pre><code class="language-less">' . $login . ":" . $pass_crypte.'</code></pre>';
|
||||
?>
|
||||
|
||||
<section class="content-section content-section--paste" id="paste-section">
|
||||
<h1>Paste it here</h1>
|
||||
<div id="paste-content" contenteditable="true" style="color:black"></div>
|
||||
</section>
|
||||
<?php
|
||||
}
|
||||
else // On n'a pas encore rempli le formulaire
|
||||
{
|
||||
?>
|
||||
|
||||
<center>
|
||||
<p class="Style2">Entrez votre login et votre mot de passe pour le crypter.</p>
|
||||
<form method="post">
|
||||
<p align="center"> Login : <br />
|
||||
<input type="text" name="login" required>
|
||||
<br />
|
||||
<br />
|
||||
Mot de passe : <br />
|
||||
<input type="text" name="pass" required>
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
<input name="submit" type="submit" value="Crypter !">
|
||||
</p>
|
||||
</form>
|
||||
</center>
|
||||
|
||||
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
<!-- Post-it pour rappel création fichier -->
|
||||
<center>
|
||||
<br /><br /><br />
|
||||
<hr>
|
||||
<br /><br />
|
||||
<div class="post-it">
|
||||
<h2>Don't Forget!!</h2>
|
||||
<ul>
|
||||
<li>Create file: .htpasswd </li>
|
||||
<li>Create file: .htaccess</li>
|
||||
<li>In your web repo.</li>
|
||||
</ul>
|
||||
</div>
|
||||
<br /><br />
|
||||
<TABLE BORDER=0 CELLSPACING=10 CELLPADDING=20 ALIGN="center">
|
||||
<TR><div align="center"><em>Exemple Fichier .htaccess</em></div></TR>
|
||||
|
||||
<TR><TD><h1>.htpasswd</h1></TD><TD><h1>.htacces</h1></TD></TR>
|
||||
<TR><TD>
|
||||
<div class="post-it2" WIDTH=100%>
|
||||
<?php
|
||||
if (!isset($login)) $login = 'joe';
|
||||
if (!isset($pass_crypte)) $pass_crypte = '$1$ndTfdTH2$2nTqNz5KiTfDzAsVhPSu2.';
|
||||
echo '<span style="color:black;" id="copyTarget">' . $login . ':' . $pass_crypte.'</span>'; ?>
|
||||
</div>
|
||||
</TD>
|
||||
<TD>
|
||||
<div class="post-it2">
|
||||
<em>
|
||||
<font size="3"> AuthName "Restricted Access"<br />
|
||||
AuthGroupFile /dev/null<br />
|
||||
AuthType Basic<br />
|
||||
AuthUserFile /path/to/.htpasswd<br />
|
||||
require valid-user<br />
|
||||
</font></em>
|
||||
</div> </TD></TR>
|
||||
</TABLE>
|
||||
|
||||
<br />
|
||||
<?php
|
||||
ini_set("allow_url_fopen", "On");
|
||||
define('VERSION', '0.1');
|
||||
$script = file_get_contents('https://tools.echosystem.fr/Password/htaccess/version.txt');
|
||||
define('REMOTE_VERSION', $script);
|
||||
// echo REMOTE_VERSION;
|
||||
if(VERSION == REMOTE_VERSION) {
|
||||
echo "<div class='success'>
|
||||
<p>You have the latest version! </p>
|
||||
</div>"; echo VERSION;
|
||||
} else {
|
||||
echo "<div class='error'> Update v.";
|
||||
echo $script;
|
||||
echo " available!";
|
||||
echo " Your version is v.";
|
||||
echo VERSION;
|
||||
// echo "<br /> Latest Version: ";
|
||||
// echo REMOTE_VERSION; echo $script;
|
||||
echo "</div>";
|
||||
}
|
||||
?>
|
||||
|
||||
<br />
|
||||
Script by <a href="https://erreur32.echosystem.fr">Erreur32</a> | Version: <a href="https://tools.echosystem.fr/Password/htaccess/version.txt"><?php echo VERSION; ?></a> | <?php echo date('Y'); ?>
|
||||
</center>
|
||||
|
||||
<script>
|
||||
(function(){
|
||||
|
||||
// Get the elements.
|
||||
// - the 'pre' element.
|
||||
// - the 'div' with the 'paste-content' id.
|
||||
|
||||
var pre = document.getElementsByTagName('pre');
|
||||
var pasteContent = document.getElementById('paste-content');
|
||||
|
||||
// Add a copy button in the 'pre' element.
|
||||
// which only has the className of 'language-'.
|
||||
|
||||
for (var i = 0; i < pre.length; i++) {
|
||||
var isLanguage = pre[i].children[0].className.indexOf('language-');
|
||||
|
||||
if ( isLanguage === 0 ) {
|
||||
var button = document.createElement('button');
|
||||
button.className = 'copy-button';
|
||||
button.textContent = 'Copy';
|
||||
|
||||
pre[i].appendChild(button);
|
||||
}
|
||||
};
|
||||
|
||||
// Run Clipboard
|
||||
|
||||
var copyCode = new Clipboard('.copy-button', {
|
||||
target: function(trigger) {
|
||||
return trigger.previousElementSibling;
|
||||
}
|
||||
});
|
||||
|
||||
// On success:
|
||||
// - Change the "Copy" text to "Copied".
|
||||
// - Swap it to "Copy" in 2s.
|
||||
// - Lead user to the "contenteditable" area with Velocity scroll.
|
||||
|
||||
copyCode.on('success', function(event) {
|
||||
event.clearSelection();
|
||||
event.trigger.textContent = 'Copied';
|
||||
window.setTimeout(function() {
|
||||
event.trigger.textContent = 'Copy';
|
||||
}, 2000);
|
||||
|
||||
$.Velocity(pasteContent, 'scroll', {
|
||||
duration: 1000
|
||||
});
|
||||
});
|
||||
|
||||
// On error (Safari):
|
||||
// - Change the "Press Ctrl+C to copy"
|
||||
// - Swap it to "Copy" in 2s.
|
||||
|
||||
copyCode.on('error', function(event) {
|
||||
event.trigger.textContent = 'Press "Ctrl + C" to copy';
|
||||
window.setTimeout(function() {
|
||||
event.trigger.textContent = 'Copy';
|
||||
}, 5000);
|
||||
});
|
||||
|
||||
})();
|
||||
</script> </div>
|
||||
</body>
|
||||
|
||||
<!-- /!\ Your ip is loggued! -->
|
||||
<!-- <?php echo $_SERVER['REMOTE_ADDR']; ?> -->
|
||||
<!-- Get info: <?php $hostname = gethostbyaddr($_SERVER['REMOTE_ADDR']); echo $hostname; ?> -->
|
||||
<!-- Bye -->
|
||||
<!--
|
||||
by 🅴🆁🆁🅴🆄🆁32
|
||||
|
||||
Hosted on
|
||||
|
||||
🅴🅲🅷🔵🆂🆈🆂🆃🅴🅼
|
||||
_____ _ _
|
||||
| ____| ___ | |__ ___ ___ _ _ ___ | |_ ___ _ __ ___
|
||||
| _| / __|| '_ \ / _ \ / __|| | | |/ __|| __|/ _ \| '_ ` _ \
|
||||
| |___| (__ | | | || (_) |\__ \| |_| |\__ \| |_| __/| | | | | |
|
||||
|_____|\___||_| |_| \___/ |___/ \__, ||___/ \__|\___||_| |_| |_|
|
||||
|___/
|
||||
|
||||
|
||||
01010111011001010110110001100011011011110110110101100101001000000111010001101111001000000100110101111001001000000101001101101001011101000110010100100000001000010010000000111010001010010010000000001101000010100000110100001010010000010110111001101111011101000110100001100101011100100010000001000010011011000110111101100111001000000110000101100010011011110111010101110100001000000100100101010100001000000010110100100000010100110110010101100011011101010111001001101001011101000111100100001101000010100000110100001010000011010000101001010000011011110111011101100101011100100110010101100100001000000100001001111001001000000100010101110010011100100110010101110101011100100011001100110010
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
7
js/prism.js
Normal file
7
js/prism.js
Normal file
|
@ -0,0 +1,7 @@
|
|||
/* http://prismjs.com/download.html?themes=prism&languages=markup+css+clike+javascript+less */
|
||||
var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(){var e=/\blang(?:uage)?-(?!\*)(\w+)\b/i,t=_self.Prism={util:{encode:function(e){return e instanceof n?new n(e.type,t.util.encode(e.content),e.alias):"Array"===t.util.type(e)?e.map(t.util.encode):e.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).match(/\[object (\w+)\]/)[1]},clone:function(e){var n=t.util.type(e);switch(n){case"Object":var a={};for(var r in e)e.hasOwnProperty(r)&&(a[r]=t.util.clone(e[r]));return a;case"Array":return e.map&&e.map(function(e){return t.util.clone(e)})}return e}},languages:{extend:function(e,n){var a=t.util.clone(t.languages[e]);for(var r in n)a[r]=n[r];return a},insertBefore:function(e,n,a,r){r=r||t.languages;var l=r[e];if(2==arguments.length){a=arguments[1];for(var i in a)a.hasOwnProperty(i)&&(l[i]=a[i]);return l}var o={};for(var s in l)if(l.hasOwnProperty(s)){if(s==n)for(var i in a)a.hasOwnProperty(i)&&(o[i]=a[i]);o[s]=l[s]}return t.languages.DFS(t.languages,function(t,n){n===r[e]&&t!=e&&(this[t]=o)}),r[e]=o},DFS:function(e,n,a){for(var r in e)e.hasOwnProperty(r)&&(n.call(e,r,e[r],a||r),"Object"===t.util.type(e[r])?t.languages.DFS(e[r],n):"Array"===t.util.type(e[r])&&t.languages.DFS(e[r],n,r))}},plugins:{},highlightAll:function(e,n){for(var a,r=document.querySelectorAll('code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'),l=0;a=r[l++];)t.highlightElement(a,e===!0,n)},highlightElement:function(n,a,r){for(var l,i,o=n;o&&!e.test(o.className);)o=o.parentNode;o&&(l=(o.className.match(e)||[,""])[1],i=t.languages[l]),n.className=n.className.replace(e,"").replace(/\s+/g," ")+" language-"+l,o=n.parentNode,/pre/i.test(o.nodeName)&&(o.className=o.className.replace(e,"").replace(/\s+/g," ")+" language-"+l);var s=n.textContent,u={element:n,language:l,grammar:i,code:s};if(!s||!i)return t.hooks.run("complete",u),void 0;if(t.hooks.run("before-highlight",u),a&&_self.Worker){var g=new Worker(t.filename);g.onmessage=function(e){u.highlightedCode=e.data,t.hooks.run("before-insert",u),u.element.innerHTML=u.highlightedCode,r&&r.call(u.element),t.hooks.run("after-highlight",u),t.hooks.run("complete",u)},g.postMessage(JSON.stringify({language:u.language,code:u.code,immediateClose:!0}))}else u.highlightedCode=t.highlight(u.code,u.grammar,u.language),t.hooks.run("before-insert",u),u.element.innerHTML=u.highlightedCode,r&&r.call(n),t.hooks.run("after-highlight",u),t.hooks.run("complete",u)},highlight:function(e,a,r){var l=t.tokenize(e,a);return n.stringify(t.util.encode(l),r)},tokenize:function(e,n){var a=t.Token,r=[e],l=n.rest;if(l){for(var i in l)n[i]=l[i];delete n.rest}e:for(var i in n)if(n.hasOwnProperty(i)&&n[i]){var o=n[i];o="Array"===t.util.type(o)?o:[o];for(var s=0;s<o.length;++s){var u=o[s],g=u.inside,c=!!u.lookbehind,f=0,h=u.alias;u=u.pattern||u;for(var p=0;p<r.length;p++){var d=r[p];if(r.length>e.length)break e;if(!(d instanceof a)){u.lastIndex=0;var m=u.exec(d);if(m){c&&(f=m[1].length);var y=m.index-1+f,m=m[0].slice(f),v=m.length,k=y+v,b=d.slice(0,y+1),w=d.slice(k+1),P=[p,1];b&&P.push(b);var A=new a(i,g?t.tokenize(m,g):m,h);P.push(A),w&&P.push(w),Array.prototype.splice.apply(r,P)}}}}}return r},hooks:{all:{},add:function(e,n){var a=t.hooks.all;a[e]=a[e]||[],a[e].push(n)},run:function(e,n){var a=t.hooks.all[e];if(a&&a.length)for(var r,l=0;r=a[l++];)r(n)}}},n=t.Token=function(e,t,n){this.type=e,this.content=t,this.alias=n};if(n.stringify=function(e,a,r){if("string"==typeof e)return e;if("Array"===t.util.type(e))return e.map(function(t){return n.stringify(t,a,e)}).join("");var l={type:e.type,content:n.stringify(e.content,a,r),tag:"span",classes:["token",e.type],attributes:{},language:a,parent:r};if("comment"==l.type&&(l.attributes.spellcheck="true"),e.alias){var i="Array"===t.util.type(e.alias)?e.alias:[e.alias];Array.prototype.push.apply(l.classes,i)}t.hooks.run("wrap",l);var o="";for(var s in l.attributes)o+=(o?" ":"")+s+'="'+(l.attributes[s]||"")+'"';return"<"+l.tag+' class="'+l.classes.join(" ")+'" '+o+">"+l.content+"</"+l.tag+">"},!_self.document)return _self.addEventListener?(_self.addEventListener("message",function(e){var n=JSON.parse(e.data),a=n.language,r=n.code,l=n.immediateClose;_self.postMessage(t.highlight(r,t.languages[a],a)),l&&_self.close()},!1),_self.Prism):_self.Prism;var a=document.getElementsByTagName("script");return a=a[a.length-1],a&&(t.filename=a.src,document.addEventListener&&!a.hasAttribute("data-manual")&&document.addEventListener("DOMContentLoaded",t.highlightAll)),_self.Prism}();"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism);
|
||||
Prism.languages.markup={comment:/<!--[\w\W]*?-->/,prolog:/<\?[\w\W]+?\?>/,doctype:/<!DOCTYPE[\w\W]+?>/,cdata:/<!\[CDATA\[[\w\W]*?]]>/i,tag:{pattern:/<\/?[^\s>\/=.]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\\1|\\?(?!\1)[\w\W])*\1|[^\s'">=]+))?)*\s*\/?>/i,inside:{tag:{pattern:/^<\/?[^\s>\/]+/i,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=(?:('|")[\w\W]*?(\1)|[^\s>]+)/i,inside:{punctuation:/[=>"']/}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:/&#?[\da-z]{1,8};/i},Prism.hooks.add("wrap",function(a){"entity"===a.type&&(a.attributes.title=a.content.replace(/&/,"&"))}),Prism.languages.xml=Prism.languages.markup,Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup;
|
||||
Prism.languages.css={comment:/\/\*[\w\W]*?\*\//,atrule:{pattern:/@[\w-]+?.*?(;|(?=\s*\{))/i,inside:{rule:/@[\w-]+/}},url:/url\((?:(["'])(\\(?:\r\n|[\w\W])|(?!\1)[^\\\r\n])*\1|.*?)\)/i,selector:/[^\{\}\s][^\{\};]*?(?=\s*\{)/,string:/("|')(\\(?:\r\n|[\w\W])|(?!\1)[^\\\r\n])*\1/,property:/(\b|\B)[\w-]+(?=\s*:)/i,important:/\B!important\b/i,"function":/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:]/},Prism.languages.css.atrule.inside.rest=Prism.util.clone(Prism.languages.css),Prism.languages.markup&&(Prism.languages.insertBefore("markup","tag",{style:{pattern:/(<style[\w\W]*?>)[\w\W]*?(?=<\/style>)/i,lookbehind:!0,inside:Prism.languages.css,alias:"language-css"}}),Prism.languages.insertBefore("inside","attr-value",{"style-attr":{pattern:/\s*style=("|').*?\1/i,inside:{"attr-name":{pattern:/^\s*style/i,inside:Prism.languages.markup.tag.inside},punctuation:/^\s*=\s*['"]|['"]\s*$/,"attr-value":{pattern:/.+/i,inside:Prism.languages.css}},alias:"language-css"}},Prism.languages.markup.tag));
|
||||
Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\w\W]*?\*\//,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0}],string:/(["'])(\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,"class-name":{pattern:/((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[a-z0-9_\.\\]+/i,lookbehind:!0,inside:{punctuation:/(\.|\\)/}},keyword:/\b(if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,"boolean":/\b(true|false)\b/,"function":/[a-z0-9_]+(?=\()/i,number:/\b-?(?:0x[\da-f]+|\d*\.?\d+(?:e[+-]?\d+)?)\b/i,operator:/--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/,punctuation:/[{}[\];(),.:]/};
|
||||
Prism.languages.javascript=Prism.languages.extend("clike",{keyword:/\b(as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|var|void|while|with|yield)\b/,number:/\b-?(0x[\dA-Fa-f]+|0b[01]+|0o[0-7]+|\d*\.?\d+([Ee][+-]?\d+)?|NaN|Infinity)\b/,"function":/[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*(?=\()/i}),Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/(^|[^/])\/(?!\/)(\[.+?]|\\.|[^/\\\r\n])+\/[gimyu]{0,5}(?=\s*($|[\r\n,.;})]))/,lookbehind:!0}}),Prism.languages.insertBefore("javascript","class-name",{"template-string":{pattern:/`(?:\\`|\\?[^`])*`/,inside:{interpolation:{pattern:/\$\{[^}]+\}/,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&Prism.languages.insertBefore("markup","tag",{script:{pattern:/(<script[\w\W]*?>)[\w\W]*?(?=<\/script>)/i,lookbehind:!0,inside:Prism.languages.javascript,alias:"language-javascript"}}),Prism.languages.js=Prism.languages.javascript;
|
||||
Prism.languages.less=Prism.languages.extend("css",{comment:[/\/\*[\w\W]*?\*\//,{pattern:/(^|[^\\])\/\/.*/,lookbehind:!0}],atrule:{pattern:/@[\w-]+?(?:\([^{}]+\)|[^(){};])*?(?=\s*\{)/i,inside:{punctuation:/[:()]/}},selector:{pattern:/(?:@\{[\w-]+\}|[^{};\s@])(?:@\{[\w-]+\}|\([^{}]*\)|[^{};@])*?(?=\s*\{)/,inside:{variable:/@+[\w-]+/}},property:/(?:@\{[\w-]+\}|[\w-])+(?:\+_?)?(?=\s*:)/i,punctuation:/[{}();:,]/,operator:/[+\-*\/]/}),Prism.languages.insertBefore("less","punctuation",{"function":Prism.languages.less.function}),Prism.languages.insertBefore("less","property",{variable:[{pattern:/@[\w-]+\s*:/,inside:{punctuation:/:/}},/@@?[\w-]+/],"mixin-usage":{pattern:/([{;]\s*)[.#](?!\d)[\w-]+.*?(?=[(;])/,lookbehind:!0,alias:"function"}});
|
28
update.php
Normal file
28
update.php
Normal file
|
@ -0,0 +1,28 @@
|
|||
<?php
|
||||
$ch = curl_init("https://tools.echosystem.fr/Password/htaccess/version.txt");
|
||||
|
||||
curl_setopt($ch, CURLOPT_NOBODY, true);
|
||||
curl_exec($ch);
|
||||
$retcode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
||||
// $retcode >= 400 -> not found, $retcode = 200, found.
|
||||
echo $retcode;
|
||||
curl_close($ch);
|
||||
?>
|
||||
|
||||
<?php
|
||||
define('REMOTE_VERSION', 'https://tools.echosystem.fr/Password/htaccess/version.txt');
|
||||
define('VERSION', '1.0.2');
|
||||
$script = file_get_contents(REMOTE_VERSION);
|
||||
$version = VERSION;
|
||||
if($version==$script) {
|
||||
|
||||
echo "<div class=success>
|
||||
<p>You have the latest version!</p>
|
||||
</div>";
|
||||
} else {
|
||||
echo "<div class=error>
|
||||
<p>There is a update available!</p>
|
||||
</div>";
|
||||
}
|
||||
|
||||
?>
|
1
version.txt
Normal file
1
version.txt
Normal file
|
@ -0,0 +1 @@
|
|||
0.1
|
Loading…
Reference in a new issue