O que esse codigo faz?

21 respostas
cv1

:twisted:

class Div{static $1 $_;class $1{void _$(String $_){System.// out.print($_);}$1(){_();}void _(){int _,$,_$,$$,__,ä=(1<<5), å=100,ö=12,åö=ä*ö;å-=1<<4;while(åö>0){for($$=_$=_=__=$=(int) å;_$>($$-(1<<2));_$(""+(char)(_$)),_$-=1<<1)for(_=$=__-9;_>( $-6);_-=1<<1,_$(""+(char)(_$!=å?_:ä)));char S$=(char)(å+ö+1) ;_$("te"+S$+(char)(ö+(int)S$));åö--;}}}Div(){$_=new $1();} public static void main(String []$){Div å=new Div();}}

21 Respostas

raphaelpaiva

2 coisas:
-Faz eu ficar tonto procurando todos os construtores afim de te responder…
-Faz eu desistir
:cry:

marcoantoniorocha

Caramba…

Eu consegui executar… Mas pra entender são outros quinhentos… hehehe. Fica mais fácil de ver o código se usar o recurso de formatação automática do Eclipse…

andre_a_s

1 - Seleciona o código maluco
2 - Copia ele
3 - Abre o eclipse
4 - Ctrl + V
5 - Ctrl + A
6 - Ctrl + Shift + F
7 - Fica tentando enteder por que diabos alguém teve saco de implementar esse código

:shock:

Fabricio_Cozer_Marti

eu já sei o q ele faz!!! (rodando eh claro)

Agora me explique o que levou uma pessoa a escrever esse código.

Acho q foi pra ele nao ser demitido, sendo a única pessoa que possa dar manutencao nisso.
Ou o cara tava inspirado e resolveu inovar!? :mrgreen:

Java_Vinicius_Machin

Nossa, coisa digna de “código da vinci”. :lol:

paulohbmetal

cv:
:twisted:

class Div{static $1 $_;class $1{void _$(String $_){System.// out.print($_);}$1(){_();}void _(){int _,$,_$,$$,__,ä=(1<<5), å=100,ö=12,åö=ä*ö;å-=1<<4;while(åö>0){for($$=_$=_=__=$=(int) å;_$>($$-(1<<2));_$(""+(char)(_$)),_$-=1<<1)for(_=$=__-9;_>( $-6);_-=1<<1,_$(""+(char)(_$!=å?_:ä)));char S$=(char)(å+ö+1) ;_$("te"+S$+(char)(ö+(int)S$));åö--;}}}Div(){$_=new $1();} public static void main(String []$){Div å=new Div();}}

Assusta!!

:shock: :shock:

A Paz!!

Luiz_Aguiar

O cara merece um prêmio por falta do que fazer de útil… heheh

Mauricio_Linhares

Esses operadores de bytes são uma chatice :lol:

public class Div {
	static DivInterno variavelEstatica;

	class DivInterno {
		void metodoInterno(String $_) {
			System.out.print($_);
		}

		DivInterno() {
			metodoDoDivInterno();
		}

		void metodoDoDivInterno() {
			int _, $, _$, $$, __, ä = (1 << 5), å = 100, ö = 12, åö = ä * ö;
			å -= 1 << 4;
			while (åö > 0) {
				for ($$ = _$ = _ = __ = $ = (int) å; _$ > ($$ - (1 << 2)); 
                    metodoInterno(""+ (char) (_$)), _$ -= 1 << 1)
					    for (_ = $ = __ - 9; _ > ($ - 6); _ -= 1 << 1, 
					        metodoInterno(""	+ (char) (_$ != å ? _ : ä)));
                
				char S$ = (char) (å + ö + 1);
				metodoInterno("te" + S$ + (char) (ö + (int) S$));
				åö--;
			}
		}
	}

	Div() {
		variavelEstatica = new DivInterno();
	}

	public static void main(String[] $) {
		Div å = new Div();
	}
}

Alguém dê um prêmio pra quem fez isso :mrgreen:

kinow

Fez não… descompilou… cavaj no class ou jad… ou semelhante acho.

Mauricio_Linhares

Eu acho que tá muito bem feito pra ter sido descompilado… :roll:

fmeyer

Eu acho que tá muito bem feito pra ter sido descompilado… :roll:

ofuscador talvez ?

Sami_Koivu

Jogando fora um monte de coisa inútil e renomeando o resto:

class Div {
    static Inner inner;

    Div() {
        inner = new Inner();
    }

    public static void main(String[] args) {
        Div div = new Div();
    }

    class Inner {
        void print(String str) {
            System.out.print(str);
        }

        Inner() {
            printStuff();
        }

        void printStuff() {
            final int diff = 'm'-'a';
            final int space = ' ';
            int tigerCount = space * diff;
            final int charT = 'T';
            while (tigerCount > 0) {
                for (int i = charT; i > 'P'; i -= 2) { // T -> R
                    for (int j = 'K'; j > ('E'); ) {
                        j -= 2; // K -> I -> G -> E
                        if (i != charT) {
                            print("" + (char)j);
                        } else {
                            print("" + (char)space);
                        }
                    }
                    
                    print("" + (char) (i));
                }
                char charA = (char) (charT + diff + 1);
                print("te" + charA + (char) (diff + charA));
                tigerCount--;
            }
        }
    }

}

Quase fica legivel :mrgreen:

fmeyer

http://www.ioccc.org/

existe até um concurso de codigos ofuscados em C … tomara que a moda não pegue pra java :mrgreen:

Mauricio_Linhares

scottys0:
http://www.ioccc.org/

existe até um concurso de codigos ofuscados em C … tomara que a moda não pegue pra java :mrgreen:

Ave maria, falta do que fazer é triste :lol:

kinow

Ah, não sei de onde veio rsrs, sei o que é... é um código ilegível a princípio, com loops encadeados, fazendo iterações de 0 32000 seguindo um monte de regras... o código que comecei a analisar fica mais ou menos:

package com.bcp.bae.adaptermms.modulet;

class Div {
	
	// ref para um Objeto Classe1
	static Classe1 classe1;
	/**
	 * Construtor
	 *
	 */
	Div() {
		// instancia o objeto anteriormente = null
		classe1 = new Classe1();
	}

	class Classe1 {

		/**
		 * Construtor
		 *
		 */
		Classe1() {
			doStuff();
		} // Classe1()
		
		void doStuff(String s1) {
			System.out.print(s1);
		} // doStuff(String )

		void doStuff() {
			int i,
			j,
			l,
			m,
			n,
			o = (1 << 5), // 1 << 5 = 32
			p = 100,
			q = 12,
			r = o * q; // r = 32 * 100 = 3200
			
			p -= 1 << 4; // p = p - ( 1 << 4 ) como 1 << 4 = 16, p = p - 16, e como p inicial = 100, p = 100 - 16 = 84
			
			while (r > 0) { // enquanto r maior que zero, r começa com 3200
				// código original for (m = l = i = n = j = (int) p; l > (m - (1 << 2)); doStuff(""+(char) (l)), l -= 1 << 1)
				// código simplificado abaixo
				for (
						m = l = i = n = j = (int) p ; //  = 84
						l > (m - (1 << 2) /* 84 - 4 = 80 */ );
						doStuff(""+ (char) (l)), l -= 1 << 1 /* l = l - 2*/
					) 
				{
					for (i = j = n - 9; i > (j - 6); i -= 1 << 1, doStuff(""+ (char) (l != p ? i : o)))
						;
				}
				
				char c = (char) (p + q + 1);
				doStuff("te" + c + (char) (q + (int) c));
				r--; // decrementa r
			} // while()
			
		} // doStuff()
	}
	
	/*
	 * Main Method
	 */
	public static void main(String[] $) {
		Div a = new Div();
	}
}

e a saída produzida:

C:\Documents and Settings\kinoshbr\Desktop>java Div
TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGER
team TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam T
IGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam
TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGER
team TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam T
IGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam
TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGER
team TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam T
IGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam
TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGER
team TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam T
IGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam
TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGER
team TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam T
IGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam
TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGER
team TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam T
IGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam
TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGER
team TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam T
IGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam
TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGER
team TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam T
IGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam
TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGER
team TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam T
IGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam
TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGER
team TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam T
IGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam
TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGER
team TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam T
IGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam
TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGER
team TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam T
IGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam
TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGER
team TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam T
IGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam
TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGER
team TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam T
IGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam
TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGER
team TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam T
IGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam
TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGER
team TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam T
IGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam
TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGER
team TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam T
IGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam
TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGER
team TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam T
IGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam
TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGER
team TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam T
IGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam TIGERteam
TIGERteam TIGERteam TIGERteam TIGERteam
C:\Documents and Settings\kinoshbr\Desktop>

agx

Não sei… mas esse:
http://www0.us.ioccc.org/2001/williams.c
é ainda mais sinistro :shock:

Abdon

Então olha so estes hahahaha

Dragger = function(o, a){
    var $ = this;
    o.style.position = "absolute", $.object = o, $.d = {x: 0, y: 0}, $.f = [];
    a && (addEvent(o, "mousedown", function(){return this.start(), false;}, $),
        addEvent(document, "mouseup", function(){this.dragging && this.stop();}, $));
}
with({p: Dragger.prototype, c: Dragger}){
    p._updateMouse = function(e){
        var w = window, b = document.body;
        p.mouse = {x: e.clientX + (w.scrollX || b.scrollLeft || b.parentNode.scrollLeft || 0),
            y: e.clientY + (w.scrollY || b.scrollTop || b.parentNode.scrollTop || 0)};
    };
    addEvent(document, "mousemove", p._updateMouse);
    p.mouse = {x: 0, y: 0};
    p.dragging = false;
    p.start = function(center){
        var r, $ = this, m = $.mouse, o = $.object;
        for(var r = {l: o.offsetLeft, t: o.offsetTop, w: o.offsetWidth, h: o.offsetHeight};
            o = o.offsetParent; r.l += o.offsetLeft, r.t += o.offsetTop);
        !$.dragging && ($.dragging = true, o = $.object, $.d = center &&
            (m.x &lt r.l || m.x &gt r.l + r.w || m.y &lt r.t || m.y &gt r.t + r.h) ?
            {x: r.w / 2, y: r.h / 2} : {x: m.x - o.offsetLeft, y: m.y - o.offsetTop},
            addEvent(document, "mousemove", $.drag, $),
            this.callEvent("onstart"));
    };
    p.drag = function(e){
        var i, p, $ = this, o = $.object, m = ($._updateMouse(e), (m = $.mouse).x -= $.d.x, m.y -= $.d.y, m);
        for(i = $.f.length; i; $.f[--i] && $.f[i][0].apply(m, $.f[i][1]));
        o.style.left = m.x + "px", o.style.top = m.y + "px";
        return !!this.callEvent("ondrag", e);
    };
    p.stop = function(){
        this.dragging = false;
        removeEvent(document, "mousemove", this.drag, this);
        this.callEvent("onstop");
    };
    p.addFilter = function(f, arg0, arg1, arg2, argN){
        this.f[this.f.length] = [f, [].slice.call(arguments, 1)];
    };
    p.callEvent = function(e){
        return this[e] instanceof Function ? this[e].apply(this, [].slice.call(arguments, 1)) : undefined;
    };
}

//Standard Filters
Dragger.filters = new function(){
    function lineLength(x, y, x0, y0){
        return Math.sqrt((x -= x0) * x + (y -= y0) * y);
    }
    function dotLineLength(x, y, x0, y0, x1, y1, o){
        if(o && !(o = function(x, y, x0, y0, x1, y1){
            if(!(x1 - x0)) return {x: x0, y: y};
            else if(!(y1 - y0)) return {x: x, y: y0};
            var left, tg = -1 / ((y1 - y0) / (x1 - x0));
            return {x: left = (x1 * (x * tg - y + y0) + x0 * (x * - tg + y - y1)) /
                (tg * (x1 - x0) + y0 - y1), y: tg * left - tg * x + y};
        }(x, y, x0, y0, x1, y1), o.x &gt= Math.min(x0, x1) && o.x &lt= Math.max(x0, x1)
        && o.y &gt= Math.min(y0, y1) && o.y &lt= Math.max(y0, y1))){
            var l1 = lineLength(x, y, x0, y0), l2 = lineLength(x, y, x1, y1);
            return l1 &gt l2 ? l2 : l1;
        }
        else{
            var a = y0 - y1, b = x1 - x0, c = x0 * y1 - y0 * x1;
            return Math.abs(a * x + b * y + c) / Math.sqrt(a * a + b * b);
        }
    }
    this.SQUARE = function(x, y, w, h){
        this.x = this.x &lt x ? x : this.x &gt x + w ? x + w : this.x,
        this.y = this.y &lt y ? y : this.y &gt y + h ? y + h : this.y;
    };
    this.CIRCLE = function(x, y, ray){
        var tg;
        lineLength(this.x, this.y, x += ray, y += ray) &gt ray &&
            (this.x = Math.cos(tg = Math.atan2(this.y - y, this.x - x)) * ray + x,
            this.y = Math.sin(tg) * ray + y);
    };
    this.LINE = function(x, y, angle){
        if(!(angle % 90))
            return this.x = x;
        var tg = Math.tan(-angle * Math.PI / 180);
        Math.sin(45 * Math.PI / 180) &gt= Math.sin(angle * Math.PI / 180) ?
            this.y = (this.x - x) * tg + y : this.x = (this.y - y) / tg + x;
    };
    this.POLY = function(x0, y0, x1, y1, etc, etc, etc){
        for(var a = [].slice.call(arguments, 0), lines = []; a.length &gt 3;
            lines[lines.length] = {y1: a.pop(), x1: a.pop(), y0: a.pop(), x0: a.pop()});
        if(!lines.length)
            return;
        for(var l, i = lines.length - 1, o = lines[i],
            lower = {i: i, l: dotLineLength(this.x,    this.y, o.x0, o.y0, o.x1, o.y1, 1)};
            i--; lower.l &gt (l = dotLineLength(this.x, this.y,
            (o = lines[i]).x0, o.y0, o.x1, o.y1, 1)) && (lower = {i: i, l: l}));
        this.y &lt Math.min((o = lines[lower.i]).y0, o.y1) ? this.y = Math.min(o.y0, o.y1)
            : this.y &gt Math.max(o.y0, o.y1) && (this.y = Math.max(o.y0, o.y1));
        this.x &lt Math.min(o.x0, o.x1) ? this.x = Math.min(o.x0, o.x1)
            : this.x &gt Math.max(o.x0, o.x1) && (this.x = Math.max(o.x0, o.x1));
        Math.abs(o.x0 - o.x1) &lt Math.abs(o.y0 - o.y1) ?
            this.x = (this.y * (o.x0 - o.x1) - o.x0 * o.y1 + o.y0 * o.x1) / (o.y0 - o.y1)
            : this.y = (this.x * (o.y0 - o.y1) - o.y0 * o.x1 + o.x0 * o.y1) / (o.x0 - o.x1);
    };
};

link para ele haha http://www.jsfromhell.com/dhtml/drag-library/example

LPJava

acho que no exame tem uma sintaxe assim:

class Div{static $1 $_;class $1{void _$(String $_){System.// out.print($_);}$1(){_();}void _(){int _,$,_$,$$,__,ä=(1<&lt5), å=100,ö=12,åö=ä*ö;å-=1<&lt4;while(åö&gt0){for($$=_$=_=__=$=(int) å;_$>($$-(1<&lt2));_$(""+(char)(_$)),_$-=1<&lt1)for(_=$=__-9;_>( $-6);_-=1<&lt1,_$(""+(char)(_$!=å?_:ä)));char S$=(char)(å+ö+1) ;_$("te"+S$+(char)(ö+(int)S$));åö--;}}}Div(){$_=new $1();} public static void main(String []$){Div å=new Div();}}
a tecla enter para que nao funciona… :roll:

LeoMarola

:shock:

Lembra challenges em C que o prof. passava na facul :twisted:

viajei na patota :lol:

LuizLG

fmeyer:
http://www.ioccc.org/

existe até um concurso de codigos ofuscados em C … tomara que a moda não pegue pra java :mrgreen:

Concordo com nosso “amigo” gavare http://www1.us.ioccc.org/years.html, vamos todos programar em C sem utilizar palavras reservadas =p

Bem que minha mãe me avisou que existe louco pra tudo ^^

R

O pior de tudo é saber que um individuo desse está ai à solta pelas ruas…heheheheeheh

Criado 17 de agosto de 2005
Ultima resposta 28 de mar. de 2007
Respostas 21
Participantes 18