Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

updated README. Fedora build notes from Killboy Powerhed)

  • Loading branch information...
commit 1adf8e68a30eaf8c532a654fb4a5e539ee703307 1 parent 4311ee5
endeav0r authored
14 CHANGELOG
View
@@ -1,14 +0,0 @@
-ALPHA CHARLIE
-- Internally reworked loaders to disassemble from a memory map instead of
- the file stored internally.
-- Threaded function discovery and disassembly for all internally implemented
- loaders (ELF32, ELF64, PE).
-- Remove Function added to function window
-- Changing the content of rdis' representation of memory triggers regraphing of
- functions where the change intersects or falls within the functions lowest
- upper and greatest lower bounds.
-- rdis is now linked against luajit instead of lua
-
-
-PURPOSE OF THIS RELEASE
- Test validity of runtime graph manipulations
19 DESIGN_PROBLEMS
View
@@ -1,19 +0,0 @@
- GGG
-G
-G GG
-G G
- GGG raph Truncation and Cross Graph References
-
-Graph truncation will cause a loader graph to destroy (or truncate) a node and
-remove all of its successors. Imagine a program which modifies the destination
-of a jump instruction, causing a portion of an existing graph to become
-invalid.
-
-The decision becomes what to do with cross graph references, for example a call
-to another function, in portions of the graph that will become truncated.
-If the targeted function is targeted solely from the truncated portion of the
-graph, what happens to this function?
-
- No change to the function
- Function is removed
- Function remains but has some indicator that it is no longer referenced
38 PKGBUILD
View
@@ -1,38 +0,0 @@
-##This is a basic PKGBUILD for rdis to ease building RDIS in my Arch boxes
-##Maintainer : TDKPS
-pkgname=rdis
-pkgrel=1
-pkgver=20121230
-arch=(x86_64)
-url="https://github.com/endeav0r/rdis"
-license=('GPLv3')
-depends=(gtk3 luajit cairo jansson git)
-optdepends=(lua51-socket)
-_gitroot="https://github.com/endeav0r/rdis.git"
-_gitname="rdis"
-
-
-build() {
- cd "$srcdir"
-
- msg "Connecting to GIT server..."
- if [[ -d ${_gitname} ]]; then
- (cd ${_gitname} && git pull origin)
- else
- git clone ${_gitroot} ${_gitname}
- fi
- msg "GIT checkout done or server timeout"
- msg "Starting make..."
-
- rm -rf ${_gitname}-build
- git clone ${_gitname} ${_gitname}-build
-
- cd ${srcdir}/${_gitname}-build/
-
-make
-
-}
-package() {
- cd "$srcdir/$_gitname-build"
- make DESTDIR="$pkgdir/" install
-}
13 README
View
@@ -26,6 +26,19 @@ More information can be found here: http://rainbowsandpwnies.com/rdis/
You will also need to grab udis86 and install it
+* Fedora (from Killboy Powerhed)
+ ## rdis dependencies for Fedora
+ $ yum -y install cairo-devel gtk3-devel jansson-devel openssl-devel udis86-devel
+
+ ## luajit is not in Fedora as yet, build from source or get candidate src rpm
+ ## ref: https://bugzilla.redhat.com/show_bug.cgi?id=718681
+ $ cd ~/Downloads && wget http://dl.dropbox.com/u/11270386/luajit-2.0.0-0.4.beta9.fc17.src.rpm
+
+ ## assuming you've set up an rpm building environment
+ $ rpmbuild --rebuild ~/Downloads/luajit-2.0.0-0.4.beta9.fc17.src.rpm
+ $ sudo rpm -Uvh ~/rpmbuild/RPMS/<arch>/luajit-2*
+ $ sudo rpm -Uvh ~/rpmbuild/RPMS/<arch>/luajit-devel-2*
+
* Other
Dependencies: gtk3, luajit, cairo, jansson
226 src/gui/inswindow.c
View
@@ -1,226 +0,0 @@
-#include "inswindow.h"
-
-// for debugging
-#include <cairo.h>
-
-#include <gdk/gdk.h>
-#include <stdio.h>
-#include <string.h>
-
-#include "instruction.h"
-#include "object.h"
-#include "util.h"
-
-enum {
- COL_INDEX,
- COL_ADDR,
- COL_BYTES,
- COL_DESCRIPTION,
- COL_COMMENT,
- COL_N
-};
-
-
-enum {
- COL_FUNC_INDEX,
- COL_FUNC_ADDR,
- COL_FUNC_NAME,
- COL_FUNC_N
-};
-
-
-struct _inswindow * inswindow_create (struct _gui * gui)
-{
- struct _inswindow * inswindow;
-
- inswindow = (struct _inswindow *) malloc(sizeof(struct _inswindow));
- inswindow->window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
- inswindow->scrolledWindow = gtk_scrolled_window_new(NULL, NULL);
- inswindow->listStore = gtk_list_store_new(COL_N,
- G_TYPE_UINT64,
- G_TYPE_STRING,
- G_TYPE_STRING,
- G_TYPE_STRING,
- G_TYPE_STRING);
- inswindow->treeView = gtk_tree_view_new_with_model(
- GTK_TREE_MODEL(inswindow->listStore));
-
- inswindow->gui = gui;
-
- GtkTreeIter treeIter;
-
- // add all the instructions to the listStore
- struct _graph_it * graph_it;
- for (graph_it = graph_iterator(inswindow->gui->rdis->graph);
- graph_it != NULL;
- graph_it = graph_it_next(graph_it)) {
-
- struct _list_it * list_it;
- for (list_it = list_iterator(graph_it_data(graph_it));
- list_it != NULL;
- list_it = list_it->next) {
-
- struct _ins * ins = list_it->data;
-
- // prepare text based off instruction
- char addrText[64];
- snprintf(addrText, 64, "%04llx", (unsigned long long) ins->address);
-
-
- char bytesText[64];
- char tmp[8];
- size_t i;
- memset(bytesText, 0, 64);
- for (i = 0; i < (ins->size < 8 ? ins->size : 8); i++) {
- snprintf(tmp, 8, "%02x", ins->bytes[i]);
- strncat(bytesText, tmp, 63);
- }
- bytesText[63] = '\0';
-
- // add text to tree model
- gtk_list_store_append(inswindow->listStore, &treeIter);
- gtk_list_store_set(inswindow->listStore, &treeIter,
- COL_INDEX, ins->address,
- COL_ADDR, addrText,
- COL_BYTES, bytesText,
- COL_DESCRIPTION, ins->description,
- COL_COMMENT, ins->comment,
- -1);
- }
- }
-
- // create the columns for the insTreeView
- GtkCellRenderer * renderer;
- GtkTreeViewColumn * column;
- renderer = gtk_cell_renderer_text_new();
- column = gtk_tree_view_column_new_with_attributes(LANG_ADDRESS,
- renderer,
- "text", COL_ADDR,
- NULL);
- g_object_set(renderer, "font", "monospace", "size-points", 9.0, NULL);
- gtk_tree_view_column_set_resizable(column, TRUE);
- gtk_tree_view_append_column(GTK_TREE_VIEW(inswindow->treeView), column);
-
- renderer = gtk_cell_renderer_text_new();
- column = gtk_tree_view_column_new_with_attributes(LANG_BYTES,
- renderer,
- "text", COL_BYTES,
- NULL);
- g_object_set(renderer, "font", "monospace", "size-points", 9.0, NULL);
- gtk_tree_view_column_set_resizable(column, TRUE);
- gtk_tree_view_append_column(GTK_TREE_VIEW(inswindow->treeView), column);
-
- renderer = gtk_cell_renderer_text_new();
- column = gtk_tree_view_column_new_with_attributes(LANG_DESCRIPTION,
- renderer,
- "text", COL_DESCRIPTION,
- NULL);
- g_object_set(renderer, "font", "monospace", "size-points", 9.0, NULL);
- gtk_tree_view_column_set_resizable(column, TRUE);
- gtk_tree_view_append_column(GTK_TREE_VIEW(inswindow->treeView), column);
-
- renderer = gtk_cell_renderer_text_new();
- column = gtk_tree_view_column_new_with_attributes(LANG_COMMENT,
- renderer,
- "text", COL_COMMENT,
- NULL);
- g_object_set(renderer, "font", "monospace", "size-points", 9.0, NULL);
- gtk_tree_view_column_set_resizable(column, TRUE);
- gtk_tree_view_append_column(GTK_TREE_VIEW(inswindow->treeView), column);
-
-
- /*
- * Other Init
- */
-
- // add things inside containers
- gtk_container_add(GTK_CONTAINER(inswindow->scrolledWindow),
- inswindow->treeView);
-
- gtk_container_add(GTK_CONTAINER(inswindow->window),
- inswindow->scrolledWindow);
-
- // signal some stuff
- g_signal_connect(inswindow->treeView,
- "row-activated",
- G_CALLBACK(inswindow_row_activated),
- inswindow);
-
- // set more options
- gtk_window_set_default_size(GTK_WINDOW(inswindow->window), 800, 600);
-
- // show ALL THE WIDGETS
- gtk_widget_show(inswindow->scrolledWindow);
- gtk_widget_show(inswindow->treeView);
-
- return inswindow;
-}
-
-
-
-void inswindow_delete (struct _inswindow * inswindow)
-{
- gtk_widget_destroy(inswindow->window);
- free(inswindow);
-}
-
-
-
-GtkWidget * inswindow_window (struct _inswindow * inswindow)
-{
- return inswindow->window;
-}
-
-
-
-void inswindow_insTreeView_select_index (struct _inswindow * inswindow,
- uint64_t index)
-{
- GtkTreeIter treeIter;
- uint64_t store_index;
-
- if (gtk_tree_model_get_iter_first(GTK_TREE_MODEL(inswindow->listStore),
- &treeIter) == FALSE)
- return;
-
- while (1) {
- gtk_tree_model_get(GTK_TREE_MODEL(inswindow->listStore),
- &treeIter,
- COL_INDEX,
- &store_index, -1);
- if (store_index == index) {
- gtk_tree_view_set_cursor(
- GTK_TREE_VIEW(inswindow->treeView),
- gtk_tree_model_get_path(
- GTK_TREE_MODEL(inswindow->listStore),
- &treeIter),
- NULL,
- 0);
- break;
- }
- if (gtk_tree_model_iter_next(GTK_TREE_MODEL(inswindow->listStore),
- &treeIter) == FALSE)
- break;
- }
-}
-
-
-
-void inswindow_row_activated (GtkTreeView * treeView,
- GtkTreePath * treePath,
- GtkTreeViewColumn * treeViewColumn,
- struct _inswindow * inswindow)
-{
- uint64_t index;
-
- GtkTreeIter treeIter;
-
- // get the index
- gtk_tree_model_get_iter(GTK_TREE_MODEL(inswindow->listStore),
- &treeIter,
- treePath);
- gtk_tree_model_get(GTK_TREE_MODEL(inswindow->listStore),
- &treeIter,
- COL_INDEX,
- &index, -1);
-}
40 src/gui/inswindow.h
View
@@ -1,40 +0,0 @@
-#ifndef inswindow_HEADER
-#define inswindow_HEADER
-
-#include <gtk/gtk.h>
-#include <glib.h>
-
-#include "graph.h"
-#include "gui.h"
-#include "tree.h"
-
-#define DEFAULT_IMAGE_WIDTH 8.0
-#define DEFAULT_IMAGE_HEIGHT 12.0
-
-struct _inswindow {
- GtkWidget * window;
- GtkWidget * scrolledWindow;
- GtkWidget * treeView;
- GtkListStore * listStore;
- struct _gui * gui;
-};
-
-
-struct _inswindow * inswindow_create (struct _gui * gui);
-
-void inswindow_delete (struct _inswindow * inswindow);
-
-GtkWidget * inswindow_window (struct _inswindow * inswindow);
-
-void inswindow_image_update (struct _inswindow * inswindow);
-void inswindow_graph_update (struct _inswindow * inswindow, uint64_t index);
-
-void inswindow_select_index (struct _inswindow * inswindow,
- uint64_t index);
-
-void inswindow_row_activated (GtkTreeView * treeView,
- GtkTreePath * treePath,
- GtkTreeViewColumn * treeViewColumn,
- struct _inswindow * inswindow);
-
-#endif
Please sign in to comment.
Something went wrong with that request. Please try again.