CSR generation script