OK
not so ok
@echo off | |
PATH=%PATH%;C:\Windows\Microsoft.NET\Framework64\v4.0.30319 | |
csc test1.cs | |
echo Done | |
pause |
import ssl | |
import BaseHTTPServer | |
import SimpleHTTPServer | |
class HTTPSServer( BaseHTTPServer.HTTPServer ): | |
def __init__( self, port, RQ, cert ): | |
BaseHTTPServer.HTTPServer.__init__( self, port, RQ ) | |
self.socket = ssl.wrap_socket( self.socket, certfile=cert ) | |
if __name__ == '__main__': |
import sys | |
import fractions | |
import operator | |
import collections | |
def factorize( n ): | |
assert type(n) in (int, long) | |
assert n > 0 | |
div = 2 | |
while n > 1: |
import sys | |
import sha | |
import base64 | |
import time | |
import Crypto.PublicKey.RSA | |
cmd, prefix, suffix = map( lambda x:x.lower(), sys.argv + [ "", "" ] )[0:3] | |
print "usage: %s [PREFIX [SUFFIX]]" % cmd | |
print "searching for RSA keypair corresponding to TOR hostname [%s%s%s]:" % ( prefix, "_" * ( 16 - len(suffix+prefix)), suffix ) |
#!/bin/bash | |
mkdir -p z-return0 bez-return0 | |
cat > z-return0/prog.c <<EOF | |
#include <stdio.h> | |
int main(){ | |
https://www.wykop.pl/ | |
printf("Hello world\n"); |
#!/bin/bash | |
n=razi91 | |
openssl genrsa -out $n.key | |
openssl rsa -pubout -in $n.key -out $n.pub | |
openssl req -new -sha256 -key $n.key -subj '/CN=127.0.0.1/' -out $n.csr | |
openssl x509 -req -in $n.csr -signkey $n.key -out $n.crt -days 30 |
( ( tab ) => tab | |
.map( | |
(v1,k1) => tab | |
.map( (v2,k2) => [v1,v2,k1,k2] ) | |
.filter( p => p[2] < p[3] ) | |
.map( p => [p[0],p[1]] ) | |
) | |
.reduce( | |
(a,b) => [...a,...b] | |
) |
<?php | |
function rsa_demo(){ | |
list( $p, $q ) = get_2_primes(); | |
echo "p = $p\n"; | |
echo "q = $q\n"; | |
$n = bcmul( $p, $q ); | |
echo "n = p * q = $n\n"; |
#!/bin/bash | |
# (C) 2017, Mateusz Adamowski | |
# public domain | |
# | |
# (compare with reference JS implementation: http://jsfiddle.net/russau/ch8PK/ ) | |
SECRET32="jbswY3DPEHPK3PXP" | |
base32_decode(){ |