A Pen by Anıl Bilir on CodePen.
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
| // SPDX-License-Identifier: GPL-3.0 | |
| pragma solidity ^0.8.0; | |
| import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol"; | |
| contract TokenHeo is ERC20 { | |
| address public president; | |
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
| #de_genie.py | |
| from random import * | |
| import SocketServer | |
| import threading | |
| from Crypto.Cipher import DES | |
| from Crypto import Random | |
| from hashlib import sha256 | |
| import os | |
| import random |
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
| def get_challenge(self): | |
| return os.urandom(random.randint(24, 48)) | |
| def init(self): | |
| self.seed = os.urandom(2).encode("hex") | |
| self.challenge = self.get_challenge() | |
| self.key = sha256(sha256(self.seed).hexdigest()).hexdigest()[:BS*2] | |
| des = DESCipher(self.key) | |
| self.cipher = des.encrypt(self.challenge).encode("hex") |
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
| <?php | |
| $SECRET_ENCRYPT = 'ItsHardToBeliefs_ENCRYPT'; | |
| $SECRET_HMAC = 'ItsHardToBelief_HMAC'; | |
| function fnDecrypt($sValue, $sSecretKey) | |
| { | |
| $iv_size = mcrypt_get_iv_size( |
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 python | |
| from random import * | |
| import SocketServer | |
| import threading | |
| from Crypto.Cipher import DES | |
| from Crypto import Random | |
| from hashlib import sha256 | |
| import os | |
| import random |
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 sys | |
| import base64, string | |
| def addition(data, key): | |
| enc = '' | |
| for c in data: | |
| enc += chr((ord(c) + key) & 0xFF) | |
| return enc | |
| def xor(data, key): |
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 sys | |
| import base64, string | |
| flag = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' | |
| def addition(data, key): | |
| enc = '' | |
| for c in data: | |
| enc += chr((ord(c) + key) & 0xFF) | |
| return enc |
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 range(1,len(a)): | |
| for j in range(1,len(b)): | |
| if (a[i-1] == b[j-1]): | |
| f[i][j] = f[i-1][j-1] | |
| else: | |
| f[i][j] = min(f[i][j-1], f[i-1][j], f[i-1][j-1]) + 1 | |
| print f[len(a)-1][len(b)-1] |
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
| palindromes = [] | |
| with open('palindrome.txt','r') as f: | |
| for line in f: | |
| start, end = longest_sp(line) | |
| pal = line[start:end] | |
| palindromes.append(pal) | |
| print palindromes | |
| print max(palindromes,key=len) |
NewerOlder