Codes divers: Check-in [ad1377a626]

Divers bouts de code de ma composition

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Remove duplicate files
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:ad1377a62635277e1a20389250ae20e26b283025
User & Date: milouse 2018-10-15 22:18:01
Context
2018-12-24
10:18
Upgrade converse.js and put an xmpp badge on index file check-in: d30c0f1f1e user: milouse tags: trunk
2018-10-15
22:18
Remove duplicate files check-in: ad1377a626 user: milouse tags: trunk
2018-10-11
20:59
Gather all gifs sources check-in: 25880095a1 user: milouse tags: trunk
Changes

Deleted wkd_test/index.php.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<?php
/**
 *            DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
 *                    Version 2, December 2004
 *
 * Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
 *
 * Everyone is permitted to copy and distribute verbatim or modified
 * copies of this license document, and changing it is allowed as long
 * as the name is changed.
 *
 *            DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
 *   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
 *
 *  0. You just DO WHAT THE FUCK YOU WANT TO.
 */

$user_request = '';
if (isset($_POST['email'])) {
  $user_request = filter_var($_POST['email'], FILTER_VALIDATE_EMAIL);
  if ($user_request === false) {
    header('Location: ./nope.jpg');
    exit;
  }
  $output = array();
  $success = 0;
  $command = escapeshellcmd('./wkd_test.sh ' . escapeshellarg($user_request));
  exec($command, $output, $success);
}
?>
<!DOCTYPE html>
<meta charset="utf-8">
<title>GnuPG WKD/WKS test</title>

<h1>GnuPG WKD/WKS test</h1>

<form action="index.php" method="post">
  <fieldset>
    <label for="email_field">
      Your email address
    </label>
    <br>
    <input name="email" type="email"
           id="email_field" placeholder="toto@tata.com"
           value="<?php echo $user_request; ?>"/>
    <input type="submit" value="Check">
  </fieldset>
</form>

<?php
if ($user_request != '') {
  if ($success != 0) {
    echo '<p>Something bad happened :(</p>';
  } else {
    echo '<p>Success</p>';
  }

  echo '<pre>';
  echo implode("\n", $output);
  echo '</pre>';
}
?>

<footer>
  <p style="font-size: smaller;">
    Auteur&nbsp;: <a href="https://etienne.depar.is">Étienne Deparis</a> –
    License <a href="http://www.wtfpl.net/txt/copying/">WTFPL</a> –
    <a href="wkd_test_source.tar.gz">source</a>
  </p>
</footer>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<












































































































































Deleted wkd_test/nope.jpg.

cannot compute difference between binary files

Deleted wkd_test/wkd_test.sh.

1
2
3
4
5
6
7
8
9
10
11
12
#!/usr/bin/env sh

[ "z$1" = "z" ] && exit 1

TMPDIR=`mktemp -d`
echo test > "$TMPDIR/test.txt"
HOME="$TMPDIR" gpg --auto-key-locate wkd --always-trust -e -r "$1" "$TMPDIR/test.txt" 2>&1
EXITCODE=$?
rm -r "$TMPDIR"
pkill -u $USER gpg-agent
pkill -u $USER dirmngr
exit $EXITCODE
<
<
<
<
<
<
<
<
<
<
<
<