Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c19279397f | ||
|
|
bb5349d710 | ||
|
|
9a75213b49 | ||
|
|
e06d20a392 | ||
|
|
a0f6324999 | ||
|
|
c259cbd5a3 |
13
Makefile
13
Makefile
@@ -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)
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -26,6 +26,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
namespace macaron {
|
namespace macaron {
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -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++)
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|||||||
@@ -27,6 +27,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <getopt.h>
|
#include <getopt.h>
|
||||||
|
#include <libgen.h>
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user