Bun venit pe SkullBox!

Bine ai venit, Vizitator. Trebuie să te autentifici sau să îţi creezi un cont.
Ai pierdut sau nu ai primit emailul care conţine codul de activare al contului?

Autentifică-te cu numele de utilizator, parola şi precizează durata sesiunii.
  Pagini: [1]
  Imprimă  
Funny code  (Vizualizari 287)
Agkelos
*

Deconectat Deconectat

Mesaje: 5229

WWW
Funny code, Mai 23, 2008, 13:45

Ati vazut undeva un cod scris de un programator traznit ? Eu gasesc tot timpul... cand nu gasesc ma mai uit la codul scris de mine sau la comentariile care le fac si ma amuz Big grin

Uite un exemplu de cod care l-am gasit mai devreme:

Cod:
#include <stdio.h>
#include <unistd.h>

#define oops(m,x) { perror(m); exit(x); }

main(int ac, char **av)
{
int thepipe[2], /* two file descriptors */
newfd, /* useful for pipes */
pid; /* and the pid */

...

if ( pipe( thepipe ) == -1 ) /* get a pipe */
oops("Cannot get a pipe", 1);
Daca mai stiti ceva bucati de cod traznite postati-le aici sa ne amuzam putin Tongue
« Ultima modificare: Ian 07, 2009, 09:43 de către emi » Memorat



Problemele se rezolva pe forum. Nu trimiteti PM ca nu va ajut.
Pentru urgente, skullbox at skullbox . info.
DarkByte
*

Deconectat Deconectat

Mesaje: 2441

WWW
Funny code, Mai 23, 2008, 14:11

Cod:
procedure kamu;
var
 akarmi: integer;
 mar : string;
begin
{$ifdef DebugLog};DebugLog(' UNIT BOUNIT;  :  procedure kamu; STARTED');{$endif DebugLog}
  if 1=1 then begin end else
  begin
  end;
  if 2=2 then
  (*
  begin {aaa} end else {sdf} begin end
  *)
  {
  enldess beginend
  }
{$ifdef DebugLog};DebugLog(' UNIT BOUNIT;  :  procedure kamu; ENDED');{$endif DebugLog}
end;
O bucata de cod din programul la care lucrez la job ... era in cod dinaintea programatorilor actuali si presupunem ca e o mostra de God-code ... bineinteles ca nu mai e apelata de niciunde, dar ... a ramas pentru posteritate Smile
Memorat

Light travels faster than sound. This is why some people appear intelligent until they speak.

Quidquid latinum dictum sit, altum viditur.

DarkByte
*

Deconectat Deconectat

Mesaje: 2441

WWW
Răspuns: Funny code, Ian 07, 2009, 09:29

Cod:
var
  wTimer, lBusy : Longint;
  interval : LARGE_INTEGER;
  lThreadAssigned: boolean;
//label 1;
begin
 //Another one, courtesy of [name deleted]...
 //The question arises: what happens if you call this procedure and FirstProgressThread = False ?
// 1:
  if not FirstProgressThread then
    begin
      wTimer := CreateWaitableTimer(nil, True, PAnsiChar('ProgressThreadWaiter' + IntToStr(GetTickCount)));
      interval.QuadPart :=  -1000000 * 1;
      Repeat
        SetWaitableTimer(wTimer, TLargeInteger(interval), 0, nil, nil, false);
        lBusy := WaitForSingleObject(wTimer, INFINITE);
      Until FirstProgressThread;
      CancelWaitableTimer(wTimer);
      CloseHandle(wTimer);
    end;

  if FirstProgressThread then
  begin
    TaskIsInProgress := true;
    ProgressThread := TProgressServer.Create(true);
    ProgressThread.ServerAdress := AXmlOptions.ServerDomain;
    ProgressThread.StatusTask := Status;
    ProgressThread.TaskIDProg := TaskID;
    ProgressThread.pboThread := pboThread;
    ProgressThread.Resume;
    FirstProgressThread := false;
  end;
{  else
    goto 1; }
end;
Again, mostra din codul de la job ... se exemplifica doua modalitati de a bloca un program : bucle infinite si salturi neconditionate hee hee Tema pentru acasa : gasiti inca doua metode pentru a bloca un program Tongue

P.S. am sters numele scris pe acolo, pentru a nu face reclama Tongue
Memorat

Light travels faster than sound. This is why some people appear intelligent until they speak.

Quidquid latinum dictum sit, altum viditur.

SkullAds
Ecspert
ReclAmator
* * * * *
Google AdSense

Gen: Bărbat
Mesaje: Multe

Reclama AdSense,
 

 
   


Pagini: [1]
  Imprimă  
 
Schimbă forumul:  

Ethical hacking and programming community
Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC
Traducerea în limba română © 2006-2007 www.smf.ro