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
# EditorConfig is awesome: http://EditorConfig.org | |
# top-most EditorConfig file | |
root = true | |
[*] | |
# Unix-style newlines with a newline ending every file | |
end_of_line = lf | |
insert_final_newline = true | |
trim_trailing_whitespace = true |
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
#include <stdio.h> | |
#include <stdlib.h> | |
char *serial = "\x31\x3e\x3d\x26\x31"; | |
int check(char *ptr) | |
{ | |
int i = 0; | |
while (i < 5){ | |
if (((ptr[i] - 1) ^ 0x55) != serial[i]) | |
return 1; | |
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
#include <stdio.h> | |
#include <stdlib.h> | |
char *serial = "\x31\x3e\x3d\x26\x31"; | |
int check(char *ptr) | |
{ | |
int i; | |
int hash = 0xABCD; | |
for (i = 0; ptr[i]; i++) | |
hash += ptr[i] ^ serial[i % 5]; | |
return hash; |
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
# http://stackoverflow.com/questions/10711051/how-to-remove-trailing-whitespaces-for-multiple-files | |
# Remove trailing space inside current directory with file extension *.rb | |
find ./ -type f -name '*.rb' | xargs sed --in-place 's/[[:space:]]\+$//' |
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
#include<stdio.h> | |
int sum(int i,int j) | |
{ | |
int sum; | |
sum=i+j; | |
return sum; | |
} | |
int main(void) | |
{ | |
int 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
section .text | |
global _start ;must be declared for linker (ld) | |
_start: ;tell linker entry point | |
mov edx,len ;message length | |
mov ecx,msg ;message to write | |
mov ebx,1 ;file descriptor (stdout) | |
mov eax,4 ;system call number (sys_write) | |
int 0x80 ;call kernel |
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
section .text | |
global _start ;must be declared for linker (ld) | |
_start: ;tell linker entry point | |
;You are going to practice system call | |
;What you should do? | |
;put system call number in %eax | |
;put fd number in %ebx | |
;put string address in %ecx | |
;put string length in %edx | |
;interrupt |