This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Extract RSA keys in separate files | |
""" | |
Example of usage: | |
1. Generate your RSA keys | |
# openssl genrsa 2048 > mykeys.key | |
2. Read keys in human way and save it to a new .txt file | |
# openssl rsa -in mykeys.key -noout -text | |
3. Exclude keys in separate files with rsa-keys.py script | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
all: client.o server.o | |
client.o: client-beta.c poruke.h | |
gcc client-beta.c -o client | |
server.o: server-beta.c | |
gcc server-beta.c -o server | |
clean: | |
rm server-beta.c server.exe client-beta.c client.exe poruke.h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python2.7 | |
import hashlib | |
algorithms = dict( | |
md5 = lambda s: hashlib.md5(s).hexdigest(), | |
sha1 = lambda s: hashlib.sha1(s).hexdigest(), | |
sha256 = lambda s: hashlib.sha256(s).hexdigest(), | |
) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Initialize connection | |
try{ | |
$mongo = New Mongo(); | |
$db = $mongo->test; | |
$collection = $db->logs; | |
; | |
} catch (MongoConnectionException $check){ | |
die ('Error msg: '. $check->getMessage()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Define connection and name of database/collection for storing data | |
try{ | |
$mongo = new Mongo(); | |
$db = $mongo->myfirstdb; | |
$collection = $db->samples; | |
}catch(MongoConnectionException $check){ | |
die('Database connection failed!'. $check->getMessage()); |
NewerOlder