Skip to content

Instantly share code, notes, and snippets.

@viyatb
Created June 1, 2014 13:47
Show Gist options
  • Save viyatb/3128d77ce3fd11f46b0c to your computer and use it in GitHub Desktop.
Save viyatb/3128d77ce3fd11f46b0c to your computer and use it in GitHub Desktop.
Secuinside CTF
import ctypes
listing = [
'No pain, No gain - gogil',
'Fighting! - lokihardt',
"Rock'n Roll~ - anncc",
'WTF(Welcome To Facebook) - hellsonic',
'Enjoy~ :) - hkpco',
'I love meat - wooyaggo',
' - v0n',
'An algorithm must be seen to be believed. - Donald Knuth',
'The purpose of computing is insight, not numbers. - Richard Hamming',
"If you don't know anything about computers, just remember that they are machines that do exactly what you tell them but often surprise you in the result. - Richard Dawkins",
'Computers are good at following instructions, but not at reading your mind. - Donald Knuth',
'UNIX is user-friendly, it just chooses its friends. - Andreas Bogk',
'The most important property of a program is whether it accomplishes the intention of its user. - C.A.R. Hoare',
'The computing scientist\xe2\x80\x99s main challenge is not to get confused by the complexities of his own making. - Edsger W. Dijkstra',
'One of my most productive days was throwing away 1000 lines of code. - Ken Thompson',
'When in doubt, use brute force. - Ken Thompson',
'The most effective debugging tool is still careful thought, coupled with judiciously placed print statements. - Brian W. Kernighan',
'Controlling complexity is the essence of computer programming. - Brian W. Kernighan',
"Mathematicians stand on each others' shoulders and computer scientists stand on each others' toes. - Richard Hamming",
'Simplicity is prerequisite for reliability. - Edsger W. Dijkstra',
'This \xe2\x80\x98users are idiots, and are confused by functionality\xe2\x80\x99 mentality of Gnome is a disease. If you think your users are idiots, only idiots will use it. - Linux',
"Young man, in mathematics you don't understand things. You just get used to them. - John von Neumann",
'If people do not believe that mathematics is simple, it is only because they do not realize how complicated life is. - John von Neumann',
'The first principle is that you must not fool yourself - and you are the easiest person to fool. -Richard Feynman',
"I don't know what's the matter with people: they don't learn by understanding; they learn by some other way - by rote or something. Their knowledge is so fragile! - Richard Feynman",
'http://youtu.be/3O1_3zBUKM8 - youtube',
'http://youtu.be/vc6vs-l5dkc - youtube',
'http://youtu.be/v_3svzxSF4w - youtube',
'http://youtu.be/AGlKJ8CHAg4 - youtube',
'http://youtu.be/atz_aZA3rf0 - youtube',
'http://youtu.be/KID8HAU2eBA - youtube',
'http://youtu.be/_CL6n0FJZpk - youtube',
'http://vimeo.com/70486448 - youtube',
'http://youtu.be/HQPAN5dGbmc - youtube',
'http://youtu.be/Sqz5dbs5zmo - youtube',
"Be who you are and say what you feel, because those who mind don't matter, and those who matter don't mind. - Bernard M. Baruch",
'Be yourself; everyone else is already taken. - Oscar Wilde',
"Two things are infinite: the universe and human stupidity; and I'm not sure about the universe. - Albert Einstein",
'So many books, so little time. - Frank Zappa',
'Be the change that you wish to see in the world. - Mahatma Gandhi',
'Live as if you were to die tomorrow. Learn as if you were to live forever - Mahatma Gandhi',
"Don't walk behind me; I may not lead. Don't walk in front of me; I may not follow. Just walk beside me and be my friend. - Albert Camus",
"If you tell the truth, you don't have to remember anything. - Mark Twain",
'Whenever you find yourself on the side of the majority, it is time to pause and reflect. - Mark Twain',
'A friend is someone who knows all about you and still loves you. - Elbert Hubbard',
'The first step toward success is taken when you refuse to be a captive of the environment in which you first find yourself - Mark Caine',
'I have not failed. I\xe2\x80\x99ve just found 10,000 ways that won\xe2\x80\x99t work. - Thomas A. Edison',
'A successful man is one who can lay a firm foundation with the bricks others have thrown at him. - David Brinkley',
'No one can make you feel inferior without your consent - Eleanor Roosevelt',
'The successful warrior is the average man, with laser-like focus. - Bruce Lee',
'If you don\xe2\x80\x99t build your dream, someone else will hire you to help them build theirs - Dhirubhai Ambani',
'There are but two powers in the world, the sword and the mind. In the long run the sword is always beaten by the mind. - Napoleon Bonaparte',
'Stay hungry, Stay foolish. - Steve Jobs',
"We're here to put a dent in the universe. - Steve Jobs",
"Older people sit down and ask, 'What is it?' but the boy asks, 'What can I do with it? - Steve Jobs",
"If you live each day as it was your last, someday you'll most certainly be right. - Steve Jobs",
]
sumval = [0x29344, 0x29B98, 0x20630, 0x3A1F8, 0x1DB6E, 0x28A16,
0x8E42, 0x503C3, 0x547C2, 0x557E3, 0x5932C, 0x56746,
0x58315, 0x4C52D, 0x5650A, 0x497DD, 0x5841B, 0x5D457,
0x55DB6, 0x5A0EE, 0x49F50, 0x56415, 0x5601D, 0x5552C,
0x524E7, 0x37C93, 0x3BA56, 0x3C681, 0x38782, 0x3C827,
0x37E33, 0x3A18D, 0x323BE, 0x39FC0, 0x3DB20, 0x51E82,
0x5402B, 0x555A5, 0x47343, 0x4FDCD, 0x52656, 0x4CFB8,
0x56153, 0x5864C, 0x579C3, 0x575F0, 0x45213, 0x51AA8,
0x558BD, 0x56A64, 0x4C639, 0x4F711, 0x3F162, 0x4D9F6,
0x5188A, 0x52808]
n = 49
print 'm = {'
for i in xrange(len(sumval)):
vec = [0 for _ in xrange(n)]
for t in xrange(min(n,len(listing[i]))):
wtf = ord(listing[i][t])
if wtf > 127:
wtf -= 0x100
vec[t] = wtf
print '{', ', '.join(map(str,vec)), '}%s' % ('' if i == len(sumval)-1 else ',')
print '}'
print ''
print 'b = {', ', '.join(map(str,sumval)), '}'
print ''
print 'LinearSolve[m, b]'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment