개발하면서 디버깅 바로 하려 하다보니 hexdump를 자주 쓰게 되는 것 같다.. 직접 다 만든 것은 아니고, stack overflow에 paddy라는 분이 구현해 두었던 걸 함수 형태로 쓰기 쉽게 바꿔둔게 끝이다. 코드 (원본 : https://stackoverflow.com/questions/16804251/how-would-i-create-a-hex-dump-utility-in-c)123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657#include #include #include voidhexdump( __in BYTE * p, __in DWORD len){ DW..
GetLastErrorhttp://egloos.zum.com/sakula99/v/2969627 HRESULThttps://msdn.microsoft.com/en-us/library/cc231198.aspx LDAPhttps://msdn.microsoft.com/en-us/library/gg465310.aspx LSTATUShttps://msdn.microsoft.com/en-us/library/cc231199.aspx NTSTATUShttps://docs.microsoft.com/en-us/windows-hardware/drivers/kernel/using-ntstatus-valueshttps://msdn.microsoft.com/en-us/library/cc231200.aspx
작년에 프로젝트를 하다가 Google의 ProtoBuf라는 것이 있다는 것을 알게 되었는데 이 때는 그냥 넘어가버렸다. 근데 최근 리버싱을 할 때 마다 보이는 것 같아서 이 참에 정리해보게 되었다. ProtoBuf 란? 전송하기 위한 저장하려고 하는 데이터 구조를 유연하고 효율적으로 작성하고 파싱할 수 있도록 지원하는 자동화된 솔루션이다. Json이나 XML을 생각하면 이해가 쉬워지는데, 이것들과는 조금 다르다. ProtoBuf는 데이터 구조를 .proto라는 파일로 작성하면, 이를 컴파일해서 C++/C#/Python 등의 언어 코드 형태로 변환이 가능하고, 변환된 언어 형태로 모듈까지 지원해서 데이터 구조를 전송하고 받아 읽을 수 있게 Serialize / Deserialize도 해준다. C언어로 예를..
보호되어 있는 글입니다.
sqlcipher github : https://github.com/sqlcipher/sqlcipher- Windows에서 말로는 빌드하기 어렵다는데, 빌드 자료를 재정리해준 사람이 많아서 별로 어렵진 않다.- 기존 sqlite3는 헤더에서 sqlite3_key를 명시만 하고, 상업 관련때문에 구현은 안 되어 있음. 따라서 sqlite를 암호화하려면 이런게 필요 사전 설치Visual Studio 2015 or 2017vcpkg (openssl build 같은 방법으로 라이브러리를 얻을 수 있으면 필요 없음) 빌드 방법(설명은 32bit binary build, 64bit는 일부 과정을 수정해서 사용)git clone https://github.com/sqlcipher/sqlcipher로 받아옴vcpkg ..
보호되어 있는 글입니다.
환경 : Ubuntu 18.04 server 64bit 선행 설치bazel : https://docs.bazel.build/versions/master/install-ubuntu.html, JDK 8을 설치한 후에 APT repository로 설치 빌드1234$ git clone https://github.com/google/gitiles$ cd gitiles$ bazel build //:gitiles$ bazel test //...cs 사용 방법 gitiles가 설치된 디렉토리의 tools/run_dev.sh만 실행하면 된다. 실행되었을 때의 경로는 현재 디렉토리를 기준으로 하며, git을 사용할 때 마다 생기는 .git 디렉토리가 반드시 있어야 한다.gitiles로 작업할 디렉토리로 이동.git이 포..
문제 상황(관찰)12345678910111213141516171819user$ pythonPython 2.7.10 (default, Oct 6 2017, 22:29:07) [GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.31)] on darwinType "help", "copyright", "credits" or "license" for more information.>>> import weakrefTraceback (most recent call last): File "", line 1, in File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/weakref.py", line 14, i..
Source Code1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950#pragma comment(lib, "crypt32.lib") #include #include #include void hexdump(unsigned char *p, unsigned int len){ unsigned char *line = p; unsigned int i, thisline, offset = 0; while (offset 16) thisline = 16; for (i = 0; i
보호되어 있는 글입니다.