Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
jmpoep committed Dec 7, 2023
0 parents commit 28008a7
Show file tree
Hide file tree
Showing 1,169 changed files with 1,070,895 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
*.c* text eol=crlf
*.h text eol=crlf
*.bat text eol=crlf

# Declare files that will always have LF line endings on checkout.
*.sh text eol=lf

# Denote all files that are truly binary and should not be modified.
*.png binary
*.jpg binary
125 changes: 125 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
bin/**
tmp/**
*.suo
xcuserdata
.DS_Store
/.klocwork
/ipch
/VMProtect/moc
*.user
VMProtectSDK32.def
VMProtectSDK64.def
build.log
*.dylib
*.dll
*.sys
vmprotect.opensdf
vmprotect.sdf
core/version.h
*.aps
core/lang.tmp
core/lang.inc
*.log
/iss/Output
*.tmp
*.vsp
*.vspx
*.psess
/iss/end_user/Output
*.hmap
*.dcu
/iss/keygen/__history
/third-party/diskid/Debug
/third-party/diskid/Release
/third-party/diskid/x64/Release
/third-party/diskid/x64/Debug
/third-party/taggant/java_pkiclient/lib
/third-party/taggant/java_pkiclient/pkiwebserviceclient.jar
/Debug
/third-party/diskid/.klocwork/diskid
ConsoleApplication1/
utils/bc/
iss/end_user/NoSend/
TestResults/
third-party/.klocwork/
unit-tests/.klocwork/
sdk/VMProtect.SDK/obj/
utils/ipn_sqlclr/obj/
unit-tests/ipn_sqlclr.Test/bin/
utils/.klocwork/
utils/ipn_sqlclr/.klocwork/
examples/dotnet/forms_mixed/Debug/
examples/dotnet/forms_mixed/Release/
iss/end_user/Ban/
examples/dotnet/.klocwork/
examples/dotnet/ConsoleApplication2/.klocwork/
third-party/taggant/java_pkiclient/portecle-1.7/
utils/ipn_sqlclr/bin/
unit-tests/ipn_sqlclr.Test/obj/
utils/ipn_tool/bin/
core/lang_def.inc
core/lang_enum.inc
core/lang_info.inc
examples/dotnet/Debug/
mac_commond.mak
VMProtect/resources.cc
VMProtect/mac_guid.mak
VMProtect/mac_gui64_debug.mak
iss/keygen/Project1.dproj.local
core/mac_cored.mak
core/mac_core64_debug.mak
core/invariant/mac_invariant_cored.mak
core/invariant/mac_invariant_core64_debug.mak
app/vmprotect_gui.app/Contents/Info.plist
utils/ipn_tool/obj/
utils/ipn_sqlclr/ipn_sqlclr.publish.xml
utils/ipn_sqlclr/ipn_sqlclr.sln
examples/dotnet/forms_cil/bin/
examples/dotnet/forms_cil/obj/
examples/dotnet/ConsoleApplication2/
examples/dotnet/ConsoleApplication3/
examples/code markers/Xcode/Build/
examples/code markers/Xcode/Project1.xcodeproj/project.xcworkspace/xcshareddata/
examples/code markers/Xcode/Project1/VMProtectSDK.h
examples/licensing/Xcode/VMProtectSDK.h
examples/licensing/Xcode/VMProtect Licensing Test.xcodeproj/project.xcworkspace/xcshareddata/
examples/licensing/Xcode/Build/
third-party/taggant/java_pkiclient/stuff/certificates/
third-party/taggant/java_pkiclient/check/
third-party/taggant/java_pkiclient/root.p7b
third-party/taggant/java_pkiclient/lic.pem
third-party/taggant/java_pkiclient/gp.txt
third-party/taggant/java_pkiclient/exp_pki_ra.cer
third-party/taggant/java_pkiclient/client.p12
third-party/taggant/java_pkiclient/VMP.cer
*.FileListAbsolute.txt
third-party/crashrpt/
runtime/VMProtect.Runtime/Tests/UnitTestProject/bin/
runtime/VMProtect.Runtime/Tests/UnitTestProject/obj/
test-binaries/win32-app-delphi-i386.exe
test-binaries/win32-app-test1-i386.exe
test-binaries/win64-app-msvc-amd64.exe
vmprotect.VC.VC.opendb
vmprotect.VC.db
runtime/VMProtect.Runtime/obj/
*.opendb
*.db
*.ipch
examples/licensing/Net/bin/
examples/licensing/Net/obj/
examples/licensing/MSVC/bin/
examples/licensing/MSVC/tmp/
examples/licensing/MSVC/VMProtectSDK.h
examples/licensing/MSVC/VMProtectSDK32.lib
examples/licensing/C#/VMProtect.SDK.pdb
VMProtect.SDK.pdb
examples/code markers/Net/bin/
examples/code markers/Net/obj/
examples/keygen/Net/KeyGen/obj/
examples/keygen/Net/bin/
third-party/taggant/openssl/ms/Debug/
*.so
*.exe
/iss/body.txt
/iss/ipn/vmprotect.vmp
/iss/ipn/licenses/
17 changes: 17 additions & 0 deletions NetX64.testsettings
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<TestSettings name="TestSettingsNetX64" id="20a4f799-7d31-4678-a2b9-79cdf7b1e821" xmlns="http://microsoft.com/schemas/VisualStudio/TeamTest/2010">
<Description>These are default test settings for a local test run.</Description>
<Deployment enabled="false" />
<Execution hostProcessPlatform="MSIL">
<TestTypeSpecific>
<UnitTestRunConfig testTypeId="13cdc9d9-ddb5-4fa4-a97d-d965ccfc6d4b">
<AssemblyResolution>
<TestDirectory useLoadContext="true" />
</AssemblyResolution>
</UnitTestRunConfig>
</TestTypeSpecific>
<AgentRule name="Execution Agents">
</AgentRule>
</Execution>
<Properties />
</TestSettings>
9 changes: 9 additions & 0 deletions NetX86.testsettings
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<TestSettings
id="fe7fee5f-a8df-4e00-90e9-1e11936b044a"
name="NetX86"
enableDefaultDataCollectors="false"
xmlns="http://microsoft.com/schemas/VisualStudio/TeamTest/2010">
<Description><!--_locID_text="Description1"-->These are default test settings for a local test run.</Description>
<Deployment enabled="false" />
</TestSettings>
4 changes: 4 additions & 0 deletions New Text Document.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
需要修复:

_CxxThrowException
返回地址必须填充Nop否则会出错
10 changes: 10 additions & 0 deletions README
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
VMProtect project
-----------------

Building

POSIX:
$ ./build.sh

Windows:
> build.bat
177 changes: 177 additions & 0 deletions VMProtect/about_dialog.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
#include "../core/objects.h"
#include "../core/files.h"
#include "../core/core.h"
#include "../core/lang.h"
#include "widgets.h"
#include "about_dialog.h"
#include "help_browser.h"
#include "moc/moc_about_dialog.cc"

/**
* AboutDialog
*/

AboutDialog::AboutDialog(QWidget *parent)
: QDialog(parent, Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::CustomizeWindowHint | Qt::WindowCloseButtonHint | Qt::MSWindowsFixedSizeDialogHint)
{
setWindowTitle(QString::fromUtf8(language[lsAbout].c_str()));

QAction *helpAction = new QAction(this);
helpAction->setShortcut(HelpContentsKeySequence());
connect(helpAction, SIGNAL(triggered()), this, SLOT(help()));

addAction(helpAction);

QFrame *top = new QFrame(this);
top->setObjectName("bootTop");

QLabel *logo = new QLabel(this);
logo->setPixmap(QPixmap(":/images/logo.png"));

QLabel *version = new QLabel(QString::fromLatin1(Core::edition()) + " v " + QString::fromLatin1(Core::version()), this);
version->setObjectName("version");

QLabel *build = new QLabel("build " + QString::fromLatin1(Core::build()), this);
build->setObjectName("build");

QGridLayout *grid_layout = new QGridLayout();
grid_layout->setContentsMargins(30, 30, 30, 20);
grid_layout->setSpacing(0);
grid_layout->setColumnStretch(1, 1);
grid_layout->addWidget(logo, 0, 0, 3, 1);
grid_layout->addWidget(version, 0, 1, Qt::AlignCenter);
grid_layout->addItem(new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Expanding), 1, 1);
grid_layout->addWidget(build, 2, 1, Qt::AlignRight);
top->setLayout(grid_layout);

QFrame *line1 = new QFrame(this);
line1->setObjectName("bootHSeparator");
line1->setFixedHeight(1);

QFrame *center = new QFrame(this);
center->setObjectName("boot");

QLabel *registered1 = new QLabel(this);
registered1->setWordWrap(true);
QLabel *registered2 = new QLabel(this);
registered2->setWordWrap(true);

enum PurchaseMode {
pmLicense,
pmSubscriptionPersonal,
pmSubscriptionCompany
};

QPushButton *purchase = NULL;
PurchaseMode purchaseMode = pmLicense;
#ifdef DEMO
registered1->setText(QString::fromUtf8(language[lsDemoVersion].c_str()));
registered1->setObjectName("unregistered");

purchase = new PushButton(QString::fromUtf8(language[lsPurchaseLicense].c_str()), this);
#else
VMProtectSerialNumberData data;
data.nState = SERIAL_STATE_FLAG_INVALID;
if (VMProtectGetSerialNumberData(&data, sizeof(data)) && data.nState == 0) {
registered1->setText(QString("%1: <b>%2 [%3], %4</b>").arg(QString::fromUtf8(language[lsRegisteredTo].c_str())).
arg(QString::fromUtf16((ushort *)data.wUserName)).
arg(QString::fromUtf16((ushort *)data.wEMail)).
arg((data.bUserData[0] & 1) ? "Personal License" : "Company License"));
if (data.dtMaxBuild.wYear) {
QDate dt = QDate(data.dtMaxBuild.wYear, data.dtMaxBuild.bMonth, data.dtMaxBuild.bDay);
registered2->setText(QString("%1: <b>%2</b>").arg(QString::fromUtf8(language[lsFreeUpdatesPeriod].c_str())).arg(dt.toString(Qt::SystemLocaleShortDate)));

if (QDate::currentDate() > dt) {
purchase = new PushButton(QString::fromUtf8(language[lsPurchaseSubscription].c_str()), this);
if (data.nUserDataLength)
purchaseMode = (data.bUserData[0] & 1) ? pmSubscriptionPersonal : pmSubscriptionCompany;
}
}
} else {
if (data.nState & SERIAL_STATE_FLAG_BLACKLISTED) {
registered1->setText(QString::fromLatin1(VMProtectDecryptStringA("Your key file is blocked!")));
// don't show "buy now" button
} else if (data.nState & SERIAL_STATE_FLAG_MAX_BUILD_EXPIRED) {
registered1->setText(QString::fromLatin1(VMProtectDecryptStringA("Your key file will not work with this version of VMProtect!\nYou should use older version or buy one more year of updates and technical support.")));
purchase = new PushButton(QString::fromUtf8(language[lsPurchaseSubscription].c_str()), this);
if (data.nUserDataLength)
purchaseMode = (data.bUserData[0] & 1) ? pmSubscriptionPersonal : pmSubscriptionCompany;
} else {
registered1->setText(QString::fromUtf8(language[lsUnregisteredVersion].c_str()));
purchase = new PushButton(QString::fromUtf8(language[lsPurchaseLicense].c_str()), this);
}
registered1->setObjectName("unregistered");
}
#endif

QBoxLayout *layout = new QVBoxLayout();
layout->setContentsMargins(10, 10, 10, 10);
layout->setSpacing(5);
layout->addWidget(registered1);
layout->addWidget(registered2);
layout->addStretch(1);
if (purchase) {
switch (purchaseMode) {
case pmSubscriptionPersonal:
connect(purchase, SIGNAL(clicked()), this, SLOT(purchaseSubscriptionPersonal()));
break;
case pmSubscriptionCompany:
connect(purchase, SIGNAL(clicked()), this, SLOT(purchaseSubscriptionCompany()));
break;
default:
connect(purchase, SIGNAL(clicked()), this, SLOT(purchaseLicense()));
break;
}
layout->addWidget(purchase, 0, Qt::AlignCenter);
}
center->setLayout(layout);

QFrame *line2 = new QFrame(this);
line2->setObjectName("bootHSeparator");
line2->setFixedHeight(1);

QLabel *copyright = new QLabel(QString::fromLatin1(Core::copyright()), this);
copyright->setObjectName("copyright");

QFrame *bottom = new QFrame(this);
bottom->setObjectName("bootTop");
layout = new QHBoxLayout();
layout->setContentsMargins(10, 10, 10, 10);
layout->setSpacing(0);
layout->addWidget(copyright, 0, Qt::AlignCenter);
bottom->setLayout(layout);

layout = new QVBoxLayout();
layout->setContentsMargins(0, 0, 0, 0);
layout->setSpacing(0);
layout->addWidget(top);
layout->addWidget(line1);
layout->addWidget(center, 1);
layout->addWidget(line2);
layout->addWidget(bottom);
setLayout(layout);

setMinimumSize(500, 300);
setMaximumSize(500, 300);
//auto size: layout->setSizeConstraint(QLayout::SetFixedSize);
}

void AboutDialog::purchaseLicense()
{
QDesktopServices::openUrl(QUrl(VMProtectDecryptStringA("http://www.vmpsoft.com/purchase/buy-online/")));
}

void AboutDialog::purchaseSubscriptionPersonal()
{
QDesktopServices::openUrl(QUrl("https://store.payproglobal.com/checkout?products[1][id]=35518"));
}

void AboutDialog::purchaseSubscriptionCompany()
{
QDesktopServices::openUrl(QUrl("https://store.payproglobal.com/checkout?products[1][id]=35531"));
}

void AboutDialog::help()
{
HelpBrowser::showTopic("contacts");
}
16 changes: 16 additions & 0 deletions VMProtect/about_dialog.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#ifndef ABOUT_DIALOG_H
#define ABOUT_DIALOG_H

class AboutDialog : public QDialog
{
Q_OBJECT
public:
AboutDialog(QWidget *parent = NULL);
private slots:
void purchaseLicense();
void purchaseSubscriptionPersonal();
void purchaseSubscriptionCompany();
void help();
};

#endif
Loading

0 comments on commit 28008a7

Please sign in to comment.