junxzm1990 / x86-sok

127 stars 20 forks source link

The `-d` option of run_extract_linux.sh never work #3

Closed Heersin closed 3 years ago

Heersin commented 3 years ago

the $DIRECTORY arg is set as an option but never gets used.

Possible solution :

 for f in `find $DIRECTORY -type f  -executable`; do
     echo "===========current file is $f==================="

     gt_gz=${f}.gt.gz
     gt=${f}.gt
     dir_name=`dirname $f`
     base_name=`basename $f`
     output=${dir_name}/${PREFIX}_${base_name}.pb

     objcopy --dump-section .rand=$gt_gz $f && yes | gzip -d $gt_gz

     python3 $SCRIPT -b $f -m $gt -o $output
 done

And the python scripts required some 3rd libs, I think it would be better to provide a requirements.txt :)

bin2415 commented 3 years ago

Thanks for the reporting! I already fix this and move the gt/requirements.txt to the root directory.