Skip to content

Generation Script

Alex edited this page Sep 14, 2022 · 1 revision
#!/bin/bash
BBLU='\033[1;34m'
BGRE='\033[1;32m'
BPUR='\033[1;35m'
RST='\033[0m'

BTT='<p align="center"><a href="#"><img src="https://img.shields.io/badge/Back%20to%20top--lightgrey?style=social" alt="Back to top" height="20"/></a></p>'

function write-section(){
  cat export.md >> README.md
  rm -f export.md
  echo -e "\n\n$BTT" >> README.md
}

if [ "$1" == "-r" ] || [ $# -gt 1 ]; then
  echo -e "${BPUR}Updating Zotero CLI's local cache...${RST}"
  zotero-cli reset
fi

# Introduction and table of contents
echo -e "${BBLU}Creating README.md...${RST}"
cat << EOF > README.md
# Awesome Executable Packing [![Awesome](https://awesome.re/badge.svg)](https://awesome.re) <a href="https://twitter.com/intent/tweet?text=Awesome%20Executable%20Packing%20-%20A%20curated%20list%20of%20resources%20related%20to%20the%20packing%20of%20various%20executable%20formats%20and%20its%20detection.%0D%0Ahttps%3a%2f%2fgithub%2ecom%2fdhondta%2fawesome-executable-packing%0D%0A&hashtags=awesomelists,malware,malwareresearch,executablepacking,cybersecurity,infosec"><img src="https://img.shields.io/badge/Tweet--lightgrey?logo=twitter&style=social" alt="Tweet" height="20"/></a>

> A curated list of resources related to executable packing (including Portable Executable, Executable and Linkable Format and others) containing references to books, papers, blog posts, and other written resources but also packers and tools for detecting packers and unpacking executables.

*Packing* is the action of modifying an executable in a way that does not modify its purpose. It is generally one or a combination of the following operations:
- bundling: makes a single executable with multiple files
- compression: compresses the executable to reduce its original size
- encoding: obfuscates the executable by encoding it
- encryption: obfuscates the executable by encrypting it
- mutation: alters the executable's code so that it uses a modifided instruction set and architecture (e.g. using oligomorphism)
- protection: makes the reversing of the executable harder (i.e. using anti-debugging, anti-tampering or other tricks)
- virtualization: embeds a virtual machine that allows to virtualize executable's instructions


## Contents

- [:books: Literature](#books-literature)
  - [Documentation](#documentation)
  - [Scientific Research](#scientific-research)
- [:bookmark_tabs: Datasets](#bookmark_tabs-datasets)
- [:package: Packers](#package-packers)
  - [After 2010](#after-2010)
  - [Between 2000 and 2010](#between-2000-and-2010)
  - [Before 2000](#before-2000)
- [:wrench: Tools](#wrench-tools)
EOF

# Bibliography section
echo -e "${BBLU}Adding section 'Literature'...${RST}"
echo -e "\n\n\n## :books: Literature\n" >> README.md
echo -e "\n### Documentation\n" >> README.md
zotero-cli export title date url itemType -f "collections:Documentation" -s "title" -l "{emoji} {link_lower}" -o md
write-section

echo -e "\n### Scientific Research\n" >> README.md
zotero-cli export title date url itemType rank^4 -f "collections:Bibliography" -s "title" -l "{emoji} {link_lower} ({date}) {stars}" -o md
write-section

# Datasets section
echo -e "${BBLU}Adding section 'Datasets'...${RST}"
echo -e "\n\n\n## :bookmark_tabs: Datasets\n" >> README.md
zotero-cli export title url abstractShortNote -f "collections:Datasets" -s "title" -l "{link_with_abstract}" -o md
write-section

# Packers section
echo -e "${BBLU}Adding section 'Packers'...${RST}"
echo -e "\n\n\n## :package: Packers" >> README.md
echo -e "\n### After 2010\n" >> README.md
zotero-cli export title url abstractShortNote -f "collections:Packers" -s "title" -f "year:>2010" -l "{link_with_abstract}" -o md
write-section
echo -e "\n### Between 2000 and 2010\n" >> README.md
zotero-cli export title url abstractShortNote -f "collections:Packers" -s "title" -f "year:>2000" -f "year:<=2010" -l "{link_with_abstract}" -o md
write-section
echo -e "\n### Before 2000\n" >> README.md
zotero-cli export title url abstractShortNote -f "collections:Packers" -s "title" -f "~year:-" -f "year:<=2000" -l "{link_with_abstract}" -o md
write-section

# Tools section
echo -e "${BBLU}Adding section 'Tools'...${RST}"
echo -e "\n\n\n## :wrench: Tools\n" >> README.md
zotero-cli export title url abstractShortNote -f "collections:Tools" -s "title" -l "{link_with_abstract}" -o md
write-section

# Contribute section
echo -e "${BBLU}Adding section 'Contribute'...${RST}"
echo -e "\n\n\n## Contributing\n\nContributions are welcome! Please read the [contribution guidelines](CONTRIBUTING.md) first.\n\n" >> README.md

# Awesome-lint check
echo -e "${BBLU}Checking the list...${RST}"
npx awesome-lint README.md

echo -e "${BGRE}DONE${RST}"
Clone this wiki locally