Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c19279397f | ||
|
|
bb5349d710 | ||
|
|
9a75213b49 | ||
|
|
e06d20a392 | ||
|
|
a0f6324999 | ||
|
|
c259cbd5a3 |
13
Makefile
13
Makefile
@@ -1,13 +1,10 @@
|
||||
LIBDIR ?= /usr/lib
|
||||
INCDIR ?= /usr/include
|
||||
PREFIX ?= /usr/local
|
||||
LIBDIR ?= /lib
|
||||
INCDIR ?= /include
|
||||
|
||||
AR ?= $(CROSS)ar
|
||||
CXX ?= $(CROSS)g++
|
||||
|
||||
ifeq ($(PREFIX),)
|
||||
PREFIX := /usr/local
|
||||
endif
|
||||
|
||||
UPDFPARSERLIB = ./lib/updfparser/libupdfparser.a
|
||||
|
||||
CXXFLAGS += -Wall -fPIC -I./include -I./usr/include/pugixml -I./lib/updfparser/include
|
||||
@@ -86,13 +83,13 @@ libgourou.so: libgourou.so.$(VERSION)
|
||||
ln -f -s $^ $@
|
||||
|
||||
build_utils: $(TARGET_LIBRARIES)
|
||||
$(MAKE) -C utils ROOT=$(PWD) CXX=$(CXX) AR=$(AR) DEBUG=$(DEBUG) STATIC_UTILS=$(STATIC_UTILS) DEST_DIR=$(DEST_DIR) PREFIX=$(PREFIX)
|
||||
$(MAKE) -C utils ROOT=$(PWD) CXX=$(CXX) AR=$(AR) DEBUG=$(DEBUG) STATIC_UTILS=$(STATIC_UTILS) DESTDIR=$(DESTDIR) PREFIX=$(PREFIX)
|
||||
|
||||
install: $(TARGET_LIBRARIES)
|
||||
install -d $(DESTDIR)$(PREFIX)$(LIBDIR)
|
||||
# Use cp to preserver symlinks
|
||||
cp --no-dereference $(TARGET_LIBRARIES) $(DESTDIR)$(PREFIX)$(LIBDIR)
|
||||
$(MAKE) -C utils ROOT=$(PWD) CXX=$(CXX) AR=$(AR) DEBUG=$(DEBUG) STATIC_UTILS=$(STATIC_UTILS) DEST_DIR=$(DEST_DIR) PREFIX=$(PREFIX) install
|
||||
$(MAKE) -C utils ROOT=$(PWD) CXX=$(CXX) AR=$(AR) DEBUG=$(DEBUG) STATIC_UTILS=$(STATIC_UTILS) DESTDIR=$(DESTDIR) PREFIX=$(PREFIX) install
|
||||
|
||||
uninstall:
|
||||
cd $(DESTDIR)$(PREFIX)/$(LIBDIR)
|
||||
|
||||
@@ -76,6 +76,8 @@ BUILD_STATIC build libgourou.a if 1, nothing if 0, can be combined with BUILD_SH
|
||||
|
||||
BUILD_SHARED build libgourou.so if 1, nothing if 0, can be combined with BUILD_STATIC
|
||||
|
||||
other variables are DESTDIR and PREFIX to handle destination install directory
|
||||
|
||||
* Default value
|
||||
|
||||
|
||||
@@ -147,3 +149,4 @@ Special thanks
|
||||
|
||||
* _Jens_ for all test samples and utils testing
|
||||
* _Milian_ for debug & code
|
||||
* _Berwyn H_ for all test samples, feedbacks, patches and kind donation
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
*/
|
||||
|
||||
#include <string>
|
||||
#include <stdint.h>
|
||||
|
||||
namespace macaron {
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
#include "drmprocessorclient.h"
|
||||
|
||||
#include <pugixml.hpp>
|
||||
#include <stdint.h>
|
||||
|
||||
#ifndef HOBBES_DEFAULT_VERSION
|
||||
#define HOBBES_DEFAULT_VERSION "10.0.4"
|
||||
@@ -36,7 +37,7 @@
|
||||
#define ACS_SERVER "http://adeactivate.adobe.com/adept"
|
||||
#endif
|
||||
|
||||
#define LIBGOUROU_VERSION "0.8.1"
|
||||
#define LIBGOUROU_VERSION "0.8.2"
|
||||
|
||||
namespace gourou
|
||||
{
|
||||
|
||||
@@ -1363,6 +1363,30 @@ namespace gourou
|
||||
|
||||
delete[] clearData;
|
||||
}
|
||||
else if (dictData->type() == uPDFParser::DataType::HEXASTRING)
|
||||
{
|
||||
string = ((uPDFParser::HexaString*) dictData)->value();
|
||||
ByteArray hexStr = ByteArray::fromHex(string);
|
||||
|
||||
unsigned char* encryptedData = hexStr.data();
|
||||
unsigned int dataLength = hexStr.size();
|
||||
unsigned char* clearData = new unsigned char[dataLength];
|
||||
unsigned int dataOutLength;
|
||||
|
||||
GOUROU_LOG(DEBUG, "Decrypt hexa string " << dictIt->first << " " << dataLength);
|
||||
|
||||
client->decrypt(CryptoInterface::ALGO_RC4, CryptoInterface::CHAIN_ECB,
|
||||
tmpKey, sizeof(tmpKey), /* Key */
|
||||
NULL, 0, /* IV */
|
||||
encryptedData, dataLength,
|
||||
clearData, &dataOutLength);
|
||||
|
||||
ByteArray clearHexStr = ByteArray(clearData, dataOutLength);
|
||||
decodedStrings[dictIt->first] = new uPDFParser::HexaString(
|
||||
clearHexStr.toHex());
|
||||
|
||||
delete[] clearData;
|
||||
}
|
||||
}
|
||||
|
||||
for (dictIt = decodedStrings.begin(); dictIt != decodedStrings.end(); dictIt++)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
BINDIR ?= /usr/bin
|
||||
MANDIR ?= /usr/share/man
|
||||
BINDIR ?= /bin
|
||||
MANDIR ?= /share/man
|
||||
|
||||
TARGET_BINARIES=acsmdownloader adept_activate adept_remove adept_loan_mgt
|
||||
TARGETS=$(TARGET_BINARIES) launcher
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#include <termios.h>
|
||||
#include <string.h>
|
||||
#include <limits.h>
|
||||
#include <libgen.h>
|
||||
|
||||
#include <iostream>
|
||||
#include <ostream>
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
*/
|
||||
|
||||
#include <getopt.h>
|
||||
#include <libgen.h>
|
||||
|
||||
#include <iostream>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user