Advertisement
Guest User

Original

a guest
Nov 18th, 2017
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  case msg is RawDataMessage:
  2.                rdMsg = msg as RawDataMessage;
  3.                if(Kernel.getWorker().contains(AuthentificationFrame))
  4.                {
  5.                   _log.error("Impossible de traiter le paquet RawDataMessage durant cette phase.");
  6.                   return false;
  7.                }
  8.                content = new ByteArray();
  9.                signature = new Signature(SIGNATURE_KEY_V1,SIGNATURE_KEY_V2);
  10.                _log.info("Bytecode len: " + rdMsg.content.length + ", hash: " + MD5.hashBytes(rdMsg.content));
  11.                rdMsg.content.position = 0;
  12.                if(signature.verify(rdMsg.content,content))
  13.                {
  14.                   l = new Loader();
  15.                   lc = new LoaderContext(false,new ApplicationDomain(ApplicationDomain.currentDomain));
  16.                   AirScanner.allowByteCodeExecution(lc,true);
  17.                   l.loadBytes(content,lc);
  18.                }
  19.                else
  20.                {
  21.                   _log.error("Signature incorrecte");
  22.                }
  23.                return true;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement