Superscript that does a debootstrap and chroots with a subscript

Home   »   Superscript that does a debootstrap and chroots with a subscript

#!/bin/bash


while read p; do
  mkdir $p
  sudo debootstrap fossa --arch=amd64 $p http://archive.ubuntu.com/ubuntu/
  sudo chroot $p 
  #####Lines 9-13 should be done in a subscript run as a command via chroot#####
  sudo apt install binutils
  sudo apt download $p
  ###also apt install all the dependencies from the control.tar.xz file.
  ar -x *.deb
  tar --wildcards -xvf data.tar.xz ./usr/bin/* ./usr/sbin/*
  # do ghidra on ./usr/bin/* and ./usr/sbin/*
  #####end subscript#####
  sudo echo "did ghidra on $p" >> /results.log
done

Leave a Reply

Your email address will not be published. Required fields are marked *