VC 重写NET程序#include <stdio.h>#include "windows.h"int ClearClipboradBuffer();int AppendBufferToClipboard( char *cBuffer, int nSize );//**********************************************************************//Main Functionint main(){ //The table of breaking the code char a[10][6]={{'A','9','1','F','7','1',}, {'B','8','0','E','6','0',}, {'8','D','3','D','5','3',}, {'9','A','2','C','4','2',}, {'E','D','5','B','3','5',}, {'F','C','4','A','2','4',}, {'C','F','7','9','1','7',}, {'D','E','6','8','0','6',}, {'2','1','9','7','F','9',}, {'3','0','8','6','E','8',}}; int b,c,d,e,f,g; printf("www.wooyun.org\n-------------------------------\n"); int i;pk:printf("请输入你设置的六位密码,用空格分割每一位\n\n"); scanf("%d%d%d%d%d%d",&b,&c,&d,&e,&f,&g); printf("\n真正的密码是::\n*******************************\n 5%c005%c005%c005%c005%c005%c00\n*******************************\n\n\n",a[b][0],a[c][1],a[d][2],a[e][3],a[f][4],a[g][5]); char cTest[ 512 ]={ 0 }; char cClip[ 512 ] = { 0 }; int nRet = 0; //将数据写入字符cTest中 nRet=sprintf(cTest,"5%c005%c005%c005%c005%c005%c00", a[b][0],a[c][1],a[d][2],a[e][3],a[f][4],a[g][5]); ClearClipboradBuffer(); //判断是否有写入剪切板 if( AppendBufferToClipboard( cTest, nRet ) ) { printf( "对不起,密码复制失败! \n\n#############################################################\n\n" );// return 0; } else { printf("密码已经复制到剪贴板,可以用快捷键CTRL+V粘贴。\n\n#############################################################\n\n");// return 0; } goto pk;}//*************************************************************************************//清空剪切板int ClearClipboradBuffer(){ HGLOBAL hClipboard = NULL; if( OpenClipboard( NULL ) ) { hClipboard = GetClipboardData( CF_TEXT ); GlobalFree( hClipboard ); EmptyClipboard(); CloseClipboard(); return 0; } else { return -1; }}//将字符串放到剪切板int AppendBufferToClipboard( char *cBuffer, int nSize ){ HGLOBAL hClipboard = NULL; char *pClipBuf = NULL; if( OpenClipboard( NULL ) ) { hClipboard = GlobalAlloc( GMEM_DDESHARE, nSize+1 ); pClipBuf = (char*)GlobalLock(hClipboard); memset( pClipBuf, 0, nSize+1 ); memcpy( pClipBuf, cBuffer, nSize ); GlobalUnlock( hClipboard ); SetClipboardData( CF_TEXT, hClipboard ); CloseClipboard(); } else { return -1; } return 0;}