#!/usr/bin/python
import math

asciibin = { "0": "00110000", "1": "00110001", "2": "00110010", "3": "00110011", "4": "00110100", "5": "00110101",
            "6": "00110110", "7": "00110111", "8": "00111000", "9": "00111001", "a": "01100001", "b": "01100010",
            "c": "01100011", "d": "01100100", "e": "01100101", "f": "01100110", "g": "01100111", "h": "01101000",
            "i": "01101001", "j": "01101010", "k": "01101011", "l": "01101100", "m": "01101101", "n": "01101110",
            "o": "01101111", "p": "01110000", "q": "01110001", "r": "01110010", "s": "01110011", "t": "01110100",
            "u": "01110101", "v": "01110110", "w": "01110111", "x": "01111000", "y": "01111001", "z": "01111010",
            "A": "01000001", "B": "01000010", "C": "01000011", "D": "01000100", "E": "01000101", "F": "01000110",
            "G": "01000111", "H": "01001000", "I": "01001001", "J": "01001010", "K": "01001011", "L": "01001100",
            "M": "01001101", "N": "01001110", "O": "01001111", "P": "01010000", "Q": "01010001", "R": "01010010",
            "S": "01010011", "T": "01010100", "U": "01010101", "V": "01010110", "W": "01010111", "X": "01011000",
            "Y": "01011001", "Z": "01011010", "!": "00100001", "\"": "00100010", "#": "00100011", "$": "00100100",
            "%": "00100101", "&": "00100110", "'": "00100111", "(": "00101000", ")": "00101001", "*": "00101010",
            "+": "00101011", ",": "00101100", "-": "00101101", ".": "00101110", "/": "00101111", ":": "00111010",
            ";": "00111011", "<": "00111100", "=": "00111101", ">": "00111110", "?": "00111111", "@": "01000000",
            "[": "01011011", "\\": "01011100", "]": "01011101", "^": "01011110", "_": "01011111", "`": "01100000",
            "{": "01111011", "|": "01111100", "}": "01111101", "~": "01111110", " ": "00100000", "\n": "00001010"}

def xor(value1, value2):
    result = []
    length = len(value1)
    lv2 = len(value2)

    if(not(length <= lv2)):
        lneeded = length - lv2
        mult = math.ceil(lneeded/lv2)
        value2 += value2 * (int(mult)+1)

    for i in range(length):
        if((value1[i] == '1' or value2[i] == '1') and (value1[i] != value2[i])):
            result.append('1')
        else:
            result.append('0')
    return ''.join(result)

def binToASCII(value):
    result = []
    length = len(value)
    for i in range(0, length, 8):
        combine = int(value[i:i+8], 2)
        if(combine <= 127):
            result.append(str(unichr(combine)))
        else:
            result.append(' ')
    return ''.join(result)

def ASCIITobin(value):
    result = []
    length = len(value)
    for i in range(0, length):
        result.append(asciibin[value[i]])
    return ''.join(result)

74e952feb25e5703f1ec62fb5b03af216ccf3006
<mask token>


def binToASCII(value):
    result = []
    length = len(value)
    for i in range(0, length, 8):
        combine = int(value[i:i + 8], 2)
        if combine <= 127:
            result.append(str(unichr(combine)))
        else:
            result.append(' ')
    return ''.join(result)


<mask token>

<mask token>


def binToASCII(value):
    result = []
    length = len(value)
    for i in range(0, length, 8):
        combine = int(value[i:i + 8], 2)
        if combine <= 127:
            result.append(str(unichr(combine)))
        else:
            result.append(' ')
    return ''.join(result)


def ASCIITobin(value):
    result = []
    length = len(value)
    for i in range(0, length):
        result.append(asciibin[value[i]])
    return ''.join(result)

<mask token>
asciibin = {'0': '00110000', '1': '00110001', '2': '00110010', '3':
    '00110011', '4': '00110100', '5': '00110101', '6': '00110110', '7':
    '00110111', '8': '00111000', '9': '00111001', 'a': '01100001', 'b':
    '01100010', 'c': '01100011', 'd': '01100100', 'e': '01100101', 'f':
    '01100110', 'g': '01100111', 'h': '01101000', 'i': '01101001', 'j':
    '01101010', 'k': '01101011', 'l': '01101100', 'm': '01101101', 'n':
    '01101110', 'o': '01101111', 'p': '01110000', 'q': '01110001', 'r':
    '01110010', 's': '01110011', 't': '01110100', 'u': '01110101', 'v':
    '01110110', 'w': '01110111', 'x': '01111000', 'y': '01111001', 'z':
    '01111010', 'A': '01000001', 'B': '01000010', 'C': '01000011', 'D':
    '01000100', 'E': '01000101', 'F': '01000110', 'G': '01000111', 'H':
    '01001000', 'I': '01001001', 'J': '01001010', 'K': '01001011', 'L':
    '01001100', 'M': '01001101', 'N': '01001110', 'O': '01001111', 'P':
    '01010000', 'Q': '01010001', 'R': '01010010', 'S': '01010011', 'T':
    '01010100', 'U': '01010101', 'V': '01010110', 'W': '01010111', 'X':
    '01011000', 'Y': '01011001', 'Z': '01011010', '!': '00100001', '"':
    '00100010', '#': '00100011', '$': '00100100', '%': '00100101', '&':
    '00100110', "'": '00100111', '(': '00101000', ')': '00101001', '*':
    '00101010', '+': '00101011', ',': '00101100', '-': '00101101', '.':
    '00101110', '/': '00101111', ':': '00111010', ';': '00111011', '<':
    '00111100', '=': '00111101', '>': '00111110', '?': '00111111', '@':
    '01000000', '[': '01011011', '\\': '01011100', ']': '01011101', '^':
    '01011110', '_': '01011111', '`': '01100000', '{': '01111011', '|':
    '01111100', '}': '01111101', '~': '01111110', ' ': '00100000', '\n':
    '00001010'}


def xor(value1, value2):
    result = []
    length = len(value1)
    lv2 = len(value2)
    if not length <= lv2:
        lneeded = length - lv2
        mult = math.ceil(lneeded / lv2)
        value2 += value2 * (int(mult) + 1)
    for i in range(length):
        if (value1[i] == '1' or value2[i] == '1') and value1[i] != value2[i]:
            result.append('1')
        else:
            result.append('0')
    return ''.join(result)


def binToASCII(value):
    result = []
    length = len(value)
    for i in range(0, length, 8):
        combine = int(value[i:i + 8], 2)
        if combine <= 127:
            result.append(str(unichr(combine)))
        else:
            result.append(' ')
    return ''.join(result)


def ASCIITobin(value):
    result = []
    length = len(value)
    for i in range(0, length):
        result.append(asciibin[value[i]])
    return ''.join(result)

import math
asciibin = {'0': '00110000', '1': '00110001', '2': '00110010', '3':
    '00110011', '4': '00110100', '5': '00110101', '6': '00110110', '7':
    '00110111', '8': '00111000', '9': '00111001', 'a': '01100001', 'b':
    '01100010', 'c': '01100011', 'd': '01100100', 'e': '01100101', 'f':
    '01100110', 'g': '01100111', 'h': '01101000', 'i': '01101001', 'j':
    '01101010', 'k': '01101011', 'l': '01101100', 'm': '01101101', 'n':
    '01101110', 'o': '01101111', 'p': '01110000', 'q': '01110001', 'r':
    '01110010', 's': '01110011', 't': '01110100', 'u': '01110101', 'v':
    '01110110', 'w': '01110111', 'x': '01111000', 'y': '01111001', 'z':
    '01111010', 'A': '01000001', 'B': '01000010', 'C': '01000011', 'D':
    '01000100', 'E': '01000101', 'F': '01000110', 'G': '01000111', 'H':
    '01001000', 'I': '01001001', 'J': '01001010', 'K': '01001011', 'L':
    '01001100', 'M': '01001101', 'N': '01001110', 'O': '01001111', 'P':
    '01010000', 'Q': '01010001', 'R': '01010010', 'S': '01010011', 'T':
    '01010100', 'U': '01010101', 'V': '01010110', 'W': '01010111', 'X':
    '01011000', 'Y': '01011001', 'Z': '01011010', '!': '00100001', '"':
    '00100010', '#': '00100011', '$': '00100100', '%': '00100101', '&':
    '00100110', "'": '00100111', '(': '00101000', ')': '00101001', '*':
    '00101010', '+': '00101011', ',': '00101100', '-': '00101101', '.':
    '00101110', '/': '00101111', ':': '00111010', ';': '00111011', '<':
    '00111100', '=': '00111101', '>': '00111110', '?': '00111111', '@':
    '01000000', '[': '01011011', '\\': '01011100', ']': '01011101', '^':
    '01011110', '_': '01011111', '`': '01100000', '{': '01111011', '|':
    '01111100', '}': '01111101', '~': '01111110', ' ': '00100000', '\n':
    '00001010'}


def xor(value1, value2):
    result = []
    length = len(value1)
    lv2 = len(value2)
    if not length <= lv2:
        lneeded = length - lv2
        mult = math.ceil(lneeded / lv2)
        value2 += value2 * (int(mult) + 1)
    for i in range(length):
        if (value1[i] == '1' or value2[i] == '1') and value1[i] != value2[i]:
            result.append('1')
        else:
            result.append('0')
    return ''.join(result)


def binToASCII(value):
    result = []
    length = len(value)
    for i in range(0, length, 8):
        combine = int(value[i:i + 8], 2)
        if combine <= 127:
            result.append(str(unichr(combine)))
        else:
            result.append(' ')
    return ''.join(result)


def ASCIITobin(value):
    result = []
    length = len(value)
    for i in range(0, length):
        result.append(asciibin[value[i]])
    return ''.join(result)

#!/usr/bin/python
import math

asciibin = { "0": "00110000", "1": "00110001", "2": "00110010", "3": "00110011", "4": "00110100", "5": "00110101",
            "6": "00110110", "7": "00110111", "8": "00111000", "9": "00111001", "a": "01100001", "b": "01100010",
            "c": "01100011", "d": "01100100", "e": "01100101", "f": "01100110", "g": "01100111", "h": "01101000",
            "i": "01101001", "j": "01101010", "k": "01101011", "l": "01101100", "m": "01101101", "n": "01101110",
            "o": "01101111", "p": "01110000", "q": "01110001", "r": "01110010", "s": "01110011", "t": "01110100",
            "u": "01110101", "v": "01110110", "w": "01110111", "x": "01111000", "y": "01111001", "z": "01111010",
            "A": "01000001", "B": "01000010", "C": "01000011", "D": "01000100", "E": "01000101", "F": "01000110",
            "G": "01000111", "H": "01001000", "I": "01001001", "J": "01001010", "K": "01001011", "L": "01001100",
            "M": "01001101", "N": "01001110", "O": "01001111", "P": "01010000", "Q": "01010001", "R": "01010010",
            "S": "01010011", "T": "01010100", "U": "01010101", "V": "01010110", "W": "01010111", "X": "01011000",
            "Y": "01011001", "Z": "01011010", "!": "00100001", "\"": "00100010", "#": "00100011", "$": "00100100",
            "%": "00100101", "&": "00100110", "'": "00100111", "(": "00101000", ")": "00101001", "*": "00101010",
            "+": "00101011", ",": "00101100", "-": "00101101", ".": "00101110", "/": "00101111", ":": "00111010",
            ";": "00111011", "<": "00111100", "=": "00111101", ">": "00111110", "?": "00111111", "@": "01000000",
            "[": "01011011", "\\": "01011100", "]": "01011101", "^": "01011110", "_": "01011111", "`": "01100000",
            "{": "01111011", "|": "01111100", "}": "01111101", "~": "01111110", " ": "00100000", "\n": "00001010"}

def xor(value1, value2):
    result = []
    length = len(value1)
    lv2 = len(value2)

    if(not(length <= lv2)):
        lneeded = length - lv2
        mult = math.ceil(lneeded/lv2)
        value2 += value2 * (int(mult)+1)

    for i in range(length):
        if((value1[i] == '1' or value2[i] == '1') and (value1[i] != value2[i])):
            result.append('1')
        else:
            result.append('0')
    return ''.join(result)

def binToASCII(value):
    result = []
    length = len(value)
    for i in range(0, length, 8):
        combine = int(value[i:i+8], 2)
        if(combine <= 127):
            result.append(str(unichr(combine)))
        else:
            result.append(' ')
    return ''.join(result)

def ASCIITobin(value):
    result = []
    length = len(value)
    for i in range(0, length):
        result.append(asciibin[value[i]])
    return ''.join(result)
