nginx 소스 중 일부

typedef struct {
    ngx_uint_t                       version;
    time_t                           valid_sec;
    time_t                           updating_sec;
    time_t                           error_sec;
    time_t                           last_modified;
    time_t                           date;
    uint32_t                         crc32;
    u_short                          valid_msec;
    u_short                          header_start;
    u_short                          body_start;
    u_char                           etag_len;
    u_char                           etag[NGX_HTTP_CACHE_ETAG_LEN];
    u_char                           vary_len;
    u_char                           vary[NGX_HTTP_CACHE_VARY_LEN];
    u_char                           variant[NGX_HTTP_CACHE_KEY_LEN];
} ngx_http_file_cache_header_t;

캐시 파일 중

head -n 1 CACHE_FILE | xxd
00000000: 0500 0000 0000 0000 75dd de65 0000 0000  ........u..e....
00000010: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00000020: c746 9a64 0000 0000 65cf de65 0000 0000  .F.d....e..e....
00000030: 14fb f249 0000 7001 6502 1322 3634 3961  ...I..p.e.."649a
00000040: 3436 6337 2d35 6236 6166 3030 3422 0000  46c7-5b6af004"..
00000050: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00000060: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00000070: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00000080: 0000 0000 0000 0000 0000 0000 0000 0000  ................

분석을 더 해봐야겠지만,

  • 1열 0-3 합쳐서 version (0500 0000 0000 0000)
  • 1열 4-7 합쳐서 valid_sec (75dd de65 0000 0000)

이렇게 분석 가능할 것으로 추측된다.

반응형

+ Recent posts