-
Notifications
You must be signed in to change notification settings - Fork 138
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit b3853fb
Showing
15 changed files
with
2,228 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
.*.swp | ||
Makefile | ||
Makefile.in | ||
aclocal.m4 | ||
autom4te.cache | ||
compile | ||
config.guess | ||
config.h | ||
config.h.in | ||
config.log | ||
config.status | ||
config.sub | ||
configure | ||
depcomp | ||
install-sh | ||
libideviceactivation-1.0.pc | ||
libtool | ||
ltmain.sh | ||
m4 | ||
missing | ||
src/.deps | ||
src/.libs | ||
src/*.o | ||
src/*.lo | ||
src/*.la | ||
stamp-h1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Konstantin Sokolov | ||
Martin Szulecki | ||
Nikias Bassen |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
AUTOMAKE_OPTIONS = foreign | ||
ACLOCAL_AMFLAGS = -I m4 | ||
SUBDIRS = src include tools | ||
|
||
DISTCHECK_CONFIGURE_FLAGS = | ||
|
||
pkgconfigdir = $(libdir)/pkgconfig | ||
pkgconfig_DATA = libideviceactivation-1.0.pc | ||
|
||
indent: | ||
indent -kr -ut -ts4 -l120 src/*.c src/*.h dev/*.c | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
Version 0.9.0 | ||
~~~~~~~~~~~~~ | ||
|
||
* Changes: | ||
- Refactor interface to allow handling forms | ||
- BuddyML and HTML parsing support | ||
- Minor fixes | ||
|
||
Version 0.5.0 | ||
~~~~~~~~~~~~~ | ||
|
||
* Changes: | ||
- Add debug level setter to enable verbose curl debugging | ||
- Minor fixes | ||
|
||
Version 0.1.0 | ||
~~~~~~~~~~~~~ | ||
|
||
* Changes: | ||
- Implement basic API to interact with activation webservice | ||
- Add basic ideviceactivation tool | ||
- Setup build system |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
About | ||
===== | ||
|
||
A library to manage the activation process of Apple iOS devices. | ||
|
||
Requirements | ||
============ | ||
|
||
Development Packages of: | ||
libcurl | ||
libxml2 | ||
libplist | ||
libimobiledevice | ||
|
||
Software: | ||
usbmuxd | ||
make | ||
autoheader | ||
automake | ||
autoconf | ||
libtool | ||
pkg-config | ||
gcc | ||
|
||
Installation | ||
============ | ||
|
||
To compile run: | ||
./autogen.sh | ||
make | ||
sudo make install | ||
|
||
Who/What/Where? | ||
=============== | ||
|
||
Home: | ||
http://www.libimobiledevice.org/ | ||
|
||
Code: | ||
git clone http://git.sukimashita.com/libideviceactivation.git | ||
|
||
Code (Mirror): | ||
git clone https://github.com/libimobiledevice/libideviceactivation.git | ||
|
||
Tickets: | ||
http://github.com/libimobiledevice/libideviceactivation/issues | ||
|
||
Mailing List: | ||
http://lists.libimobiledevice.org/mailman/listinfo/libimobiledevice-devel | ||
|
||
IRC: | ||
irc://irc.freenode.net#libimobiledevice | ||
|
||
Credits | ||
======= | ||
|
||
Inspired by the activation utility from Joshua Hill (p0sixninja): | ||
https://github.com/posixninja/ideviceactivate/ | ||
|
||
Apple, iPhone, iPod, and iPod Touch are trademarks of Apple Inc. | ||
libimobiledevice is an independent software library and has not been | ||
authorized, sponsored, or otherwise approved by Apple Inc. | ||
|
||
README Updated on: | ||
2014-06-05 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/sh | ||
gprefix=`which glibtoolize 2>&1 >/dev/null` | ||
if [ $? -eq 0 ]; then | ||
glibtoolize --force | ||
else | ||
libtoolize --force | ||
fi | ||
aclocal -I m4 | ||
autoheader | ||
automake --add-missing | ||
autoconf | ||
|
||
if [ -z "$NOCONFIGURE" ]; then | ||
./configure "$@" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
# -*- Autoconf -*- | ||
# Process this file with autoconf to produce a configure script. | ||
|
||
AC_PREREQ(2.61) | ||
AC_INIT(libideviceactivation, 0.9.0, [email protected]) | ||
AM_INIT_AUTOMAKE([dist-bzip2 no-dist-gzip]) | ||
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES]) | ||
AC_CONFIG_SRCDIR([src/]) | ||
AC_CONFIG_HEADERS([config.h]) | ||
AC_CONFIG_MACRO_DIR([m4]) | ||
|
||
dnl libtool versioning | ||
# +1 : 0 : +1 == adds new functions to the interface | ||
# +1 : 0 : 0 == changes or removes functions (changes include both | ||
# changes to the signature and the semantic) | ||
# ? :+1 : ? == just internal changes | ||
# CURRENT : REVISION : AGE | ||
LIBIDEVICEACTIVATION_SO_VERSION=2:0:0 | ||
|
||
dnl Minimum package versions | ||
LIBIMOBILEDEVICE_VERSION=1.1.4 | ||
LIBPLIST_VERSION=1.11 | ||
LIBCURL_VERSION=7.20 | ||
LIBXML2_VERSION=2.9 | ||
|
||
AC_SUBST(LIBIDEVICEACTIVATION_SO_VERSION) | ||
AC_SUBST(LIBIMOBILEDEVICE_VERSION) | ||
AC_SUBST(LIBPLIST_VERSION) | ||
AC_SUBST(LIBCURL_VERSION) | ||
AC_SUBST(LIBXML2_VERSION) | ||
|
||
# Checks for programs. | ||
AC_PROG_CC | ||
AC_PROG_CXX | ||
AM_PROG_CC_C_O | ||
AC_PROG_LIBTOOL | ||
|
||
# Checks for libraries. | ||
PKG_CHECK_MODULES(libimobiledevice, libimobiledevice-1.0 >= $LIBIMOBILEDEVICE_VERSION) | ||
PKG_CHECK_MODULES(libplist, libplist >= $LIBPLIST_VERSION) | ||
PKG_CHECK_MODULES(libcurl, libcurl >= $LIBCURL_VERSION) | ||
PKG_CHECK_MODULES(libxml2, libxml-2.0 >= $LIBXML2_VERSION) | ||
|
||
# Checks for header files. | ||
AC_HEADER_STDC | ||
AC_CHECK_HEADERS([stdint.h stdlib.h string.h sys/socket.h]) | ||
|
||
# Checks for typedefs, structures, and compiler characteristics. | ||
AC_C_CONST | ||
AC_TYPE_SIZE_T | ||
AC_TYPE_SSIZE_T | ||
AC_TYPE_UINT16_T | ||
AC_TYPE_UINT32_T | ||
AC_TYPE_UINT8_T | ||
|
||
# Checks for library functions. | ||
AC_CHECK_FUNCS([strcasecmp strdup strerror strndup]) | ||
|
||
AS_COMPILER_FLAGS(GLOBAL_CFLAGS, "-Wall -Wextra -Wmissing-declarations -Wredundant-decls -Wshadow -Wpointer-arith -Wwrite-strings -Wswitch-default -Wno-unused-parameter") | ||
AC_SUBST(GLOBAL_CFLAGS) | ||
|
||
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) | ||
|
||
AC_OUTPUT([ | ||
Makefile | ||
src/Makefile | ||
include/Makefile | ||
tools/Makefile | ||
libideviceactivation-1.0.pc | ||
]) | ||
|
||
echo " | ||
Configuration for $PACKAGE $VERSION: | ||
------------------------------------------- | ||
|
||
Install prefix: .........: $prefix | ||
|
||
Now type 'make' to build $PACKAGE $VERSION, | ||
and then 'make install' for installation. | ||
" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
nobase_include_HEADERS = libideviceactivation.h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
/** | ||
* @file libideviceactivation.h | ||
* @brief Manage device activation process. | ||
* | ||
* Copyright (c) 2011-2014 Mirell Development, 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 LIBIDEVICEACTIVATION_H | ||
#define LIBIDEVICEACTIVATION_H | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
#include <libimobiledevice/lockdown.h> | ||
#include <plist/plist.h> | ||
|
||
typedef enum { | ||
IDEVICE_ACTIVATION_E_SUCCESS = 0, | ||
IDEVICE_ACTIVATION_E_INCOMPLETE_INFO = -1, | ||
IDEVICE_ACTIVATION_E_OUT_OF_MEMORY = -2, | ||
IDEVICE_ACTIVATION_E_UNKNOWN_CONTENT_TYPE = -3, | ||
IDEVICE_ACTIVATION_E_BUDDYML_PARSING_ERROR = -4, | ||
IDEVICE_ACTIVATION_E_PLIST_PARSING_ERROR = -5, | ||
IDEVICE_ACTIVATION_E_HTML_PARSING_ERROR = -6, | ||
IDEVICE_ACTIVATION_E_UNSUPPORTED_FIELD_TYPE = -7, | ||
IDEVICE_ACTIVATION_E_INTERNAL_ERROR = -255 | ||
} idevice_activation_error_t; | ||
|
||
typedef enum { | ||
IDEVICE_ACTIVATION_CLIENT_MOBILE_ACTIVATION, | ||
IDEVICE_ACTIVATION_CLIENT_ITUNES | ||
} idevice_activation_client_type_t; | ||
|
||
typedef struct idevice_activation_request_private idevice_activation_request; | ||
typedef idevice_activation_request* idevice_activation_request_t; | ||
typedef struct idevice_activation_response_private idevice_activation_response; | ||
typedef idevice_activation_response* idevice_activation_response_t; | ||
|
||
/* Interface */ | ||
|
||
void idevice_activation_set_debug_level(int level); | ||
|
||
idevice_activation_error_t idevice_activation_request_new(idevice_activation_client_type_t activation_type, idevice_activation_request_t* request); | ||
idevice_activation_error_t idevice_activation_request_new_from_lockdownd(idevice_activation_client_type_t activation_type, lockdownd_client_t lockdown, idevice_activation_request_t* request); | ||
void idevice_activation_request_free(idevice_activation_request_t request); | ||
|
||
void idevice_activation_request_get_fields(idevice_activation_request_t request, plist_t* fields); | ||
void idevice_activation_request_set_fields(idevice_activation_request_t request, plist_t fields); | ||
void idevice_activation_request_set_fields_from_response(idevice_activation_request_t request, const idevice_activation_response_t response); | ||
void idevice_activation_request_set_field(idevice_activation_request_t request, const char* key, const char* value); | ||
void idevice_activation_request_get_field(idevice_activation_request_t request, const char* key, char** value); | ||
|
||
void idevice_activation_request_get_url(idevice_activation_request_t request, const char** url); | ||
void idevice_activation_request_set_url(idevice_activation_request_t request, const char* url); | ||
|
||
idevice_activation_error_t idevice_activation_response_new(idevice_activation_response_t* response); | ||
idevice_activation_error_t idevice_activation_response_new_from_html(const char* content, idevice_activation_response_t* response); | ||
idevice_activation_error_t idevice_activation_response_to_buffer(idevice_activation_response_t response, char** buffer, size_t* size); | ||
void idevice_activation_response_free(idevice_activation_response_t response); | ||
|
||
void idevice_activation_response_get_field(idevice_activation_response_t response, const char* key, char** value); | ||
void idevice_activation_response_get_fields(idevice_activation_response_t response, plist_t* fields); | ||
void idevice_activation_response_get_label(idevice_activation_response_t response, const char* key, char** value); | ||
|
||
void idevice_activation_response_get_title(idevice_activation_response_t response, const char** title); | ||
void idevice_activation_response_get_description(idevice_activation_response_t response, const char** description); | ||
void idevice_activation_response_get_activation_record(idevice_activation_response_t response, plist_t* activation_record); | ||
|
||
int idevice_activation_response_is_activation_acknowledged(idevice_activation_response_t response); | ||
int idevice_activation_response_is_authentication_required(idevice_activation_response_t response); | ||
int idevice_activation_response_field_requires_input(idevice_activation_response_t response, const char* key); | ||
int idevice_activation_response_has_errors(idevice_activation_response_t response); | ||
|
||
idevice_activation_error_t idevice_activation_send_request(idevice_activation_request_t request, idevice_activation_response_t* response); | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
prefix=@prefix@ | ||
exec_prefix=@exec_prefix@ | ||
libdir=@libdir@ | ||
includedir=@includedir@ | ||
|
||
Name: libideviceactivation | ||
Description: A library to handle activation of iDevices. | ||
Version: @VERSION@ | ||
Requires: libplist >= @LIBPLIST_VERSION@ libimobiledevice-1.0 >= @LIBIMOBILEDEVICE_VERSION@ libcurl >= @LIBCURL_VERSION@ libxml-2.0 >= @LIBXML2_VERSION@ | ||
Libs: -L${libdir} -lideviceactivation | ||
Cflags: -I${includedir} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
AM_CPPFLAGS = -I$(top_srcdir)/include | ||
|
||
AM_CFLAGS = $(GLOBAL_CFLAGS) $(libimobiledevice_CFLAGS) $(libplist_CFLAGS) $(libcurl_CFLAGS) $(libxml2_CFLAGS) | ||
AM_LDFLAGS = $(GLOBAL_LIBS) $(libimobiledevice_LIBS) $(libplist_LIBS) $(libcurl_LIBS) $(libxml2_LIBS) | ||
|
||
lib_LTLIBRARIES = libideviceactivation.la | ||
libideviceactivation_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(LIBIDEVICEACTIVATION_SO_VERSION) -no-undefined | ||
libideviceactivation_la_SOURCES = \ | ||
activation.c | ||
|
Oops, something went wrong.