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
aecf8d98
Commit
aecf8d98
authored
Aug 20, 2008
by
Matt Colyer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed duplicate functions in initconf and fixed build issues.
parent
c8cf91ee
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
27 deletions
+14
-27
Makefile.am
src/Makefile.am
+3
-3
initconf.c
src/initconf.c
+9
-24
lockdown.h
src/lockdown.h
+2
-0
No files found.
src/Makefile.am
View file @
aecf8d98
...
...
@@ -5,6 +5,6 @@ bin_PROGRAMS = iphoneclient ifuse libiphone-initconf
iphoneclient_SOURCES
=
usbmux.c main.c iphone.c plist.c lockdown.c AFC.c userpref.c
ifuse_SOURCES
=
ifuse.c usbmux.c iphone.c plist.c lockdown.c AFC.c userpref.c
libiphone_initconf_SOURCES
=
initconf.c userpref.c
libiphone_initconf_CFLAGS
=
$(libgthread2_CFLAGS)
libiphone_initconf_LDFLAGS
=
$(libgthread2_LIBS)
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)
src/initconf.c
View file @
aecf8d98
...
...
@@ -25,38 +25,23 @@
#include <gnutls/gnutls.h>
#include <gnutls/x509.h>
#include <glib.h>
#include "userpref.h"
#include "lockdown.h"
int
debug
=
1
;
int
get_rand
(
int
min
,
int
max
)
{
int
retval
=
(
rand
()
%
(
max
-
min
))
+
min
;
return
retval
;
}
char
*
lockdownd_generate_hostid
()
{
char
*
hostid
=
(
char
*
)
malloc
(
sizeof
(
char
)
*
37
);
// HostID's are just UUID's, and UUID's are 36 characters long
const
char
*
chars
=
"ABCDEF0123456789"
;
srand
(
time
(
NULL
));
int
i
=
0
;
for
(
i
=
0
;
i
<
36
;
i
++
)
{
if
(
i
==
8
||
i
==
13
||
i
==
18
||
i
==
23
)
{
hostid
[
i
]
=
'-'
;
continue
;
}
else
{
hostid
[
i
]
=
chars
[
get_rand
(
0
,
16
)];
}
}
hostid
[
36
]
=
'\0'
;
return
hostid
;
}
/** Generates a 2048 byte key, split into a function so that it can be run in a
* thread.
*
* @param key The pointer to the desired location of the new key.
*/
void
generate_key
(
gpointer
key
){
gnutls_x509_privkey_generate
(
*
((
gnutls_x509_privkey_t
*
)
key
),
GNUTLS_PK_RSA
,
2048
,
0
);
g_thread_exit
(
0
);
}
/** Simple function that generates a spinner until the mutex is released.
*/
void
progress_bar
(
gpointer
mutex
){
const
char
*
spinner
=
"|/-
\\
|/-
\\
"
;
int
i
=
0
;
...
...
src/lockdown.h
View file @
aecf8d98
...
...
@@ -22,6 +22,7 @@
#ifndef LOCKDOWND_H
#define LOCKDOWND_H
#include "usbmux.h"
#include "plist.h"
#include <gnutls/gnutls.h>
...
...
@@ -36,6 +37,7 @@ typedef struct {
}
lockdownd_client
;
int
lockdownd_init
(
iPhone
*
phone
,
lockdownd_client
**
control
);
char
*
lockdownd_generate_hostid
();
lockdownd_client
*
new_lockdownd_client
(
iPhone
*
phone
);
int
lockdownd_hello
(
lockdownd_client
*
control
);
...
...
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