Skip to content

This Repository is a collection of different ethical hacking tools and malware's for penetration testing and research purpose written in python, ruby, rust, c++, go and c.

3.4 KB
Raw Blame
;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%;
; ��������� ���������� ����� V. 0.42 (x) 2005 ����                             ;
;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%;
; ��������:		[0..eax-1]                                             ;
;------------------------------------------------------------------------------;
; ������������ �������� ���� ������� ��������� - "Xorshift - 128"              ;
; ������ �������� ������ ���� DIEHARD ��� ������ 2^128-1                       ;
;------------------------------------------------------------------------------;
; �������������:        call	r_init                                         ;
;			mov	eax,������� ���������                          ;
;			call	brandom32                                      ;
;------------------------------------------------------------------------------;
; ���������:		����� � ��������� [0..������� ���������]               ;
;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%;

;----[������������ ������������� ���������� ��������� �����]-------------------;

r_init:
		push	ebp eax edx		; ��������� � ����� ebp,eax,edx

		call	__delta1_		;
__delta1_:	pop	ebp			; ��������� ������ ��������
		sub	ebp,offset __delta1_	;

		db	0fh,031h		; �������� ��������� �����
		mov	[ebp+x],eax		;

		pop	edx eax ebp		; ��������������� edx,eax,ebp

		ret				; ������� �� ������������

;----[������������ ��������� ��������� ����� � ���������]----------------------;

brandom32:					; ��� ������������
						; ���������� ��������� �����
						; � ��������� 0..eax-1

		push	edx ecx	ebp		; ��������� � ����� edx,ecx,ebp

		call	__delta2_		;
__delta2_:	pop	ebp			; ��������� ������ ��������
		sub	ebp,offset __delta2_	;

		imul	eax,eax,100		; �������� eax �� 100
		push	eax			; � ��������� eax � �����

		call	random32		; �������� ������������
						; ��������� ���������� �����
		xor	edx,edx			; �������� edx
		pop	ecx			; ��������������� ��������
						; �� ����� � ecx
		div	ecx			; ����� eax �� ecx
		xchg	eax,edx			; �������� ������� � eax
		xor	edx,edx			; �������� edx
		push	100			; �������� � ecx - 100
		pop	ecx			;
		div	ecx			; ����� eax �� ecx
		pop	ebp ecx edx		; ��������������� ebp,ecx,edx,
		ret				; ������� �� ������������

;----[������������ ��������� ���������� �����]---------------------------------;

random32:
		push	ebx edx ecx		;
		push	ebp			; ��������� �������� � �����

		call	__delta3_		;
__delta3_:	pop	ebp			; ��������� ������ ��������
		sub	ebp,offset __delta3_	;

                mov     eax,12345678		;
		x = dword ptr $-4		;
		shl	eax,0bh			; ��������� ��������������
		xor	eax,[ebp+x]		; �������������� �� ������� ���
                mov     edx,362436069		; ��������� ������ �����
		y = dword ptr $-4		; ��������� �� �� � ���:
		mov	[ebp+x],edx		; unsigned long x=123456789,
                mov     ecx,521288629		; y=362436069,
		z = dword ptr $-4		; z=521288629,
		mov	[ebp+y],ecx		; w=88675123;
                mov     ebx,88675123		; t=(x^(x<<11));x=y;y=z;z=w;
		w = dword ptr $-4		; ��� t � ����� ������ eax
		mov	[ebp+z],ebx		;
		mov	edx,[ebp+w]		; ����� ���� ���������
		shr	edx,13h			; ����������, ������� ���� ��
		xor	edx,[ebp+w]		; (w=(w^(w>>19))^(t^(t>>8)));
		xor	edx,eax			;
		shr	eax,08h			;
		xor	edx,eax			;
		mov	[ebp+w],edx		;
		mov	eax,edx			;

		pop	ebp			;
		pop	ecx edx ebx		; �������� �������� �� �����

		retn				; ������� �� ������������