This file contains hidden or 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/env node | |
// https://gist.github.com/cedriczirtacic | |
const colors = require('colors'); | |
function help(e) { | |
if (e != undefined || e != "") | |
console.info("usage: %s <url>", e); | |
process.exit(1); | |
} |
This file contains hidden or 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
[1] 17/10/2017: Contacted Oracle security alert. | |
[2] 17/10/2017: Sent bug and description to Oracle security team. | |
[3] 23/10/2017: Global Information Security Team verified the vulnerability and forwarded the issue to the appropiate team for resolution. | |
[4] 30/10/2017: Ticket S0934612 was assigned. | |
[5] ??/11/2017: Fixed. | |
[6] 24/11/2017: Status report for issue S0934612 ("Under investigation / Being fixed in main codeline"). |
This file contains hidden or 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/env node | |
// https://gist.github.com/cedriczirtacic | |
var argv = process.argv; | |
if (argv.length < 3) { | |
console.info("%s <url>", argv[1]); | |
process.exit(1); | |
} | |
var url = argv[2]; |
This file contains hidden or 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
// like: otool -h <binary> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <fcntl.h> | |
#include <unistd.h> | |
#include <mach-o/loader.h> | |
int main(int argc, char *argv[]) { | |
struct mach_header_64 *hdr; |
This file contains hidden or 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
--- main.c.old 2017-10-11 11:00:46.980000015 -0600 | |
+++ main.c 2017-10-11 11:09:21.803333352 -0600 | |
@@ -152,7 +152,8 @@ | |
printf("recover from file `%s'.\n", optarg); | |
break; | |
case 'c': /* command */ | |
- startup_commands[startup_commands_n++] = optarg; | |
+ if (startup_commands_n <= HEXER_MAX_STARTUP_COMMANDS) | |
+ startup_commands[startup_commands_n++] = optarg; | |
break; |
This file contains hidden or 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
.section .text | |
.global _start | |
_start: | |
pushq %rbp | |
movq %rsp, %rbp | |
subq $1, %rbp | |
// call sys_getrandom | |
movl $318, %eax | |
leaq -1(%rbp), %rdi |
This file contains hidden or 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
//as -o rot13.o rot13.S && ld -o rot13 rot13.o | |
.section .data | |
string: | |
.asciz "Hello World.\n" | |
.section .text | |
.global _start | |
_start: | |
leaq string, %rdi | |
call rot13 |
This file contains hidden or 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
========================================== ========================================== | |
TMUX COMMAND WINDOW (TAB) | |
========================================== ========================================== | |
List tmux ls List ^b w | |
New -s <session> Create ^b c | |
Attach att -t <session> Rename ^b , <name> | |
Rename rename-session -t <old> <new> Last ^b l (lower-L) | |
Kill kill-session -t <session> Close ^b & |
This file contains hidden or 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
// To try it in i386: | |
// as --32 -o cs.o cs.S && ld -melf_i386 -o cs cs.o | |
.section .text | |
.global _start | |
_start: | |
movw %cs, %cx | |
shr $4, %cx | |
cmpb $3, %cl | |
je x86_64 |
This file contains hidden or 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
// gcc -o get_orig_hwaddr get_orig_hwaddr.c | |
#include <stdio.h> | |
#include <errno.h> | |
#include <string.h> | |
#include <net/if.h> | |
#include <sys/ioctl.h> | |
#include <sys/socket.h> | |
char *get_addr (int fd, struct ifreq *ifrq) { |