I hereby claim:
- I am arpanetus on github.
- I am arpanetus (https://keybase.io/arpanetus) on keybase.
- I have a public key ASCXCxMyfqZj0xOKrO-cftAWWUFkXjRZGh9F5NfABXDmWAo
To claim this, I am signing this object:
''' | |
620031587 | |
Net-Centric Computing Assignment | |
Part A - RSA Encryption | |
''' | |
import random | |
''' |
import os | |
import random | |
class NaiveRSA(object): | |
_small_primes = [2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97, | |
101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179, | |
181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269, | |
271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367, | |
373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461, | |
463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571, |
import falcon | |
import logging | |
logger = logging.getLogger(__name__) | |
logger.addHandler(logging.FileHandler('test.log')) | |
logger.setLevel(logging.INFO) | |
class ResponseLoggerMiddleware(object): | |
def process_response(self, req, resp): | |
logger.info('{0} {1} {2}'.format(req.method, req.relative_uri, resp.status[:3])) |
#!/usr/bin/env bash | |
set -e | |
dev=sda | |
efi=true | |
boot_fs=vfat | |
state_version="19.09" | |
profile="<nixpkgs/nixos/modules/installer/scan/not-detected.nix>" | |
prompt() { |
I hereby claim:
To claim this, I am signing this object:
(function(console){ | |
console.save = function(data, filename){ | |
if(!data) { | |
console.error('Console.save: No data') | |
return; | |
} | |
if(!filename) filename = 'console.json' |
package main | |
import ( | |
"fmt" | |
"io/ioutil" | |
"os" | |
"time" | |
"encoding/json" |
NCALayer is a tool for signing documents and authorizing into Kazakhstani govt. services such as egov.kz. It's an application written in Java, and thus has to be installed into your machine. We won't discuss the inner mechanism of the app that much, yet I highly dislike the fact that it exists exactly like that.
One thing that we certainly have to mention is ✨safety✨ during the usage of it:
#!/bin/bash | |
cd ~/Downloads | |
if [ -f "ncalayer.zip" ]; then | |
while true; do | |
read -p "file exists, you want to download it again? (y/n): " yn | |
case $yn in | |
[yY] ) echo "downloading it"; | |
mv ncalayer.zip ncalayer.old.zip |
package main | |
import ( | |
"context" | |
"fmt" | |
"os/exec" | |
"time" | |
) | |
type App struct { |