File tree 2 files changed +9
-5
lines changed
2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -97,7 +97,12 @@ def handle_build(args, challenges):
97
97
if args .debug_output :
98
98
challenge ._owns_workdir = False
99
99
100
- challenge .build ()
100
+ binary , lib , pdb = challenge .build ()
101
+
102
+ with open (f"{ challenge .__class__ .__name__ } .exe" , 'wb' ) as f :
103
+ f .write (binary )
104
+ with open (f"{ challenge .__class__ .__name__ } .pdb" , 'wb' ) as f :
105
+ f .write (pdb )
101
106
102
107
def raise_timeout (signum , stack ):
103
108
raise TimeoutError ("ACTION TIMED OUT" )
Original file line number Diff line number Diff line change @@ -524,11 +524,11 @@ def build_compiler_cmd(self):
524
524
if self .MAKE_DLL :
525
525
cmd .append ("/LD" )
526
526
527
- return cmd
528
- # Linker options
529
527
528
+ cmd .append (self .src_path )
529
+ # Linker options
530
530
#pylint:disable=unreachable
531
- cmd .append ('/LINK ' )
531
+ cmd .append ('/link ' )
532
532
if self .DYNAMIC_BASE is True :
533
533
cmd .append ('/DYNAMICBASE' )
534
534
else :
@@ -560,7 +560,6 @@ def build(self, source=None):
560
560
with open (src_path , 'w' ) as f :
561
561
f .write (source )
562
562
563
- cmd .append (src_path )
564
563
subprocess .check_output (cmd , cwd = workdir )
565
564
with open (bin_path , 'rb' ) as f :
566
565
binary = f .read ()
You can’t perform that action at this time.
0 commit comments