Existe algo llamado GESHI
Esta sección te permite ver todos los mensajes escritos por este usuario. Ten en cuenta que sólo puedes ver los mensajes escritos en zonas a las que tienes acceso en este momento.
Mostrar Mensajes Menú#ifndef __ClsAntiDebug__
#define __ClsAntiDebug__
#include <windows.h>
#include <tlhelp32.h>
class ClsAntiDebug
{
private:
bool Debugged;
public:
ClsAntiDebug();
void __declspec() PEBDebug();
void __declspec() NTGlobalDebug();
void __declspec() DebuggerActive();
void __declspec() TimeStamp(int time, void *func);
void Protect(void *func);
bool IsDebugged();
};
#endif
#include "AntiDebug.h"
ClsAntiDebug::ClsAntiDebug()
{
this->Debugged=false;
}
bool ClsAntiDebug::IsDebugged()
{
return this->Debugged;
}
void __declspec() ClsAntiDebug::PEBDebug()
{
__asm
{
_PEBLoop:
push 500
call dword ptr ds:[Sleep]
xor edx, edx
mov dl,0x30
mov esi, fs:[edx]
movzx eax, byte ptr[esi+2]
dec eax
jne _PEBLoop
inc eax
}
this->Debugged = true;
}
void __declspec() ClsAntiDebug::NTGlobalDebug()
{
__asm
{
_NTLoop:
push 500
call dword ptr ds:[Sleep]
xor edx, edx
mov dl,0x30
mov esi, fs:[edx]
movzx eax, byte ptr[esi+0x68]
and eax,eax
je _NTLoop
xor eax,eax
inc eax
}
this->Debugged = true;
}
void __declspec() ClsAntiDebug::DebuggerActive()
{
HANDLE hProcSnap;
PROCESSENTRY32 pProcess;
LPTSTR Exename;
int strlength;
int deb[3]={18416231/*IDA Pro*/,997340682/*W32DASM*/,1853255255/*OllyDbg*/};
int i;
do
{
hProcSnap = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS,0);
pProcess.dwSize = sizeof(PROCESSENTRY32);
Process32First(hProcSnap,&pProcess);
do
{
strlength = strlen(pProcess.szExeFile);
__asm
{
lea eax,[pProcess.szExeFile]
mov ecx,dword ptr[strlength]
xor edx,edx
xor edi, edi
push edi
gethash:
pop edi
xor dl, byte ptr[eax+edi]
rol edx,8
inc edi
push edi
xor edi,ecx
jne gethash
mov [strlength],edx/*We don't need strlength, so we recycle to get
The Hash on Int Variable*/
pop edi
}
for(i=0;i<3;i++)if (strlength==deb[i])
{
this->Debugged = true;
__asm{jmp ___end}
}
}while(Process32Next(hProcSnap,&pProcess));
Sleep(500);
}while(1);
__asm
{___end:}
}
void __declspec() ClsAntiDebug::Protect(void *func)
{
do
{
switch(GetTickCount()%4)
{
case 0:this->PEBDebug();break;
case 1:this->NTGlobalDebug();break;
case 2:this->DebuggerActive();break;
};
if (this->Debugged)
{
__asm
{
call [func]
}
}
Sleep(500);
}while(1);
}
void __declspec() ClsAntiDebug::TimeStamp(int time,void *func)
{
__asm
{
rdtsc
mov ebx,eax
call [func]
rdtsc
sub eax, ebx
cmp eax, [time]
jna ___rtend
}
this->Debugged = true;
__asm{___rtend: }
}
#pragma comment(linker,"/ENTRY:main")
#include "AntiDebug.h"
void CALLBACK HolaMundo()
{
int i;
i++;
i++;
}
int __declspec() main()
{
ClsAntiDebug *Debugger=new(ClsAntiDebug);
Debugger->TimeStamp(200,HolaMundo);
if (Debugger->IsDebugged())MessageBox(0,"Hola","Mundo",0);
Debugger->Protect(HolaMundo);
return 0;
}
Module Ec2Solver
'*----------------------------------------------------------------------------------------------*
'| Author: [L]ord [R]NA |
'| Country: Dominican Republic |
'*----------------------------------------------------------------------------------------------*
' Description: A Module to solve 2nd Degree Equations. The Module Ec2Solver has a Function that |
' Get the First 3 constant value of the equation And 2 Double Variables are public in the module|
' to get the possible values of X. If everything is Ok the Function return True and if it's |
' something wrong Return False. |
'*----------------------------------------------------------------------------------------------*
'|Website: http://lordrna.co.cc/ http://foro.h-sec.org/ |
'|Mail: lordrna@h-sec.org |
'*----------------------------------------------------------------------------------------------*
Public X1 As Double, X2 As Double
Dim A1 As Double, B1 As Double, C1 As Double
Public Function Ec2Solver(ByVal A As String, ByVal B As String, ByVal C As String) As Boolean
If Double.TryParse(A, A1) And Double.TryParse(B, B1) And Double.TryParse(C, C1) Then
Ec2Solver = Ec2Solver(A1, B1, C1)
Else
Ec2Solver = False
End If
End Function
Public Function Ec2Solver(ByVal A As Double, ByVal B As Double, ByVal C As Double) As Boolean
Dim temp As Double
X1 = 0
X2 = 0
If A = 0 Then Ec2Solver = False
If B = 0 And A <> 0 Then
If C / A > 0 Then
Ec2Solver = False
Else
If C = 0 Then
Ec2Solver = True
Else
X1 = -System.Math.Sqrt(System.Math.Abs(C / A))
X2 = System.Math.Sqrt(System.Math.Abs(C / A))
Ec2Solver = True
End If
End If
ElseIf C = 0 Then
X1 = B / A
Ec2Solver = True
Else
temp = (System.Math.Pow(B, 2)) - 4 * A * C
If temp < 0 Then
Ec2Solver = False
Else
temp = System.Math.Sqrt(temp) / (2 * A)
X1 = -B + temp
X2 = -B - temp
Ec2Solver = True
End If
End If
End Function
End Module
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
A.Clear()
B.Clear()
C.Clear()
X1.Clear()
X2.Clear()
End Sub
Private Sub A_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles A.Click
A.Text = ""
End Sub
Private Sub B_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B.Click
B.Text = ""
End Sub
Private Sub C_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles C.Click
C.Text = ""
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
If Len(A.Text) = 0 Or A.Text = "0" Then A.Text = "1"
If Len(B.Text) = 0 Then B.Text = "0"
If Len(C.Text) = 0 Then C.Text = "0"
If Ec2Solver.Ec2Solver(A.Text, B.Text, C.Text) = True Then
X1.Text = Str(Ec2Solver.X1)
X2.Text = Str(Ec2Solver.X2)
Else
X1.Text = "Sin Solucion"
X2.Text = "Real"
End If
End Sub
End Class
int numeros[cantidad]; //Aca se almacenan los numeros como se introducen
int resultado[cantidad]; //Aca es donde se ordenan