mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-16 22:02:58 -06:00
35 lines
730 B
C++
35 lines
730 B
C++
#include <Protect/ProtectServer.h>
|
|
|
|
using namespace Upp;
|
|
|
|
CONSOLE_APP_MAIN
|
|
{
|
|
ProtectServer server;
|
|
|
|
// setup database
|
|
server
|
|
.SetAppKey(ScanHexString("AABBCCDDEEFF00112233445566778899"))
|
|
.GetDB()
|
|
.SetHost("localhost")
|
|
.SetDBName("protect_demo")
|
|
.SetUserName("protect_user")
|
|
.SetPassword("protect")
|
|
;
|
|
server
|
|
.GetSmtp()
|
|
.Host("localhost")
|
|
.Port(25)
|
|
;
|
|
server
|
|
.SetWelcomeSubject("ProtectDemo user activation")
|
|
.SetWelcomeBody("<HTML><BODY>Welcome, %USER%,<BR><BR> Your activation code is %ACTIVATIONKEY%<BR><BR><BR></BODY></HTML>")
|
|
;
|
|
|
|
// setup key
|
|
server.SetCommunicationKey(ScanHexString("aabbccddeeff00112233445566778899"));
|
|
|
|
// setup cypher
|
|
server.SetCypher(new Snow2);
|
|
|
|
server.Run();
|
|
}
|