Skip to content

Generator

Generator #87

Workflow file for this run

name: Generator
on:
workflow_dispatch:
inputs:
account:
description: 'Number of Accounts to be generated (default = 0)'
required: false
default: '0'
key:
description: 'Number of Keys to be generated (default = 1)'
required: false
default: '1'
mail:
description: 'Choose the mail provider to generate license'
required: true
type: choice
options:
- 1secmail
- 10minutemail
- guerrillamail
- developermail
- mailticking
default: developermail
key_type:
description: 'Choose the key type'
required: true
type: choice
options:
- --key
- --small-business-key
default: --key
jobs:
GenerateKey:
runs-on: ubuntu-latest
steps:
- name: Generate key
run: |
ACCOUNT=${{ github.event.inputs.account }}
KEY=${{ github.event.inputs.key }}
MAIL=${{ github.event.inputs.mail }}
KEY_TYPE=${{ github.event.inputs.key_type }}
git clone https://github.com/rzc0d3r/ESET-KeyGen.git
cd ESET-KeyGen
sudo apt update
sudo apt install -y python3-pip
sudo pip install -r requirements.txt
if [[ ${ACCOUNT} -ne 0 && ${KEY} -ne 0 ]]; then
seq 1 ${ACCOUNT} | xargs -I {} -P ${ACCOUNT} python3 main.py --chrome --account --email-api ${MAIL} --skip-webdriver-menu --skip-update-check --no-logo --disable-progress-bar &
seq 1 ${KEY} | xargs -I {} -P ${KEY} python3 main.py --chrome ${KEY_TYPE} --email-api ${MAIL} --skip-webdriver-menu --skip-update-check --no-logo --disable-progress-bar
wait
echo "Account:" >> $GITHUB_STEP_SUMMARY
cat ./*ACCOUNTS.txt >> $GITHUB_STEP_SUMMARY
echo -e "\nKey:" >> $GITHUB_STEP_SUMMARY
cat ./*KEYS.txt >> $GITHUB_STEP_SUMMARY
elif [[ ${ACCOUNT} -ne 0 ]]; then
seq 1 ${ACCOUNT} | xargs -I {} -P ${ACCOUNT} python3 main.py --chrome --account --email-api ${MAIL} --skip-webdriver-menu --skip-update-check --no-logo --disable-progress-bar
echo -e "\nAccount:" >> $GITHUB_STEP_SUMMARY
cat ./*ACCOUNTS.txt >> $GITHUB_STEP_SUMMARY
elif [[ ${KEY} -ne 0 ]]; then
seq 1 ${KEY} | xargs -I {} -P ${KEY} python3 main.py --chrome ${KEY_TYPE} --email-api ${MAIL} --skip-webdriver-menu --skip-update-check --no-logo --disable-progress-bar
echo -e "\nKey:" >> $GITHUB_STEP_SUMMARY
cat ./*KEYS.txt >> $GITHUB_STEP_SUMMARY
fi