首页
社区
课程
招聘
[原创] 也许是您迄今为止见过得最好用的 UPX 外壳程序
发表于: 2004-5-9 17:01 15380

[原创] 也许是您迄今为止见过得最好用的 UPX 外壳程序

2004-5-9 17:01
15380
收藏
免费 6
支持
分享
最新回复 (33)
雪    币: 207
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
26
:D
2004-5-11 12:25
0
雪    币: 3689
活跃值: (4247)
能力值: (RANK:215 )
在线值:
发帖
回帖
粉丝
27
最初由 草原猎豹 发布
靠,不上他网站还不知道他有原代码可以下载。。。。。。


记得我还有D6呢,D7也有,不过D7在2000等系统下启动好象比较慢。
2004-5-11 12:42
0
雪    币: 255
活跃值: (165)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
28
最初由 ziding 发布
dREAMtHEATER:你要想实时显示进度,或许你应该采用这样的方法:
1、创建两个Pipe。
2、设置进程的开始信息。
3、用2里面的开始信息CreateProcess。
4、循环从Pipe当中读出数据。
5、读完了WaitForSingalObject。
ZiDing#126.com,希望对你有帮助


呵呵,谢谢你,但我不知道你是否仔细看过输出窗口的消息,如果不是这个过程,你说能输出UPX的信息吗?
2004-5-15 22:08
0
雪    币: 255
活跃值: (165)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
29
最初由 Aming 发布
:D


什么意思? upx.exe-->upx.dll?
2004-5-15 22:10
0
雪    币: 255
活跃值: (165)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
30
最初由 TD515 发布


使用这个 UPX Shell 压缩的壳如果选择了用干扰器则不能自行解压,用 dREAMtHEATER 的 UPX ShellExt 也不能脱(用其 UPX 自动脱壳机也不可以)。不过可以用 UPX Ripper 脱。


干扰器叫什么名字?
2004-5-15 22:11
0
雪    币: 255
活跃值: (165)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
31
最初由 草原猎豹 发布


给你那个UPX外挂的网址吧:
http://sourceforge.net/projects/upxshell/
但愿不用代理也能上

我的原代码在格盘的时候丢掉了,我经常在格盘的时候丢掉东西。。。。。。。


我早猜到是这个源码了,但我仔细考虑过了,可能不适合我的需要,让我再想想
2004-5-15 22:13
0
雪    币: 255
活跃值: (165)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
32
最初由 TD515 发布
好用。可是不能自己定义UPX的版本了,有些可惜。:(


让所有的操作都简化了,包括你选择upx版本
2004-5-15 22:14
0
雪    币: 255
活跃值: (165)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
33
最初由 doskey 发布
Sample Multithread C Program
Home | Overview | How Do I | Sample

BOUNCE.C is a sample multithread program that creates a new thread each time the letter a or A is typed. Each thread bounces a “happy face” of a different color around the screen. Up to 32 threads can be created. The program’s normal termination occurs when q or Q is typed. See Compiling and Linking Multithread Programs for details on compiling and linking BOUNCE.C.

/* Bounce - Creates a new thread each time the letter 'a' is typed.
* Each thread bounces a happy face of a different color around the screen.
* All threads are terminated when the letter 'Q' is entered.
*
* This program requires the multithread library. For example, compile
* with the following command line:
* CL /MT BOUNCE.C
*/

#include <windows.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <conio.h>
#include <process.h>

#define MAX_THREADS 32

/* getrandom returns a random number between min and max, which must be in
* integer range.
*/
#define getrandom( min, max ) ((rand() % (int)(((max) + 1) - (min))) + (min))

void main( void ); /* Thread 1: main */
void KbdFunc( void ); /* Keyboard input, thread dispatch */
void BounceProc( char * MyID ); /* Threads 2 to n: display */
void ClearScreen( void ); /* Screen clear */
void ShutDown( void ); /* Program shutdown */
void WriteTitle( int ThreadNum ); /* Display title bar information */

HANDLE hConsoleOut; /* Handle to the console */
HANDLE hRunMutex; /* "Keep Running" mutex */
HANDLE hScreenMutex; /* "Screen update" mutex */
int ThreadNr; /* Number of threads started */
CONSOLE_SCREEN_BUFFER_INFO csbiInfo; /* Console information */


void main() /* Thread One */
{
/* Get display screen information & clear the screen.*/
hConsoleOut = GetStdHandle( STD_OUTPUT_HANDLE );
GetConsoleScreenBufferInfo( hConsoleOut, &csbiInfo );
ClearScreen();
WriteTitle( 0 );
/* Create the mutexes and reset thread count. */
hScreenMutex = CreateMutex( NULL, FALSE, NULL ); /* Cleared */
hRunMutex = CreateMutex( NULL, TRUE, NULL ); /* Set */
ThreadNr = 0;

/* Start waiting for keyboard input to dispatch threads or exit. */
KbdFunc();

/* All threads done. Clean up handles. */
CloseHandle( hScreenMutex );
CloseHandle( hRunMutex );
CloseHandle( hConsoleOut );
}

void ShutDown( void ) /* Shut down threads */
{
while ( ThreadNr > 0 )
{
/* Tell thread to die and record its death. */
ReleaseMutex( hRunMutex );
ThreadNr--;
}
/* Clean up display when done */
WaitForSingleObject( hScreenMutex, INFINITE );
ClearScreen();
}

void KbdFunc( void ) /* Dispatch and count threads. */
{
int KeyInfo;

do
{
KeyInfo = _getch();
if( tolower( KeyInfo ) == 'a' && ThreadNr < MAX_THREADS )
{
ThreadNr++;
_beginthread( BounceProc, 0, &ThreadNr );
WriteTitle( ThreadNr );
}
} while( tolower( KeyInfo ) != 'q' );

ShutDown();
}

void BounceProc( char *MyID )
{
char MyCell, OldCell;
WORD MyAttrib, OldAttrib;
char BlankCell = 0x20;
COORD Coords, Delta;
COORD Old = {0,0};
DWORD Dummy;

/* Generate update increments and initial display coordinates. */
srand( (unsigned) *MyID * 3 );
Coords.X = getrandom( 0, csbiInfo.dwSize.X - 1 );
Coords.Y = getrandom( 0, csbiInfo.dwSize.Y - 1 );
Delta.X = getrandom( -3, 3 );
Delta.Y = getrandom( -3, 3 );

/* Set up "happy face" & generate color attribute from thread number.*/
if( *MyID > 16)
MyCell = 0x01; /* outline face */
else
MyCell = 0x02; /* solid face */
MyAttrib = *MyID & 0x0F; /* force black background */

do
{
/* Wait for display to be available, then lock it. */
WaitForSingleObject( hScreenMutex, INFINITE );

/* If we still occupy the old screen position, blank it out. */
ReadConsoleOutputCharacter( hConsoleOut, &OldCell, 1, Old, &Dummy );
ReadConsoleOutputAttribute( hConsoleOut, &OldAttrib, 1, Old, &Dummy );
if (( OldCell == MyCell ) && (OldAttrib == MyAttrib))
WriteConsoleOutputCharacter( hConsoleOut, &BlankCell, 1, Old, &Dummy );

/* Draw new face, then clear screen lock */
WriteConsoleOutputCharacter( hConsoleOut, &MyCell, 1, Coords, &Dummy );
WriteConsoleOutputAttribute( hConsoleOut, &MyAttrib, 1, Coords, &Dummy );
ReleaseMutex( hScreenMutex );

/* Increment the coordinates for next placement of the block. */
Old.X = Coords.X;
Old.Y = Coords.Y;
Coords.X += Delta.X;
Coords.Y += Delta.Y;

/* If we are about to go off the screen, reverse direction */
if( Coords.X < 0 || Coords.X >= csbiInfo.dwSize.X )
{
Delta.X = -Delta.X;
Beep( 400, 50 );
}
if( Coords.Y < 0 || Coords.Y > csbiInfo.dwSize.Y )
{
Delta.Y = -Delta.Y;
Beep( 600, 50 );
}
}
/* Repeat while RunMutex is still taken. */
while ( WaitForSingleObject( hRunMutex, 75L ) == WAIT_TIMEOUT );

}

void WriteTitle( int ThreadNum )
{
char NThreadMsg[80];

sprintf( NThreadMsg, "Threads running: %02d. Press 'A' to start a thread,'Q' to quit.", ThreadNum );
SetConsoleTitle( NThreadMsg );
}

void ClearScreen( void )
{
DWORD dummy;
COORD Home = { 0, 0 };
FillConsoleOutputCharacter( hConsoleOut, ' ', csbiInfo.dwSize.X * csbiInfo.dwSize.Y, Home, &dummy );
}


MSDN中的例子,说得很清楚。;)


谢谢你的提示,不过我在你贴之前就看到这个demo了,但可能实用性不太大
2004-5-15 22:16
0
雪    币: 214
活跃值: (60)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
34
最初由 dREAMtHEATER 发布


呵呵,谢谢你,但我不知道你是否仔细看过输出窗口的消息,如果不是这个过程,你说能输出UPX的信息吗?

不是这个过程,是什么意思啊,我不明白你的意思,还有一种比较正统的方法,兼容型比这种要好点,就是用代理。这两种方法都是比较正统的,其实VC的编译输出就是采用的我说的第一种方法。
2004-5-16 10:50
0
游客
登录 | 注册 方可回帖
返回
//