time stamp convert tools 1.0.0.1 on vs2010
来源:互联网 发布:后端用java还是php 编辑:程序博客网 时间:2024/05/18 12:42
序
PEview(v0.99)中有显示时间戳的功能,但是不知道为啥显示不出来.
CFF, studPE只显示时间戳的值,但是没有转成人类识别的时间字符串.
写了一个控制台程序,用来贴入PE工具得到的时间戳的16进制值, 输出时间戳字符串.
工程下载点
src_time_stamp_convert_tools.zip
实验
// test_2017_0529_1356.cpp : Defines the entry point for the console application.//#include "stdafx.h"#include <Windows.h>#include <stdlib.h>#include <stdio.h>#include <time.h>BOOL php_time_2_systemtime(long lPhpTime, SYSTEMTIME* pst);int get_offset_utc_and_localtime();/** run result================================================================================time stamp convert tools 1.0.0.1 on vs2010================================================================================time stamp input value can accept below: 592BC182 0x592bc182 0x592BC182 0X592BC182--------------------------------------------------------------------------------please input time stamp : 0x592bc182time stamp input is : 0x592BC182time stamp input convert to time is : 2017-05-29 14:36:50--------------------------------------------------------------------------------请按任意键继续. . .*/int _tmain(int argc, _TCHAR* argv[]){ BOOL bRc = FALSE; SYSTEMTIME st; char szTime[11] = {'\0'}; DWORD dwTimeStamp = 0; long ltm = 0; printf("================================================================================\n"); printf("time stamp convert tools 1.0.0.1 on vs2010\n"); printf("================================================================================\n"); printf("time stamp input value can accept below:\n"); printf("\t 592BC182\n"); printf("\t 0x592bc182\n"); printf("\t 0x592BC182\n"); printf("\t 0X592BC182\n"); printf("--------------------------------------------------------------------------------\n"); printf("please input time stamp : "); scanf("%10s", szTime); // can input 0x592BC182 or 592BC182 dwTimeStamp = (int)strtol(szTime, NULL, 16); printf("time stamp input is : 0x%X\n", dwTimeStamp); ltm = (long)dwTimeStamp; ltm += get_offset_utc_and_localtime(); bRc = php_time_2_systemtime(ltm, &st); if (bRc) { printf("time stamp input convert to time is : %4.4d-%2.2d-%2.2d %2.2d:%2.2d:%2.2d\n", st.wYear, st.wMonth, st.wDay, st.wHour, st.wMinute, st.wSecond); } else { printf("invalid time stamp input\n"); } printf("--------------------------------------------------------------------------------\n"); system("pause"); return 0;}int get_offset_utc_and_localtime(){ time_t now = 0; time_t utc = 0; time_t local = 0; struct tm* tmutc; struct tm* tmlocal; time(&now); tmutc = gmtime(&now); utc = mktime(tmutc); tmlocal = localtime(&now); local = mktime(tmlocal); return (local - utc);}BOOL php_time_2_systemtime(long lPhpTime, SYSTEMTIME* pst){ BOOL bRc = FALSE; time_t tmt = -1; struct tm* pGmt = NULL; do { if (NULL == pst) break; tmt = lPhpTime; pGmt = gmtime(&tmt); if (NULL == pGmt) break; pst->wYear = 1900 + pGmt->tm_year; pst->wMonth = 1 + pGmt->tm_mon; pst->wDay = pGmt->tm_mday; pst->wHour = pGmt->tm_hour; pst->wMinute = pGmt->tm_min; pst->wSecond = pGmt->tm_sec; pst->wDayOfWeek = pGmt->tm_wday; bRc = TRUE; } while (0); return bRc; }
阅读全文
0 0
- time stamp convert tools 1.0.0.1 on vs2010
- Fix: time stamp mismatch on celog.rel
- Fix: time stamp mismatch on celog.rel
- Benchmark Code on DSP using the Time Stamp Counter (TSC)
- time stamp data format
- 再论 Time stamp counter
- ORA-15038: disk '/dev/mapper/mpath' mismatch on 'Time Stamp' 解决
- PB编译错误:Mismatched time stamp on .rel file for module nk.exe requesting kernel fixup. Valid .rel file
- PB编译错误:Mismatched time stamp on .rel file for module nk.exe requesting kernel fixup. Valid .rel file
- 【Oracle ASM数据恢复】ORA-15038: disk ‘XXXXXXX’ mismatch on ‘Time Stamp’ with Target Disk Group错误解析
- time convert
- time convert
- tar:time stamp in the future
- 8.3 时间戳(Time Stamp)选项
- tar:time stamp in the future
- Tar Time Stamp in the Future
- tar time stamp in the future问题
- PB编译错误:Mismatched time stamp on .rel file for module nk.exe requesting kernel fixup. Valid .rel file is required for kernel fix
- 搭建vue.js es6 搭建
- linux(九)软件包管理
- C++ 仓库管理系统 控制台
- android studio代理设置
- windows下安装MinGW(绿色)-路径配置
- time stamp convert tools 1.0.0.1 on vs2010
- 04 局部变量的空间分配及栈回收重用之汇编分析
- SVN的使用一:TortoiseSVN的下载安装
- cookie详解
- Git版本库相关操作
- 566. Reshape the Matrix
- HDU4909 String
- 教你如何修改wordpress模版技巧分享
- 树、森林与二叉树的转换和哈夫曼树