Skip to content

Instantly share code, notes, and snippets.

Starting program: /problems/ROP_2_20f65dd0bcbe267d/rop2
Temporary breakpoint 1, 0x0804850d in main ()
(gdb) x/10a $esp
0xffffd708: 0x0 0xf7e444b3 0x1 0xffffd7a4
0xffffd718: 0xffffd7ac 0xf7fd2000 0x0 0xffffd71c
0xffffd728: 0xffffd7ac 0x0
$ ./p.py --lightblue --pair get_time
Process Process-2:
Traceback (most recent call last):
File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/multiprocessing/process.py", line 114, in run
self._target(*self._args, **self._kwargs)
File "/Users/11rcombs/libs/libpebble/pebble/LightBluePebble.py", line 80, in run
from lightblue import pair, socket as lb_socket, finddevices, selectdevice
File "/usr/local/lib/python2.7/site-packages/lightblue/__init__.py", line 160, in <module>
ResHandle config_file = resource_get_handle(RESOURCE_ID_CLASS_LIST);
size_t config_size = resource_size(config_file);
period_count = config_size / sizeof(period); // 38 = size of each period record
periods = malloc(period_size * period_count);
resource_load(config_file, periods, config_size);
// In a .h:
typedef struct {
unsigned short number;
unsigned short start_time;
unsigned short end_time;
char[32] name;
}period;
// Outside any function:
period *periods;
<form method="post"><p>Check to <label><input type="checkbox" name="remember"/> remember mois</label> <input type="submit" value="Submit"/>.</p></form>