PluginProbe ʕ •ᴥ•ʔ
Wp Social Login and Register Social Counter / 3.2.1
Wp Social Login and Register Social Counter v3.2.1
3.2.1 trunk 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.3.0 1.3.1 1.3.10 1.3.11 1.3.2 1.3.3 1.3.4 1.3.6 1.3.8 1.3.9 1.4.0 1.4.1 1.4.2 1.4.4 1.4.5 1.4.6 1.4.8 1.4.9 1.5.0 1.6.0 1.6.1 1.7.0 1.7.1 1.7.2 1.7.3 1.7.4 1.8.0 1.8.1 1.8.2 1.8.3 1.8.5 1.8.6 1.9.0 2.0.0 2.1.0 2.2.0 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.2.8 2.2.9 3.0.0 3.0.2 3.0.3 3.0.4 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.1 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 3.1.7 3.1.8 3.1.9 3.2.0
wp-social / lib / composer / vendor / paragonie / random_compat / other / build_phar.php
wp-social / lib / composer / vendor / paragonie / random_compat / other Last commit date
build_phar.php 1 year ago
build_phar.php
58 lines
1 <?php
2 $dist = dirname(__DIR__).'/dist';
3 if (!is_dir($dist)) {
4 mkdir($dist, 0755);
5 }
6 if (file_exists($dist.'/random_compat.phar')) {
7 unlink($dist.'/random_compat.phar');
8 }
9 $phar = new Phar(
10 $dist.'/random_compat.phar',
11 FilesystemIterator::CURRENT_AS_FILEINFO | \FilesystemIterator::KEY_AS_FILENAME,
12 'random_compat.phar'
13 );
14 rename(
15 dirname(__DIR__).'/lib/random.php',
16 dirname(__DIR__).'/lib/index.php'
17 );
18 $phar->buildFromDirectory(dirname(__DIR__).'/lib');
19 rename(
20 dirname(__DIR__).'/lib/index.php',
21 dirname(__DIR__).'/lib/random.php'
22 );
23
24 /**
25 * If we pass an (optional) path to a private key as a second argument, we will
26 * sign the Phar with OpenSSL.
27 *
28 * If you leave this out, it will produce an unsigned .phar!
29 */
30 if ($argc > 1) {
31 if (!@is_readable($argv[1])) {
32 echo 'Could not read the private key file:', $argv[1], "\n";
33 exit(255);
34 }
35 $pkeyFile = file_get_contents($argv[1]);
36
37 $private = openssl_get_privatekey($pkeyFile);
38 if ($private !== false) {
39 $pkey = '';
40 openssl_pkey_export($private, $pkey);
41 $phar->setSignatureAlgorithm(Phar::OPENSSL, $pkey);
42
43 /**
44 * Save the corresponding public key to the file
45 */
46 if (!@is_readable($dist.'/random_compat.phar.pubkey')) {
47 $details = openssl_pkey_get_details($private);
48 file_put_contents(
49 $dist.'/random_compat.phar.pubkey',
50 $details['key']
51 );
52 }
53 } else {
54 echo 'An error occurred reading the private key from OpenSSL.', "\n";
55 exit(255);
56 }
57 }
58