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
package nk0t.mods.sample.gui; | |
import net.minecraft.entity.player.InventoryPlayer; | |
import net.minecraft.util.ResourceLocation; | |
import nk0t.mods.binding.controls.Label; | |
import nk0t.mods.binding.gui.WindowContainer; | |
import nk0t.mods.sample.ContainerBasic; | |
public class SampleWindow extends WindowContainer | |
{ |
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
suctf_enc = lambda text, key: reduce(lambda x, y: (x[0] + str(int(y) ^ int(x[1][0])), x[1][1:] + str(int(x[1][4]) ^ int(x[1][0]))), ''.join(map(lambda x: bin(ord(x))[2:].rjust(8, '0'), text)), ('', key))[0] | |
def split_n(s, n): | |
return [s[i:i+n] for i in range(0, len(s), n)] | |
def enc(text, key): | |
r = '' | |
text = ''.join(map(lambda x: bin(ord(x))[2:].rjust(8, '0'), text)) | |
for (t,s) in zip(text, gen_key(key,len(text))): |
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 sys | |
a = [2, 3, 5, 7, 11, 13, 17] | |
b = [132, 110, 112, 38, 112, 96, 33, 115, 194, 104, 87, 118, 3, 105, 50, 103, 99, 75, 9, 85, 74, 72, 92, 78, 188, 16] | |
c = [4, 84, 0, 162, 72, 144, 64, 138, 16, 0, 8, 2, 0, 8, 0, 163] | |
print "You're the DJ of this gig!" | |
print '========' | |
for c1 in c: | |
print '{0:08b}'.format(c1)[::-1].replace('0', ' ').replace('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
flag = [[0,-0x0f], [1,-0x12], [2,-0x29], [3,-0x13], [4,-0x06], | |
[5,-0x2e], [6,-0x13], [6,-0x10], [5,-0x2e], | |
[4,-0x33], [3,-0x33], [2,-0x0c], [1,-0x34], | |
[0,+0x16], [0,-0x1e], [2,-0x0d], [4,+0x01], | |
[6,-0x12], [1,-0x03], [3,-0x03], [5,-0x30], | |
[0,+0x12], [3,-0x2e], [6,-0x44], [1,-0x31], | |
[4,-0x02], [2,-0x39], [5,-0x2f], [0,-0x18], | |
[6,-0x0f], [1,-0x31], [5,-0x2f], [2,-0x3a], | |
[4,-0x33], [3,-0x32], [3,-0x2e], [6,-0x3d]] |
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
asis = [0x41, 0x53, 0x49, 0x53, 0x5f] | |
flag = [+0x06, -0x24, +0x09, -0x29, -0x2d, -0x2b, | |
-0x24, +0x06, +0x08, -0x24, +0x07, +0x06, | |
+0x09, -0x25, +0x09, +0x09, -0x26, +0x09, | |
-0x25, +0x09, -0x2c, +0x05, -0x26, -0x2d, | |
+0x08, +0x07, +0x08, +0x04, +0x07, -0x25, | |
-0x29, -0x2a] | |
for key in range(256): |
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 Image | |
import base64 | |
chess = Image.open('chess.png') | |
b64charset = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' | |
stack = [] | |
for y in range(8): | |
for x in range(8): |
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 sys | |
import socket | |
import Image | |
from qrtools import QR | |
def solve(qrcode): | |
make_qrcode_image(qrcode) | |
code = QR(filename='qrcode.png') | |
if code.decode(): |
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 os | |
import os.path | |
import socket | |
import threading | |
import subprocess | |
import locale | |
server_string = 'Server: httpy/1.0\r\n' | |
document_root = '' | |
index_page = '' |
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 socket | |
import threading | |
def accept_request(client): | |
client.send('welcome to echo server\n') | |
client.send('please input\n') | |
while True: | |
msg = client.recv(1024) | |
if(msg == 'exit\r\n'): | |
break |
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
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.IO.Compression; | |
using System.Linq; | |
using System.Text; | |
namespace AOJ | |
{ | |
class Program |
NewerOlder