본문 바로가기

Programming60

ANSI, WIDE, TCHAR 함수들 TCHAR String FunctionsANSIWideTCHAR_access_waccess_taccess_atoi64_wtoi64_tstoi64_atoi64_wtoi64_ttoi64_cgets_cgetwscgetts_chdir_wchdir_tchdir_chmod_wchmod_tchmod_cprintf_cwprintf_tcprintf_cputs_cputws_cputts_creat_wcreat_tcreat_cscanf_cwscanf_tcscanf_ctime64_wctime64_tctime64_execl_wexecl_texecl_execle_wexecle_texecle_execlp_wexeclp_texeclp_execlpe_wexeclpe_texeclpe_execv_wexecv_texecv_execve_wex.. 2014. 1. 8.
실행 중인 Class, Caption, Process 이름 구하기 EnumWindows -> [ GetClassName, GetWindowText ] CreateToolhelp32Snapshot Process32First Process32Next -> [ PROCESSENTRY32구조체의 szExeFile ] #include "Windows.h" #include "tlhelp32.h" #include "tchar.h" #include "stdio.h" BOOL CALLBACK EnumWindowProc(HWND hwnd, LPARAM lParam) { TCHAR classname[100] = {0}; TCHAR titlename[100] = {0}; GetClassName (hwnd, (LPTSTR)&classname, 100); GetWindowText(hwnd, (.. 2014. 1. 8.
python - ROL, ROR python에서 ROL, ROR 연산이 없어서 아래와 같이 만들어놨다. def ROL(data, shift, size=32): shift %= size remains = data >> (size - shift) body = (data shift remains = (data 2013. 12. 14.
RC4 알고리즘 - python RC4에서 key값은 256byte인 S배열을 permutation하는 역할 1. KSA(Key-Scheduling Algorithm)을 통해 256byte의 S배열을 permutation시킨다. 2. PRGA(Pseudo-Random Gerneration Algorithm)을 돌며 평문을 암호화한다. KSA(Key-Scheduling Algorithm) pseudo codde for i from 0 to 255 S[i] := i endfor j := 0 for i from 0 to 255 j := (j + S[i] + key[i mod keylength]) mod 256 swap values of S[i] and S[j] endfor PRGA(Pseudo-Random Gerneration Algorit.. 2013. 12. 14.