Migration
This commit is contained in:
parent
952a8ec275
commit
a9ea5ef5e0
31
LISEZMOI.md
Normal file
31
LISEZMOI.md
Normal file
|
@ -0,0 +1,31 @@
|
|||

|
||||

|
||||
|
||||
[*To read this README in English, click here.*](https://gogs.am-networks.fr/AMNetworks/PasswordGenerator-PHP/src/master/README.md)
|
||||
|
||||
# Générateur de mot de passe basé sur PHP et Javascript
|
||||
|
||||
Ceci est un générateur de mot de passe web.
|
||||
Pour le faire fonctionner, il suffit de récupérer les fichiers index.php et getpwd.php et de les téléverser vers votre serveur web, dans votre dossier/sous-domaine destiné à cet effet.
|
||||
|
||||
## Fichier index.php
|
||||
|
||||
Ce fichier est la page interactive de génération de mot de passe.
|
||||
Elle propose un bouton permettant de générer un nouveau mot de passe.
|
||||
Cette page inclut le responsive design, c'est à dire qu'elle s'adapte au format de votre écran (PC/mobile/tablette).
|
||||
|
||||
## Fichier getpwd.php
|
||||
|
||||
Ce fichier sert à l'utilisation depuis un autre outil via une requête. Il ne renvoie que le mot de passe généré, sans mise en forme.
|
||||
Écrit totalement en PHP, le seul code source renvoyé est le mot de passe généré.
|
||||
|
||||
## Fichier index_en.php
|
||||
|
||||
Même fichier que index.php mais totalement en anglais (variables comprises).
|
||||
|
||||
## Instance AM Networks
|
||||
|
||||
Envie de tester le générateur directement chez vous ?
|
||||
[Découvrez mon instance de test !](https://services.am-networks.fr/pwdgen)
|
||||
|
||||
Cette instance est mise à jour par GitLab chaque minute pour vous offrir l'expérience du code en temps réel.
|
29
README.md
29
README.md
|
@ -1,2 +1,29 @@
|
|||
# PasswordGenerator-PHP
|
||||

|
||||

|
||||
|
||||
[*Pour lire ce README en Français, cliquez ici.*](https://gogs.am-networks.fr/AMNetworks/PasswordGenerator-PHP/src/master/LISEZMOI.md)
|
||||
|
||||
# Password generator based on PHP and Javascript
|
||||
|
||||
This is a web password generator.
|
||||
To make it work, you just have to get the index_en.php and getpwd.php files and upload them to your web server, in your folder / subdomain intended for this purpose.
|
||||
|
||||
You will also need to rename index_en.php to index.php.
|
||||
|
||||
## index_en.php file
|
||||
|
||||
This file is the interactive password generation page.
|
||||
It offers a button to generate a new password.
|
||||
This page includes responsive design, i.e. it adapts to the format of your screen (PC / mobile / tablet).
|
||||
|
||||
## getpwd.php file
|
||||
|
||||
This file is used for use from another tool via a query. It only returns the generated password, without formatting.
|
||||
Written completely in PHP, the only source code returned is the generated password.
|
||||
|
||||
## AM Networks instance
|
||||
|
||||
Want to test the generator directly at home?
|
||||
[Discover my test instance!](https://services.am-networks.fr/pwdgen/index_en.php)
|
||||
|
||||
This instance is updated by GitLab every minute to offer realtime code experience.
|
||||
|
|
9
getpwd.php
Normal file
9
getpwd.php
Normal file
|
@ -0,0 +1,9 @@
|
|||
<?php
|
||||
$minuscule = array('alpha', 'bravo', 'charlie', 'delta', 'echo', 'foxtrot', 'golf', 'hotel', 'india', 'juliette', 'kilo', 'lima', 'november', 'oscar', 'papa', 'quebec', 'romeo', 'sierra', 'tango', 'uniform', 'victor', 'whisky', 'yankee', 'zulu');
|
||||
$majuscule = array('ALPHA', 'BRAVO', 'CHARLIE', 'DELTA', 'ECHO', 'FOXTROT', 'GOLF', 'HOTEL', 'INDIA', 'JULIETTE', 'KILO', 'LIMA', 'NOVEMBER', 'OSCAR', 'PAPA', 'QUEBEC', 'ROMEO', 'SIERRA', 'TANGO', 'UNIFORM', 'VICTOR', 'WHISKY', 'YANKEE', 'ZULU');
|
||||
$special = array('@', '+', '-', '&');
|
||||
echo $minuscule[array_rand($minuscule)];
|
||||
echo $majuscule[array_rand($majuscule)];
|
||||
echo $special[array_rand($special)];
|
||||
echo(rand(1,99));
|
||||
?>
|
43
index.php
Normal file
43
index.php
Normal file
|
@ -0,0 +1,43 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
|
||||
<meta content="text/html; charset=UTF-8" http-equiv="content-type">
|
||||
<meta name="viewport" content="width=device-width">
|
||||
<title>Générateur de mot de passe</title>
|
||||
|
||||
<script src="http://code.jquery.com/jquery-latest.js"></script>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#btn_click').on('click', function() {
|
||||
var url = 'index.php';
|
||||
$('#passgen-wrapper').load(url + ' #passgen');
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h1 style="text-align: center;">Générateur de mot de passe</h1>
|
||||
<div id="passgen-wrapper">
|
||||
<div id="passgen" style="text-align: center;">
|
||||
<?php
|
||||
$minuscule = array('alpha', 'bravo', 'charlie', 'delta', 'echo', 'foxtrot', 'golf', 'hotel', 'india', 'juliette', 'kilo', 'lima', 'mike', 'november', 'oscar', 'papa', 'quebec', 'romeo', 'sierra', 'tango', 'uniform', 'victor', 'whisky', 'xray', 'yankee', 'zulu');
|
||||
$majuscule = array('ALPHA', 'BRAVO', 'CHARLIE', 'DELTA', 'ECHO', 'FOXTROT', 'GOLF', 'HOTEL', 'INDIA', 'JULIETTE', 'KILO', 'LIMA', 'MIKE', 'NOVEMBER', 'OSCAR', 'PAPA', 'QUEBEC', 'ROMEO', 'SIERRA', 'TANGO', 'UNIFORM', 'VICTOR', 'WHISKY', 'XRAY', 'YANKEE', 'ZULU');
|
||||
$special = array('@', '+', '-', '&');
|
||||
echo $minuscule[array_rand($minuscule)];
|
||||
echo $majuscule[array_rand($majuscule)];
|
||||
echo $special[array_rand($special)];
|
||||
echo(rand(1,99));
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div style="text-align: center;">
|
||||
<button type="button" id="btn_click" />Générer nouveau mot de passe</button>
|
||||
<br /><br />
|
||||
<a href="https://gogs.am-networks.fr/AMNetworks/PasswordGenerator-PHP" target="_blank">Cliquez ici pour accéder au code source</a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
44
index_en.php
Normal file
44
index_en.php
Normal file
|
@ -0,0 +1,44 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
|
||||
<meta content="text/html; charset=UTF-8" http-equiv="content-type">
|
||||
<meta name="viewport" content="width=device-width">
|
||||
<title>Password Generator</title>
|
||||
|
||||
<script src="http://code.jquery.com/jquery-latest.js"></script>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#btn_click').on('click', function() {
|
||||
var url = 'index.php';
|
||||
$('#passgen-wrapper').load(url + ' #passgen');
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h1 style="text-align: center;">Password Generator</h1>
|
||||
<div id="passgen-wrapper">
|
||||
<div id="passgen" style="text-align: center;">
|
||||
<?php
|
||||
$lowercase = array('alpha', 'bravo', 'charlie', 'delta', 'echo', 'foxtrot', 'golf', 'hotel', 'india', 'juliette', 'kilo', 'lima', 'mike', 'november', 'oscar', 'papa', 'quebec', 'romeo', 'sierra', 'tango', 'uniform', 'victor', 'whisky', 'xray', 'yankee', 'zulu');
|
||||
$uppercase = array('ALPHA', 'BRAVO', 'CHARLIE', 'DELTA', 'ECHO', 'FOXTROT', 'GOLF', 'HOTEL', 'INDIA', 'JULIETTE', 'KILO', 'LIMA', 'MIKE', 'NOVEMBER', 'OSCAR', 'PAPA', 'QUEBEC', 'ROMEO', 'SIERRA', 'TANGO', 'UNIFORM', 'VICTOR', 'WHISKY', 'XRAY', 'YANKEE', 'ZULU');
|
||||
$special = array('@', '+', '-', '&');
|
||||
echo $lowercase[array_rand($lowercase)];
|
||||
echo $uppercase[array_rand($uppercase)];
|
||||
echo $special[array_rand($special)];
|
||||
echo(rand(1,99));
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div style="text-align: center;">
|
||||
<button type="button" id="btn_click" />Generate new password</button>
|
||||
<br /><br />
|
||||
Made in France 🇫🇷 by <a href="https://gogs.am-networks.fr/AMNetworks" target="_blank">Alexandre</a><br />
|
||||
<a href="https://gogs.am-networks.fr/AMNetworks/PasswordGenerator-PHP" target="_blank">Click here to access source code</a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user