This file contains hidden or 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
| for i in $(seq 1 26); do | |
| echo "$i:" $(printf "$1" | rahash2 -D rot -S s:$i -s -); | |
| done |
This file contains hidden or 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
| import io.junquera.ca.back.entities.User; | |
| import org.json.JSONObject; | |
| import org.springframework.web.bind.annotation.PostMapping; | |
| import org.springframework.web.bind.annotation.PutMapping; | |
| import org.springframework.web.bind.annotation.RequestBody; | |
| import org.springframework.web.bind.annotation.RestController; | |
| @RestController | |
| public class LogController { |
This file contains hidden or 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
| import hashlib | |
| import base64 | |
| from Crypto.PublicKey import RSA | |
| import sys | |
| # U=$(openssl rsa -in a.pem -pubout -outform DER | tail -c +23 | shasum | head -c 20 | python -c "import base64,sys; print base64.b32encode(sys.stdin.readline().strip('\n').decode('hex')).lower()"); echo "http://${U}.onion" | |
| with open(sys.argv[1]) as f: | |
| pem = f.read() | |
This file contains hidden or 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
| PRINTER_IP="$1" | |
| MESSAGE="$2" | |
| echo $MESSAGE | nc $PRINTER_IP 9100 |
This file contains hidden or 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
| import hashlib | |
| def sha1(i): | |
| return hashlib.sha1(i).hexdigest() | |
| def scrypt(i, sal): | |
| ''' | |
| n = CPU/memory cost parameter | |
| r = tamaño del bloque | |
| p = paralelización |
This file contains hidden or 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
| import math | |
| class Punto(): | |
| def __init__(self, x, y): | |
| self.x = x | |
| self.y = y | |
| def __cmp__(self, other): | |
| return math.sqrt((self.x - other.x)**2 + (self.y - other.y)**2) |
This file contains hidden or 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
| l = ord('Z') - ord('A') + 1 | |
| def inverso(x, m): | |
| for i in range(m): | |
| r = (x * i) % m | |
| if r == 1: | |
| return i | |
| return 0 |
This file contains hidden or 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 python3 | |
| t = ''' | |
| VAQG JYHN QGTR YNOQ AEXM TRZR QQAU QAQQ XQZQ YUSA QEFM QZXM OUGP MP | |
| ''' | |
| i = ord('A') | |
| f = ord('Z') | |
| r = (f + 1) - i | |
| l = list("".join(t.split())) |
This file contains hidden or 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
| import miniupnpc | |
| upnp = miniupnpc.UPnP() | |
| upnp.discover() | |
| upnp.selectigd() | |
| port = 80 | |
| upnp.addportmapping(port, 'TCP', upnp.lanaddr, port, 'testing', '') |
NewerOlder