Copy Link
Add to Bookmark
Report

6: KmsList (Kosmos WordList)

eZine's profile picture
Published in 
Masters of Shadow
 · 1 Apr 2023

Bem, nao e objetivo da MOS e do zine, dar programinhas prontos ou coisas do genero, mas vamos abrir algumas excessoes, como nesse caso, e expor o codigo desse programa em Pascal (YeaH!) Ele serve basicamente p/ vc aprender que o melhor programa para se adequar as suas necessidades, e o que voce proprio faz!

Esse programa ira ler um arquivo texto, e, atraves dele, gerara uma wordlist (Wordlist.dic). O programa e um bom utilitario, q explana passagem de parametros, verificacao de erros de execucao e leitura de um arq texto, entre outras coisinhas mais...

{---// Corte aki //----------------------------------------------------------} 

{
KmsList (Kosmos WordList)
Copyright(c) 1997, Kosmos
Another production of Masters Of Shadow
Made in Brasil. Programa fonte produzido p/ Boletim Tecnico #1.
}


{$M 28192,0,0}
PROGRAM Kosmos_mos;
USES CRT,DOS;
label fim,erro1;
VAR
PALAVRA:STRING[30];
ARQUIVO:STRING[30];
TEXTO1:TEXT;
texto2:text;
CH:CHAR;
i:word;
x:integer;

BEGIN
{ Zerar variavel Arquivo e Obter o arquivo a ser lido atraves de parametros } ARQUIVO:='';
if paramcount = 0 then goto erro1;
for i := 1 to ParamCount do
ARQUIVO:=ARQUIVO+(ParamStr(i));

{ Desabilitar erros de execucao e criar wordlist e abrir texto parametro }
{$i-}
ASSIGN(TEXTO1,ARQUIVO);
RESET (TEXTO1);
ASSIGN(TEXTO2,'wordlist.dic');
REwrite(TEXTO2);
if ioresult <> 0 then
Begin
erro1:
Writeln;
Writeln (#7,' Erro ',IORESULT,' ! Digite Kmslist <texto.txt> para gerar a Wordlist.Dic');
writeln;
writeln;
halt(1);
ENd;

{$i+}
WHILE NOT EOF(TEXTO1) DO BEGIN
READ(TEXTO1,CH);
IF ((CH = #32) {AND (PALAVRA <> '')} )
OR (CH=#13) THEN
BEGIN
IF (PALAVRA <> #13) AND (PALAVRA <> #10)
AND (PALAVRA <> ' ') AND (PALAVRA <> ' ')
AND (PALAVRA <> '')
THEN BEGIN
{WRITE(PALAVRA);
READLN;}
WRITELN(TEXTO2, PALAVRA);
PALAVRA:='';
END;
PALAVRA:='';
END

ELSE PALAVRA:=PALAVRA+CH;
END;
CLOSE(TEXTO2);
writeln;
writeln (' Wordlist.dic gerado com sucesso ! ');
writeln;
writeln (' KmsList v1.0 by Kosmos');
textbackground(0); textcolor(0);
writeln ('€');
textcolor(15);
for x:=1 to 50 do begin
gotoxy(x,wherey+1);
write (' MOS --== Masters of Shadow ');
textbackground(0); textcolor(0);
gotoxy(1,wherey-1);
write('€');
gotoxy(1,wherey);
delay(300);
textcolor(15);
end;
for x:=50 downto 30 do begin
gotoxy(x,wherey+1);
write (' MOS --== Masters of Shadow ');
textbackground(0); textcolor(0);
gotoxy(1,wherey-1);
write('€');
gotoxy(1,wherey);
delay(300);
textcolor(15);
delay(150);
end;
textcolor(7);
writeln;
writeln;
fim:
END.

{---// Corte aki //----------------------------------------------------------}

Use o programa como quiser, mas.,. deixa d ser lamer e diga onde pegou a fonte. Se vc nao fizer isso, tb to cagando e andando... o puto e vc.Duvidas, sugestoes e criticas: mos@thepentagon.com

Subject: Kosmos, kmslist P.s.: Se vc nao tem o pascal, pode pegar o programa ja compilado na nossa home-page... 'http://www.thepentagon.com/mos/'.

Kosmos

← previous
next →
loading
sending ...
New to Neperos ? Sign Up for free
download Neperos App from Google Play
install Neperos as PWA

Let's discover also

Recent Articles

Recent Comments

Neperos cookies
This website uses cookies to store your preferences and improve the service. Cookies authorization will allow me and / or my partners to process personal data such as browsing behaviour.

By pressing OK you agree to the Terms of Service and acknowledge the Privacy Policy

By pressing REJECT you will be able to continue to use Neperos (like read articles or write comments) but some important cookies will not be set. This may affect certain features and functions of the platform.
OK
REJECT