<commit_before>pyxdevkit: xdevkit for python
============================

Why?
------
I am a linux and python user by choice and debugging on the xbox is essentially the opposite. One is bascially confined to windows and C# or C++. This project allows you to debug across all platforms that python is supported, and is in python, so it is much more usable for me. Also why not?

Note
--------
This is early in development and I wouldn't use it for anything real right now. I will remove this when it is more stable.

Installation
-----------

```bash
$ git clone https://github.com/Fire30/pyxdevkit.git
$ cd pyxdevkit
$ python setup.py install
```

Hopefully I will put it on pypi someday

Features
-------
 - Get Memory
 - Set Memory
 - Get Console Name
 - Reboot Console
 - Connect as Debugger
 - Set Breakpoints
 - Start Execution After Break
 - Execute Function on Notification
 - Get Registers

Hopefully this will slowly increase over time.

Examples
--------

### Initialization

```python
>>> import pyxdevkit

>>> con = pyxdevkit.Console('192.168.1.69')
```

### Getting Name

```python
>>> con.get_name()
'Jtag'
```

### Getting Memory
```python
>>> addr = 0x82000000
>>> length = 8
>>> mem = con.get_memory(addr,length)
>>> print mem.encode('hex')
4d5a900003000000
```

### Setting Memory
```python
>>> addr = 0x82000000
>>> value = 'FFFFFFFFFFFFFFFF'
>>> con.set_memory(addr,length)
>>> mem = con.get_memory(addr,len(value))
>>> print mem.encode('hex')
ffffffffffffffff
```
### Rebooting Console
```python
>>> con.reboot()
```

### Connecting As Debugger
```python
>>> con.connect_as_debugger()
>>> # You can now use the other debugger functions such as breakpoints
...
>>> # Accessed with con.debugger
```

### Setting Breakpoints
```python
>>> # Note that this starts a new thread that stops when the main thread exits
...
>>> con.debuger.set_breakpoint(0x8234A68)
```

### Executing Function on Break
```python<commit_msg>Fixed formatting of some examples<commit_after>pyxdevkit: xdevkit for python
============================

Why?
------
I am a linux and python user by choice and debugging on the xbox is essentially the opposite. One is bascially confined to windows and C# or C++. This project allows you to debug across all platforms that python is supported, and is in python, so it is much more usable for me. Also why not?

Note
--------
This is early in development and I wouldn't use it for anything real right now. I will remove this when it is more stable.

Installation
-----------

```bash
$ git clone https://github.com/Fire30/pyxdevkit.git
$ cd pyxdevkit
$ python setup.py install
```

Hopefully I will put it on pypi someday

Features
-------
 - Get Memory
 - Set Memory
 - Get Console Name
 - Reboot Console
 - Connect as Debugger
 - Set Breakpoints
 - Start Execution After Break
 - Execute Function on Notification
 - Get Registers

Hopefully this will slowly increase over time.

Examples
--------

### Initialization

```python
>>> import pyxdevkit
>>> con = pyxdevkit.Console('192.168.1.69')
```

### Getting Name

```python
>>> con.get_name()
'Jtag'
```

### Getting Memory
```python
>>> addr = 0x82000000
>>> length = 8
>>> mem = con.get_memory(addr,length)
>>> print mem.encode('hex')
4d5a900003000000
```

### Setting Memory
```python
>>> addr = 0x82000000
>>> value = 'FFFFFFFFFFFFFFFF'
>>> con.set_memory(addr,length)
>>> mem = con.get_memory(addr,len(value))
>>> print mem.encode('hex')
ffffffffffffffff
```

### Rebooting Console
```python
>>> con.reboot()
```

### Connecting As Debugger
```python
>>> con.connect_as_debugger()
>>> # You can now use the other debugger functions such as breakpoints
...
>>> # Accessed with con.debugger
```

### Setting Breakpoints
```python
Note that this starts a new thread that stops when the main thread exits

>>> con.debuger.set_breakpoint(0x8234A68)
```

### Executing Function on Break
```python
{'fraction_non_alphanumeric': 0.1530743503987651, 'fraction_numerical': 0.026241317211216877, 'mean_word_length': 3.9591836734693877, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 108, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 4, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6450895', 'n_tokens_mistral': 1267, 'n_tokens_neox': 1135, 'n_words': 441}