#RSA File De- and Encryption Docu for encrypt and decrypt a large file with AES and RSA
##Keypairs
###Generate RSA Keypairs
//generates a private Key with 8196 Bit
openssl genrsa -out private.pem 8196
select.form-control + .chosen-container.chosen-container-single .chosen-single { | |
display: block; | |
width: 100%; | |
height: 34px; | |
padding: 6px 12px; | |
font-size: 14px; | |
line-height: 1.428571429; | |
color: #555; | |
vertical-align: middle; | |
background-color: #fff; |
#RSA File De- and Encryption Docu for encrypt and decrypt a large file with AES and RSA
##Keypairs
###Generate RSA Keypairs
//generates a private Key with 8196 Bit
openssl genrsa -out private.pem 8196
<?php | |
if(!isset($_POST["submit"])) { | |
?> | |
<h3>Importante</h3> | |
<p> | |
Compilando questo form uno script effettuerà una connessione SSH con la tua macchina, cercherà il file di configurazione SAMBA (smb.conf) e ne farà un parser.<br /> | |
Lo script esegue operazioni in sola lettura, e ha valore esemplificativo della possibilità di automatizzare un'installazione via remoto tramite interfaccia web.<br /> | |
Il comando che verrà eseguito sulla macchina da te indicata è:<br /><tt>$ cat $(find / -type f -name "smb.conf" -print 2>/dev/null -quit)</tt>.<br /> | |
<br /> | |
In ogni caso, puoi consultare i files sorgenti qui: <a href="https://gist.github.com/gubi/7296053" target="_blank">https://gist.github.com/gubi/7296053</a> |
<?php | |
$page = addslashes($_GET["p"]); | |
$searching_page = $pdo->query("select * from `TABLE` where `COLUMN` sounds like '%" . $page . "%'"); | |
if($searching_page->rowCount() == 1) { | |
while($dato_searching_pages = $searching_page->fetch()) { | |
header("Location: " . $dato_searching_pages["COLUMN"]); | |
exit(); | |
} | |
} else { | |
$searching_page = $pdo->query("select * from `TABLE` where `COLUMN` sounds like '%" . $page . "%'"); |
Execute database.sql
as a SQL query in a MySQL database, then configure the file params.ini
with database data.
Populate the database as you like and load the page table.php
: you will see a simple table with all ordered... ;)
[database] | |
host = "YOUR DATABASE HOST" | |
name = "YOUR DATABASE USERNAME" | |
username = "YOUR DATABASE USERNAME" | |
password = "YOUR DATABASE PASSWORD" |
<?php | |
header("Content-type: text/plain"); | |
require_once("email_verify_source.php"); | |
$email_to_verify = (!isset($_GET["smtp_host"]) ? "mail_to_check@test_domain.com" : $_GET["smtp_host"]); | |
$static_mail_address_for_test = "[email protected]"; | |
$static_host_for_test = "example.com"; | |
// Example from http://www.tienhuis.nl/files/email_verify_example.php | |
print validateEmail($email_to_verify, true, true, $static_mail_address_for_test, $static_host_for_test); |
<?php | |
class Element{ | |
private $tag; // the html element to create | |
private $uni; // the remaining (ten) non-deprecated w3c recognized self-closing unitags | |
private $atts; // attributes are entered into an associative array | |
private $obj; // the object to be nested | |
public function __construct($tag, $atts=array(), $uni=array("meta", "base", "link", "img", "br", "hr", "param", "input", "option", "col")){ | |
$this->tag = strtolower($tag); | |
$this->atts = $atts; |