我不确定您的问题,但为什么不列出原始 yar 文件并循环下载它们呢?在下面的示例中,我拉下 3 个文件并打印它们,但我删除了所有包含包含的行的文件名。然后我当然会使用 '>' 将此脚本运行到另一个文件中:
例子 :
#!/bin/bash
raw_list_urls="https://raw.githubusercontent.com/Yara-Rules/rules/master/index.yar https://raw.githubusercontent.com/Yara-Rules/rules/master/index.yar https://raw.githubusercontent.com/Yara-Rules/rules/master/index.yar"
IFS=' ' read -r -a urls <<< "${raw_list_urls}"
for url in "${urls[@]}" ; do
echo "Getting ${url}" ; sleep 2
curl "${url}" | grep include | cut -d'"' -f2
done
输出示例:
./malware/RAT_ShadowTech.yar
./malware/RAT_Shim.yar
./malware/RAT_Terminator.yar
./malware/RAT_Xtreme.yar
./malware/RAT_ZoxPNG.yar
./malware/RAT_jRAT.yar
./malware/RAT_xRAT.yar
./malware/RAT_xRAT20.yar
./malware/TOOLKIT_Chinese_Hacktools.yar
./malware/TOOLKIT_Dubrute.yar
./malware/TOOLKIT_FinFisher_.yar
./malware/TOOLKIT_Gen_powerkatz.yar
./malware/TOOLKIT_Mandibule.yar