본문 바로가기

13 Security Lab

검색하기
13 Security Lab
프로필사진 Maj0r Tom

  • 분류 전체보기 (137)
    • Articles (12)
    • Computer Science (79)
      • Study (2)
      • Projects (9)
      • Programming (28)
      • Windows Externals (31)
      • linux - wiki (2)
      • Tools (7)
    • Computer Security (43)
      • Security Articles (17)
      • Projects (0)
      • Analysis (22)
Guestbook
Notice
Recent Posts
Recent Comments
Link
  • FORENSIC-PROOF
  • MalwareTech
  • gentilkiwi
  • Ero Carrera's blog
  • Root Me
«   2013/01   »
일 월 화 수 목 금 토
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31
Tags
  • ida
  • error
  • commandline
  • TensorFlow
  • idb2pat
  • hex-rays
  • ecma
  • why error
  • 포인터 매핑
  • javascript
  • open office xml
  • malware
  • Injection
  • MySQL
  • Python
  • idapro
  • error fix
  • h5py.File
  • Analysis
  • Rat
  • data distribution
  • mock.patch
  • pytest
  • NumPy Unicode Error
  • x64
  • debugging
  • svn update
  • idapython
  • ida pro
  • Ransomware
more
Archives
Today
Total
관리 메뉴
  • 글쓰기
  • 방명록
  • RSS
  • 관리

목록2013/01/17 (1)

13 Security Lab

[C] 파일 크기 구하기

소켓통신중 패킷의 헤더에 데이터 파일의 전체 길이를 담기위해 파일 크기를 구하는 방법을 찾게되었다 stat함수 이용 #include #include #include #include int main() { struct stat buf; int ret; ret = stat("test.c", &buf); if ( ret != 0 ) { perror("stat()"); exit(errno); } printf("len = %ld\n", buf.st_size); return 0; } 파일포인터의이동#include int main() { FILE *fp; fp = fopen("test.c", "rb"); fseek(fp, 0L, SEEK_END); printf("%ld \n", ftell(fp)); fclose(fp..

Computer Science/Projects 2013. 1. 17. 15:47
Prev 1 Next

Blog is powered by kakao / Designed by Tistory

티스토리툴바