Jump to content
  • 0

Problem Code Method Getprotectiondomain


Question

Posted

helpme code in java base l2f

 

import l2f.gameserver.utils.VgConfig;
import l2f.commons.util.Base64;
import l2f.commons.crypt.NewCrypt;
import java.io.*;
import java.net.URL;
import java.net.URLConnection;
import java.security.CodeSource;
import java.security.ProtectionDomain;
import java.util.Enumeration;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;

 

 

public Class forName(String className)
    {
        String classFile;
        ZipFile z;
        Enumeration list;
        if(VgConfig.NPROTECT_KEY == -1)
            throw new Exception();
        classFile = className.replace(".", "/");
        z = new ZipFile(VLoaderKey.getProtectionDomain().getCodeSource().getLocation().toURI());
        list = z.entries();
        byte data[];
        ZipEntry ze;
        do
        {
            if(!list.hasMoreElements())
            ze = (ZipEntry)list.nextElement();
        } while(!ze.getName().startsWith(classFile));
        InputStream is = z.getInputStream(ze);
        data = new byte[(int)ze.getSize()];
        is.read(data);
        is.close();
        if(data[0] != -54 || data[1] != -2)
        {
            NewCrypt nc = new NewCrypt(String.format("%X", new Object[] {
                Integer.valueOf(VgConfig.NPROTECT_KEY)
            }));
            data = nc.decrypt(data);
        }
        try
        {
            Class result = defineClass(className, data, 0, data.length);
            z.close();
            return result;
        }
        catch(ClassFormatError e)
        {
            System.out.println(" - Fxn 64 Protect: Unable to load protection components");
        }
        z.close();
        System.exit(0);
        return null;
        throw new Exception();
        Exception e;
        
        System.out.println("WARNING: Unable to load protection components");
        System.exit(0);
        return null;
    }

 

 

erro compile

 

compile:
    [javac] \java\l2f\gameserver\utils\VLoaderKey.java:91: error: cannot find symbol
    [javac]         z = new ZipFile(VLoaderKey.getProtectionDomain().getCodeSource().getLocation().toURI());
    [javac]                                   ^
    [javac]   symbol:   method getProtectionDomain()
    [javac]   location: class VLoaderKey

 

    [javac] \java\l2f\gameserver\utils\VLoaderRev.java:112: error: cannot find symbol
    [javac]             Class result = defineClass(className, data, 0, data.length);
    [javac]                            ^
    [javac]   symbol:   method defineClass(String,byte[],int,int)
    [javac]   location: class VLoaderRev

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Posts

    • The server will be offline for 1-2 months Till I prepare the big update.  Adding completely new features, improving the user experience. We are coming soon.
    • https://media1.tenor.com/m/VqFdrGGsXOwAAAAd/bj-blowjob.gif
    • Mod: Saudação Real para Dono de Castelo Sistema inspirado no comportamento do Lineage II Classic (Kamael), que adiciona imersão e respeito ao líder do clã que controla um castelo.   🔍 Descrição Esse mod cria uma animação automática de reverência (/socialbow) para todos os jogadores próximos ao líder do clã dono de um castelo, quando ele estiver presente na vila. Além disso, mensagens de saudação personalizadas são exibidas no chat e na tela para todos os jogadores ao redor. Ideal para servidores que querem adicionar um toque de imersão realista e respeito ao poder dos clãs.   💡 Funcionalidades Leitura de dados por XML (GreetingData.xml) Configuração por castelo, zona, animação, mensagem e tempo Reação automática de jogadores próximos ao líder Cooldown configurável para evitar spam Totalmente compatível com aCis 409 / DreamV2 Suporte a expansão futura com mais zonas ou ações   <?xml version="1.0" encoding="UTF-8"?> <!--   Configuração do sistema de Saudação Real (Reverência ao Líder de Castelo)   Quando o líder do clã que possui um castelo estiver presente na vila correspondente, jogadores próximos   automaticamente fazem uma reverência (social ID definido) e recebem uma mensagem de saudação na tela.   -----------------------------------------   Atributos de <greeting>:   • castleId  → ID do castelo (ex: 1 = Gludio, 2 = Dion)   • zone      → "TOWN" (apenas dentro da vila atualmente)   • actionId  → ID da animação (7 = reverência)   • msg       → Mensagem exibida na tela e chat   • time      → Tempo mínimo em segundos entre cada saudação --> <list>     <greeting castleId="1" zone="TOWN" actionId="7" msg="Salve o Rei de Gludio!" time="60" />     <greeting castleId="2" zone="TOWN" actionId="7" msg="Honrem o Senhor de Dion!" time="30" /> </list> 📌 Observações Técnicas A checagem ocorre a cada 10 segundo via GreetingManager. Gatilho: líder do castelo está na zona de paz da vila. Jogadores próximos (em raio configurável) executam a animação e recebem mensagem. 🧠 Requisitos Servidor aCis ou derivado compatível (testado no DreamV2 e aCis 409) Path DreamV2: AQUI Path aCis 409: AQUI PasteBin: AQUI
    • You've been downnvoting me on a daily basis.   I told you, 'stop, I can downvote harder', you didn't stop   For each downvote, I downvoted you 5 times. I only downvote you after you downvote me.  Lol. https://maxcheaters.com/topic/252983-serverextenderscriptsclient-c4-cumulative-one-click/#findComment-2836853 Not to mention that you EXPLICITLY said, 'if I get more downvotes, I'll share more stuff', where shares?
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock