(gdb) file ./nome_do_programa # carrega um programa
(gdb) set disassembly-flavor intel # configura o disassembly para o tipo intel (tem AT&T e Intel, prefiro intel)
(gdb) layout regs # modifica layout de interface de debug para apresentar registradores
(gdb) layout next # vai para o próximo esquema de layouts
(gdb) set args 123123 # adiciona argumentos de inicialização, equivalente a './program 123123'
Desafio simples (eu diria que é nivel 2) (nivel 1) do site crackmes.one
Baixe o arquivo zipado e leia o FAQ para descobrir qual é a senha do zip.
$ file Sh4ll10.1.bin
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
# Para executar, é preciso ter o GDB instalado (tive falhas de segmentação com o GDB 9.1.1 via pacman, instalei via git mesmo). | |
# $ gdb | |
# $ source lucky_numbers_gdb.py | |
# Flag: 88 | |
# -*- coding: utf-8 -*- | |
import gdb | |
gdb.execute('file ./lucky_numbers') | |
gdb.execute('b *0x804903a') # start | |
gdb.execute('b *0x8049066') # jump |
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
# RASPBERRY PI2, PIVPN + PIHOLE (FALTANDO DNSCRYPT) | |
# atualizando pihole (serviço, DNS e frontend) | |
pihole -up | |
# atualizando lista de ad services | |
pihole -g | |
# verificando tempo de execução | |
uptime |
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
" Instale ctags via chocolatey on Windows | |
" choco install ctags | |
if has("gui_running") | |
set guioptions-=m "remove menu bar | |
set guioptions-=T "remove toolbar | |
set guioptions-=r "remove right-hand scroll bar | |
set guioptions-=L "remove left-hand scroll bar | |
" set guifont=Noto_Mono_for_Powerline:h11:cANSI |
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
public static void Main(string[] args) | |
{ | |
var factory = new ConnectionFactory() { HostName = "localhost" }; | |
using (var connection = factory.CreateConnection()) | |
using (var channel = connection.CreateModel()) | |
{ | |
channel.QueueDeclare("hello", true, false, false, null); | |
var message = new TestMessage(1, "test", $"{args.FirstOrDefault()} Hello World!"); | |
var json = JsonConvert.SerializeObject(message); |
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
<?xml version="1.0" encoding="utf-8"?> | |
<configuration> | |
<system.webServer> | |
<rewrite> | |
<rules> | |
<rule name="React Routes" stopProcessing="true"> | |
<match url=".*" /> | |
<conditions logicalGrouping="MatchAll"> | |
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> | |
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> |
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
[credential] | |
helper = wincred | |
[user] | |
name = Seu Nome | |
email = seu@email.com | |
[difftool "visualstudio"] | |
cmd = 'C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/Common7/IDE/CommonExtensions/Microsoft/TeamFoundation/Team Explorer/vsdiffmerge.exe' $LOCAL $REMOTE Source Target //ignorespace //t | |
[mergetool "visualstudio"] | |
cmd = 'C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/Common7/IDE/CommonExtensions/Microsoft/TeamFoundation/Team Explorer/vsdiffmerge.exe' $LOCAL $REMOTE $BASE $MERGED //ignorespace //m | |
trustExitCode = true |
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
using System; | |
using System.Collections.Generic; | |
public class Program | |
{ | |
public static void Main() | |
{ | |
var first = new ComparisonTestDefault() { | |
Id = 1, | |
Name = "teste" |
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
Source | |
https://bitbucket.org/dadhi/dryioc | |
Containers comparison | |
http://www.palmmedia.de/blog/2011/8/30/ioc-container-benchmark-performance-comparison | |
https://github.com/danielpalme/IocPerformance/blob/master/IocPerformance/Adapters/DryIocAdapter.cs | |
single-threaded (in ms) | |
------------------------ | |
Singleton: 29 |
NewerOlder