- Ghidra is a great framework
- For quick dissassembly, I use my "re" tool. Source
- If you are going to be reverse engineering Picture Transfer Protocol,
would suggest you check out my github.com/petabyt/sequoia-ptpy repo.
This file has been truncated, but you can view the full file.
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
Rebuild started... | |
1>------ Rebuild All started: Project: libjpg, Configuration: Debug x64 ------ | |
2>------ Rebuild All started: Project: libtiff, Configuration: Debug x64 ------ | |
3>------ Rebuild All started: Project: ZCLass, Configuration: Debug x64 ------ | |
4>------ Rebuild All started: Project: libraw, Configuration: Debug x64 ------ | |
4>Search paths being used for $(MSBuildExtensionsPath) are C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild;$(MSBuildProgramFiles32)\MSBuild | |
4>Trying to import C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\$(MSBuildToolsVersion)\Microsoft.Common.props using extensions path C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild | |
4>Property reassignment: $(MSBuildProjectExtensionsPath)="C:\msys64\home\brikb\DSS\LibRaw\buildfiles\obj\" (previous value: "obj\") at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Microsoft.Common.props (57,5) | |
4>Search paths being used for $(MSBuildExtensionsPath) a |
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
// Inspired by https://gist.github.com/laobubu/d6d0e9beb934b60b2e552c2d03e1409e | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <unistd.h> | |
#include <netdb.h> | |
#include <signal.h> | |
#define MAX_CONNECTION 100 | |
#define RESP_BUF_MAX 1000 |
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
# You may use this anywhere, if you link back to this page. | |
# Usage: | |
# $(call getMacro header.h MY_MAC %s) | |
# The macro will be 0 when it is undefined | |
# "Parse" C header, converting C macro to Make macro | |
# See https://gist.github.com/petabyt/898d3437decf65fc04fc50bd0e125362 | |
define importMacro | |
$(shell echo "#include <stdio.h>\n \ |
Yes.
Kind of.
I'm not a lawyer, nor have I talked to one, but this is my analysis:
Copyright is a nightmare to work with. There are no garuntees
that a company won't sue you.
As for US law, "Reverse engineering (section 1201(f))"
This exception permits
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
void *allocList_[1000];int allocn_=0;void *malloc_(long unsigned int n){ | |
void *x=malloc(n);allocList_[allocn_]=x;allocn_++;return x;}void autofree(){ | |
while (allocn_){allocn_--;free(allocList_[allocn_]);}} | |
#define malloc(x) malloc_(x) | |
#define exit(x) autofree(x);exit(x); |
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
void assemble_b(uintptr_t *from, uintptr_t *to, uint8_t buf[4]) { | |
uint32_t temp = (uintptr_t)to; | |
// Assemble instruction based on location | |
// of new addr relative to old address | |
if (from < to) { | |
temp = (temp - 8) / 4; | |
memcpy(buf, &temp, 4); | |
} else { | |
temp = 0xffffff - ((from - to + 4) / 4); |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <stdint.h> | |
#include <string.h> | |
void hijack(uintptr_t *addr, uintptr_t *newa, uint8_t buf[4]) { | |
uint32_t temp = (uintptr_t)newa; | |
if (addr < newa) { | |
temp = (temp - 8) / 4; |