Skip to content

Instantly share code, notes, and snippets.

View alexandreags's full-sized avatar

Alexandre Gomes alexandreags

View GitHub Profile
@alexandreags
alexandreags / ExcelXLL.md
Created July 25, 2017 19:30 — forked from ryhanson/ExcelXLL.md
Execute a DLL via .xll files and the Excel.Application object's RegisterXLL() method

DLL Execution via Excel.Application RegisterXLL() method

A DLL can be loaded and executed via Excel by initializing the Excel.Application COM object and passing a DLL to the RegisterXLL method. The DLL path does not need to be local, it can also be a UNC path that points to a remote WebDAV server.

When delivering via WebDAV, it should be noted that the DLL is still written to disk but the dropped file is not the one loaded in to the process. This is the case for any file downloaded via WebDAV, and they are stored at: C:\Windows\ServiceProfiles\LocalService\AppData\Local\Temp\TfsStore\Tfs_DAV\.

The RegisterXLL function expects an XLL add-in which is essentially a specially crafted DLL with specific exports. More info on XLL's can be found on MSDN

The XLL can also be executed by double-clicking the .xll file, however there is a security warning. @rxwx has more notes on this here inc

@alexandreags
alexandreags / README.md
Created September 12, 2018 20:00 — forked from leonardofed/README.md
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.


@alexandreags
alexandreags / script.sh
Created April 9, 2020 16:27 — forked from thimbl/script.sh
shell script to create user accounts
#!/bin/bash
ROOT_UID=0
SUCCESS=0
E_USEREXISTS=70
# Run as root, of course. (this might not be necessary, because we have to run the script somehow with root anyway)
if [ "$UID" -ne "$ROOT_UID" ]
then
echo "Must be root to run this script."
exit $E_NOTROOT
@alexandreags
alexandreags / load-generator.js
Created September 24, 2020 17:00 — forked from tkrueger/load-generator.js
generate and measure CPU load with node.js
#!/usr/bin/env node
require(__dirname+"/processor-usage.js").startWatching();
var shouldRun = true;
var desiredLoadFactor = .5;
function blockCpuFor(ms) {
var now = new Date().getTime();
var result = 0
@alexandreags
alexandreags / gist:2d0d99475537a90f85aa04b3b7a21dfd
Created June 15, 2021 16:33 — forked from MennoTammens/gist:95045af97914a00db0e2d542a9b00fe2
Amazon Elastic Network Adapter (ENA) on CentOS 6
yum --enablerepo=extras install epel-release
yum -y install patch dkms kernel-devel perl
yum update
curl -o ena_linux_1.5.0.tar.gz https://codeload.github.com/amzn/amzn-drivers/tar.gz/ena_linux_1.5.0
tar zxvf ena_linux_1.5.0.tar.gz
mv amzn-drivers-ena_linux_1.5.0 /usr/src/ena-1.5.0
cat <<EOF > /usr/src/ena-1.5.0/dkms.conf
PACKAGE_NAME="ena"
@alexandreags
alexandreags / mysql-docker.sh
Created February 9, 2023 13:11 — forked from spalladino/mysql-docker.sh
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE