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 string | |
from base64 import b64decode | |
dec_ciphers = ['rot13', 'b64d', 'caesard'] | |
def rot13(s): | |
_rot13 = string.maketrans( | |
"ABCDEFGHIJKLMabcdefghijklmNOPQRSTUVWXYZnopqrstuvwxyz", | |
"NOPQRSTUVWXYZnopqrstuvwxyzABCDEFGHIJKLMabcdefghijklm") | |
return string.translate(s, _rot13) |
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 encode(pt, cnt=50): | |
tmp = '2{}'.format(b64encode(pt)) | |
for cnt in xrange(cnt): | |
c = random.choice(enc_ciphers) | |
i = enc_ciphers.index(c) + 1 | |
_tmp = globals()[c](tmp) | |
tmp = '{}{}'.format(i, _tmp) | |
return tmp |
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 | |
# Challenge : https://www.vulnhub.com/entry/brainpan-1,51/ | |
# Wine (Ubuntu x86) | |
import socket, sys | |
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
try: |
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 | |
// Line 18 | |
$request['form'] = get_request('form','GET'); | |
// Line 20 | |
$request['rdn'] = get_request('rdn','GET'); | |
// Line 27 | |
printf(" eval ('o = opener.document.getElementById(\"%s\").%s;');",$request['form'],$request['element']); | |
// 74 | |
$href['return'] = sprintf("javascript:returnDN('%s%s')",($request['rdn'] ? sprintf('%s,',$request['rdn']) : ''),str_replace('\\','\\\\',$dn)); |
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
pragma solidity ^0.4.21; | |
contract GuessTheNumberChallenge { | |
uint8 answer = 42; | |
function GuessTheNumberChallenge() public payable { | |
require(msg.value == 1 ether); | |
} | |
function isComplete() public view returns (bool) { |
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
var abi = [{"constant":false,"inputs":[{"name":"n","type":"uint8"}],"name":"guess","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[],"name":"isComplete","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[],"payable":true,"stateMutability":"payable","type":"constructor"}]; | |
var contract = web3.eth.contract(abi); | |
var contractInstance = contract.at('0xeD108ab8e7436fAa61b55591262abE1FD2C2E4Cb'); | |
contractInstance.guess(42, {value: 1000000000000000000}, function(err, res) { }); |
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
pragma solidity ^0.4.21; | |
contract GuessTheSecretNumberChallenge { | |
bytes32 answerHash = 0xdb81b4d58595fbbbb592d3661a34cdca14d7ab379441400cbfa1b78bc447c365; | |
function GuessTheSecretNumberChallenge() public payable { | |
require(msg.value == 1 ether); | |
} | |
function isComplete() public view returns (bool) { |
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
pragma solidity ^0.4.21; | |
contract Crack { | |
uint8 public answer; | |
bytes32 answerHash = 0xdb81b4d58595fbbbb592d3661a34cdca14d7ab379441400cbfa1b78bc447c365; | |
function Crack() public { | |
for(uint8 i = 0; i <= 2000; i++) { | |
if(keccak256(i) == answerHash) { | |
answer = i; |
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
var answerHash = '0xdb81b4d58595fbbbb592d3661a34cdca14d7ab379441400cbfa1b78bc447c365'; | |
for(var i=0; i<2000; i++) { | |
if(web3.sha3(i.toString(16), {encoding: 'hex'}) == answerHash) { | |
console.log('Answer Found: ' + i); | |
break; | |
} | |
} |
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
pragma solidity ^0.4.21; | |
contract GuessTheRandomNumberChallenge { | |
uint8 answer; | |
function GuessTheRandomNumberChallenge() public payable { | |
require(msg.value == 1 ether); | |
answer = uint8(keccak256(block.blockhash(block.number - 1), now)); | |
} |
OlderNewer