6 Commits

Author SHA1 Message Date
Grégory Soutadé
c19279397f Update README.md 2023-08-09 20:58:06 +02:00
Grégory Soutadé
bb5349d710 Update version 2023-08-08 20:14:23 +02:00
Grégory Soutadé
9a75213b49 Fix misuse of DESTDIR and PREFIX in Makefile 2023-08-08 20:13:03 +02:00
Grégory Soutadé
e06d20a392 DRM removal: Forgot to decrypt HexaString objects 2023-08-05 14:43:48 +02:00
Grégory Soutadé
a0f6324999 Try to fix GCC 13 compilation errors 2023-05-03 21:15:31 +02:00
Grégory Soutadé
c259cbd5a3 Add missing libgen.h in utils for basename() call 2023-03-28 20:32:05 +02:00
8 changed files with 39 additions and 11 deletions

View File

@@ -1,13 +1,10 @@
LIBDIR ?= /usr/lib PREFIX ?= /usr/local
INCDIR ?= /usr/include LIBDIR ?= /lib
INCDIR ?= /include
AR ?= $(CROSS)ar AR ?= $(CROSS)ar
CXX ?= $(CROSS)g++ CXX ?= $(CROSS)g++
ifeq ($(PREFIX),)
PREFIX := /usr/local
endif
UPDFPARSERLIB = ./lib/updfparser/libupdfparser.a UPDFPARSERLIB = ./lib/updfparser/libupdfparser.a
CXXFLAGS += -Wall -fPIC -I./include -I./usr/include/pugixml -I./lib/updfparser/include 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 $^ $@ ln -f -s $^ $@
build_utils: $(TARGET_LIBRARIES) 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: $(TARGET_LIBRARIES)
install -d $(DESTDIR)$(PREFIX)$(LIBDIR) install -d $(DESTDIR)$(PREFIX)$(LIBDIR)
# Use cp to preserver symlinks # Use cp to preserver symlinks
cp --no-dereference $(TARGET_LIBRARIES) $(DESTDIR)$(PREFIX)$(LIBDIR) 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: uninstall:
cd $(DESTDIR)$(PREFIX)/$(LIBDIR) cd $(DESTDIR)$(PREFIX)/$(LIBDIR)

View File

@@ -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 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 * Default value
@@ -147,3 +149,4 @@ Special thanks
* _Jens_ for all test samples and utils testing * _Jens_ for all test samples and utils testing
* _Milian_ for debug & code * _Milian_ for debug & code
* _Berwyn H_ for all test samples, feedbacks, patches and kind donation

View File

@@ -26,6 +26,7 @@
*/ */
#include <string> #include <string>
#include <stdint.h>
namespace macaron { namespace macaron {

View File

@@ -27,6 +27,7 @@
#include "drmprocessorclient.h" #include "drmprocessorclient.h"
#include <pugixml.hpp> #include <pugixml.hpp>
#include <stdint.h>
#ifndef HOBBES_DEFAULT_VERSION #ifndef HOBBES_DEFAULT_VERSION
#define HOBBES_DEFAULT_VERSION "10.0.4" #define HOBBES_DEFAULT_VERSION "10.0.4"
@@ -36,7 +37,7 @@
#define ACS_SERVER "http://adeactivate.adobe.com/adept" #define ACS_SERVER "http://adeactivate.adobe.com/adept"
#endif #endif
#define LIBGOUROU_VERSION "0.8.1" #define LIBGOUROU_VERSION "0.8.2"
namespace gourou namespace gourou
{ {

View File

@@ -1363,6 +1363,30 @@ namespace gourou
delete[] clearData; 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++) for (dictIt = decodedStrings.begin(); dictIt != decodedStrings.end(); dictIt++)

View File

@@ -1,5 +1,5 @@
BINDIR ?= /usr/bin BINDIR ?= /bin
MANDIR ?= /usr/share/man MANDIR ?= /share/man
TARGET_BINARIES=acsmdownloader adept_activate adept_remove adept_loan_mgt TARGET_BINARIES=acsmdownloader adept_activate adept_remove adept_loan_mgt
TARGETS=$(TARGET_BINARIES) launcher TARGETS=$(TARGET_BINARIES) launcher

View File

@@ -31,6 +31,7 @@
#include <termios.h> #include <termios.h>
#include <string.h> #include <string.h>
#include <limits.h> #include <limits.h>
#include <libgen.h>
#include <iostream> #include <iostream>
#include <ostream> #include <ostream>

View File

@@ -27,6 +27,7 @@
*/ */
#include <getopt.h> #include <getopt.h>
#include <libgen.h>
#include <iostream> #include <iostream>