Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
L
libplist
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
pwn
libplist
Commits
e1b22c51
Commit
e1b22c51
authored
Aug 11, 2008
by
Jonathan Beck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
first shot at setting up a library
parent
de4b2790
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
68 additions
and
8 deletions
+68
-8
autogen.sh
autogen.sh
+1
-0
configure.ac
configure.ac
+3
-0
libiphone.h
include/libiphone/libiphone.h
+46
-0
Makefile.am
src/Makefile.am
+10
-2
iphone.c
src/iphone.c
+2
-2
iphone.h
src/iphone.h
+1
-2
lockdown.c
src/lockdown.c
+1
-1
lockdown.h
src/lockdown.h
+4
-1
No files found.
autogen.sh
View file @
e1b22c51
#!/bin/sh
aclocal
libtoolize
autoheader
automake
--add-missing
autoconf
configure.ac
View file @
e1b22c51
...
...
@@ -7,6 +7,9 @@ AM_INIT_AUTOMAKE(libiphone, 0.1.0)
AC_CONFIG_SRCDIR([src/])
AC_CONFIG_HEADER([config.h])
AC_PROG_LIBTOOL
# Checks for programs.
AC_PROG_CC
AM_PROG_CC_C_O
...
...
include/libiphone/libiphone.h
0 → 100644
View file @
e1b22c51
/*
* libiphone.h
* Main include of libiphone
*
* Copyright (c) 2008 Jonathan Beck All Rights Reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef LIBIPHONE_H
#define LIBIPHONE_H
#ifdef __cplusplus
extern
"C"
{
#endif
typedef
struct
iPhone
*
iPhone_t
;
typedef
struct
lockdownd_client
*
lockdownd_client_t
;
void
free_iPhone
(
iPhone_t
victim
);
iPhone_t
get_iPhone
();
int
lockdownd_init
(
iPhone_t
phone
,
lockdownd_client_t
*
control
);
#ifdef __cplusplus
}
#endif
#endif
src/Makefile.am
View file @
e1b22c51
INCLUDES
=
-I
$(top_srcdir)
/include
AM_CFLAGS
=
$(libxml2_CFLAGS)
$(libusb_CFLAGS)
$(libglib2_CFLAGS)
$(libfuse_CFLAGS)
$(libgnutls_CFLAGS)
$(libtasn1_CFLAGS)
-g
AM_LDFLAGS
=
$(libxml2_LIBS)
$(libusb_LIBS)
$(libglib2_LIBS)
$(libfuse_LIBS)
$(libgnutls_LIBS)
$(libtasn1_LIBS)
bin_PROGRAMS
=
iphoneclient ifuse libiphone-initconf
iphoneclient_SOURCES
=
usbmux.c main.c iphone.c plist.c lockdown.c AFC.c userpref
.c
i
fuse_SOURCES
=
ifuse.c usbmux.c iphone.c plist.c lockdown.c AFC.c userpref.c
iphoneclient_SOURCES
=
main
.c
i
phoneclient_LDADD
=
libiphone.la
libiphone_initconf_SOURCES
=
initconf.c userpref.c lockdown.c plist.c usbmux.c iphone.c
libiphone_initconf_CFLAGS
=
$(libgthread2_CFLAGS)
$(AM_CFLAGS)
libiphone_initconf_LDFLAGS
=
$(libgthread2_LIBS)
$(AM_LDFLAGS)
ifuse_SOURCES
=
ifuse.c
ifuse_LDADD
=
libiphone.la
lib_LTLIBRARIES
=
libiphone.la
libiphone_la_SOURCES
=
usbmux.c iphone.c plist.c lockdown.c AFC.c userpref.c
src/iphone.c
View file @
e1b22c51
...
...
@@ -34,7 +34,7 @@ extern int debug;
* @return A structure with data on the first iPhone it finds. (Or NULL, on
* error)
*/
iPhone
*
get_iPhone
()
{
iPhone
_t
get_iPhone
()
{
iPhone
*
phone
=
(
iPhone
*
)
malloc
(
sizeof
(
iPhone
));
struct
usb_bus
*
bus
,
*
busses
;
struct
usb_device
*
dev
;
...
...
@@ -129,7 +129,7 @@ iPhone *get_iPhone() {
*
* @param phone A pointer to an iPhone structure.
*/
void
free_iPhone
(
iPhone
*
phone
)
{
void
free_iPhone
(
iPhone
_t
phone
)
{
if
(
phone
->
buffer
)
free
(
phone
->
buffer
);
if
(
phone
->
device
)
{
usb_release_interface
(
phone
->
device
,
1
);
...
...
src/iphone.h
View file @
e1b22c51
...
...
@@ -28,6 +28,7 @@
#endif
#include <usb.h>
#include <libiphone/libiphone.h>
#define BULKIN 0x85
#define BULKOUT 0x04
...
...
@@ -39,8 +40,6 @@ typedef struct {
}
iPhone
;
// Function definitions
void
free_iPhone
(
iPhone
*
victim
);
iPhone
*
get_iPhone
();
int
send_to_phone
(
iPhone
*
phone
,
char
*
data
,
int
datalen
);
int
recv_from_phone
(
iPhone
*
phone
,
char
*
data
,
int
datalen
);
#endif
src/lockdown.c
View file @
e1b22c51
...
...
@@ -307,7 +307,7 @@ int lockdownd_get_device_public_key(lockdownd_client *control, char **public_key
*
* @return 1 on success and 0 on failure
*/
int
lockdownd_init
(
iPhone
*
phone
,
lockdownd_client
*
*
control
)
int
lockdownd_init
(
iPhone
_t
phone
,
lockdownd_client_t
*
control
)
{
int
ret
=
0
;
char
*
host_id
=
NULL
;
...
...
src/lockdown.h
View file @
e1b22c51
...
...
@@ -27,6 +27,10 @@
#include <gnutls/gnutls.h>
#include <string.h>
#include <libiphone/libiphone.h>
typedef
struct
{
usbmux_connection
*
connection
;
...
...
@@ -36,7 +40,6 @@ typedef struct {
int
gtls_buffer_hack_len
;
}
lockdownd_client
;
int
lockdownd_init
(
iPhone
*
phone
,
lockdownd_client
**
control
);
char
*
lockdownd_generate_hostid
();
lockdownd_client
*
new_lockdownd_client
(
iPhone
*
phone
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment