For the test case I'm using one from Ghidra's test suite, which is available here
It was compiled on my macOS machine with the following command:
$ clang -o decomp -O1 -g decomp.c -Wall -Wshadow -Wextra -std=c17 -arch arm64e
Some metadata:
def returnTypedString(): | |
# type: () -> str | |
return "lol" | |
def returnUntypedString(): | |
return "aww" | |
a = returnTypedString() | |
b = returnUntypedString() |
$ python binja_memcpy.py /bin/bash | |
Analyzing /bin/bash | |
100038024 dst:<entry rsi> | |
src:<entry rdi> | |
n:<range: -0x80000000 to 0x7fffffff> | |
1000380c9 dst:<undetermined> | |
src:<entry rdi> | |
n:<range: -0x80000000 to 0x7fffffff> |
#!/usr/bin/env python | |
# Copyright 2017 Ryan Stortz (@withzombies) | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# |
/* | |
Copyright (c) 2011, Thomas Dullien | |
All rights reserved. | |
Redistribution and use in source and binary forms, with or without | |
modification, are permitted provided that the following conditions | |
are met: | |
Redistributions of source code must retain the above copyright notice, | |
this list of conditions and the following disclaimer. Redistributions |
#!/usr/bin/env python | |
# Copyright 2017 Ryan Stortz (@withzombies) | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software |
#!/usr/bin/env python | |
# Copyright 2017 Ryan Stortz (@withzombies) | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software |
# This file describes the network interfaces available on your system | |
# For more information, see netplan(5). | |
network: | |
version: 2 | |
renderer: networkd | |
ethernets: | |
enp1s0: | |
addresses: | |
- 192.168.88.103/24 | |
gateway4: 192.168.88.1 |
#!/usr/bin/env python3 | |
""" | |
Copyright 2021 Trail of Bits | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 |
For the test case I'm using one from Ghidra's test suite, which is available here
It was compiled on my macOS machine with the following command:
$ clang -o decomp -O1 -g decomp.c -Wall -Wshadow -Wextra -std=c17 -arch arm64e
Some metadata:
CREATE TABLE _SqliteDatabaseProperties (key TEXT, value TEXT, UNIQUE(key)); | |
CREATE TABLE deleted_messages (ROWID INTEGER PRIMARY KEY AUTOINCREMENT UNIQUE, guid TEXT NOT NULL); | |
CREATE TABLE sqlite_sequence(name,seq); | |
CREATE TABLE chat_handle_join (chat_id INTEGER REFERENCES chat (ROWID) ON DELETE CASCADE, handle_id INTEGER REFERENCES handle (ROWID) ON DELETE CASCADE, UNIQUE(chat_id, handle_id)); | |
CREATE TABLE sync_deleted_messages (ROWID INTEGER PRIMARY KEY AUTOINCREMENT UNIQUE, guid TEXT NOT NULL, recordID TEXT ); | |
CREATE TABLE message_processing_task (ROWID INTEGER PRIMARY KEY AUTOINCREMENT UNIQUE, guid TEXT NOT NULL, task_flags INTEGER NOT NULL ); | |
CREATE TABLE handle (ROWID INTEGER PRIMARY KEY AUTOINCREMENT UNIQUE, id TEXT NOT NULL, country TEXT, service TEXT NOT NULL, uncanonicalized_id TEXT, person_centric_id TEXT, UNIQUE (id, service) ); | |
CREATE TABLE sync_deleted_chats (ROWID INTEGER PRIMARY KEY AUTOINCREMENT UNIQUE, guid TEXT NOT NULL, recordID TEXT,timestamp INTEGER); | |
CREATE TABLE message_attachment_join |