Jump to content

CnC d-AWOS released!


SyS

Recommended Posts

Evening all, I've decided to make public the first ever copy of AWOS.

 

This version was coded in delphi 6, But compile's file with FREEPASCAL.(Please not this is not the server we use, The server we use is 100% Recoded, in C/C++)

 

Not gonna post much info on this, But There is some feature's still not added, To the wol source's(UserSocket.pas)

 

I'f you want help on support and upgrading, Contact me by email or messenger @ kyle.major[AT]CnC-Comm.com

 

Thank's

 

-Kyle-

 

 

d-AWOS.rar[/attachment:19pi4pe7]

Link to comment
Share on other sites

:) Hope everybody enjoy's the release. Noticed it would be good for RA player's instead of using kali and such vpn "SHITE" they can just run a complete multiplayer server.

 

Save's installing aload of bs stuff, And setting up vpn's and stuff.

 

-Kyle-

Link to comment
Share on other sites

  • 2 weeks later...
Guest whydoes

getting error then trying compile:

Free Pascal Compiler version 2.2.0 [2007/09/09] for i386

Copyright © 1993-2007 by Florian Klaempfl

Target OS: Win32 for i386

Compiling TimeStamper.dpr

TimeStamper.dpr(53,12) Warning: Function result does not seem to be set

TimeStamper.dpr(67,10) Warning: Function result does not seem to be set

TimeStamper.dpr(69,3) Note: Local variable "UnixStartDate" not used

Linking TimeStamper.exe

88 lines compiled, 0.2 sec, 53792 bytes code, 10232 bytes data

2 warning(s) issued

1 note(s) issued

An unhandled exception occurred at $00401588 :

EInOutError : File not assigned

$00401588

 

 

Free Pascal Compiler version 2.2.0 [2007/09/09] for i386

Copyright © 1993-2007 by Florian Klaempfl

Target OS: Win32 for i386

Compiling AWOS.dpr

Compiling svn.pas

Compiling common.pas

common.pas(12,20) Fatal: Can't find unit WSocket used by Common

Fatal: Compilation aborted

Link to comment
Share on other sites

This is the APIREGISTER server for the dwol

Will allow user's to create account's if you dont want them to instantly connect and account is saved.

 

[code:jrw3qiwf]

 

unit apiregister;

 

interface

 

uses

SysUtils, ScktComp, Classes, WinSock, StrFuncs, tokfuncs, DateUtils, dialogs, MD5, _mysql;

 

type

TAPIRegRequest = (apireg_ageverify, apireg_getnick);

TUserArrayItem = record

SockID: integer; Sku: string; NewPass: string;

Queue: string; Ver: string; NewPass2: string;

Email: string; Serial: string; ParentEmail: string;

Bmonth: string; SysID: string; newsletter: string;

Bday: string; SysCheck: string; shareinfo: string;

Byear: string; OldNick: string;

LANGCODE: string; OldPass: string;

request: TAPIRegRequest; NewNick: string;

end;

TRegServ = class(TCustomServerSocket)

private

FServerHost: string;

ConArray: array of TUserArrayItem;

procedure regservClientConnect(Sender: TObject; ASocket: TCustomWinSocket);

procedure regservClientDisconnect(Sender: TObject; ASocket: TCustomWinSocket);

procedure regservClientRead(Sender: TObject; ASocket: TCustomWinSocket);

function StrToAPIRegRequest(const APIRegRequest: string): TAPIRegRequest;

function CalcAge(const day, month, year: string): integer;

procedure FreeUserData(const ConnectionIdx: integer);

public

constructor Create(AOwner: TComponent); override;

property Socket: TServerWinSocket read FServerSocket;

property Active;

property ServerHost: string read FServerHost write FServerHost;

property OnClientConnect;

property OnClientDisconnect;

property OnClientRead;

end;

 

var

_mysql: TMySQL;

 

implementation

 

uses

main;

 

constructor TRegServ.Create(AOwner: TComponent);

begin

inherited Create(AOwner);

FServerSocket := TServerWinSocket.Create(INVALID_SOCKET);

InitSocket(FServerSocket);

FServerSocket.ThreadCacheSize := 10;

SetPort(5400);

OnClientConnect := regservClientConnect;

OnClientDisconnect := regservClientDisconnect;

OnClientRead := regservClientRead;

_mysql := TMySQL.Create(self);

end;

 

procedure TRegServ.regservClientConnect(Sender: TObject; ASocket: TCustomWinSocket);

begin

SetLength(ConArray, Length(ConArray)+1);

ConArray[high(ConArray)].SockID := ASocket.SocketHandle;

end;

 

procedure TRegServ.regservClientDisconnect(Sender: TObject; ASocket: TCustomWinSocket);

var

i: integer;

begin

i := 0;

while ConArray.SockID <> ASocket.SocketHandle do

inc(i);

FreeUserData(i);

end;

 

procedure TRegServ.regservClientRead(Sender: TObject; ASocket: TCustomWinSocket);

var

i: integer;

s: string;

begin

i := 0; s := '';

// Die Connection-Kette durchlaufen bis der aktuelle SocketHandle mit dem in der Kette übereinstimmt.

while ConArray.SockID <> ASocket.SocketHandle do

inc(i);

with ASocket do

begin

ConArray.Queue := ConArray.Queue + ReceiveText;

while pos(#13, ConArray.Queue) <> 0 do

delete(ConArray.Queue, pos(#13, ConArray.Queue), 1);

while pos(#10, ConArray.Queue) <> 0 do

begin

s := copy(ConArray.Queue, 1, pos(#10, ConArray.Queue)-1);

delete(ConArray.Queue, 1, pos(#10, ConArray.Queue));

// Die einzelnen Zeilen auswerten.

if GetTok(s, 1, #61) = 'Email' then

ConArray.Email := GetTok(s, 2, #61);

if GetTok(s, 1, #61) = 'Bmonth' then

ConArray.Bmonth := GetTok(s, 2, #61);

if GetTok(s, 1, #61) = 'Bday' then

ConArray.Bday := GetTok(s, 2, #61);

if GetTok(s, 1, #61) = 'Byear' then

ConArray.Byear := GetTok(s, 2, #61);

if GetTok(s, 1, #61) = 'LANGCODE' then

ConArray.LANGCODE := GetTok(s, 2, #61);

if pos('request', s) <> 0 then

ConArray.request := StrToAPIRegRequest(GetTok(s, 2, #61));

{ 2ter Dialog }

if GetTok(s, 1, #61) = 'Sku' then

ConArray.Sku := GetTok(s, 2, #61);

if GetTok(s, 1, #61) = 'Ver' then

ConArray.Ver := GetTok(s, 2, #61);

if GetTok(s, 1, #61) = 'Serial' then

ConArray.Serial := GetTok(s, 2, #61);

if GetTok(s, 1, #61) = 'SysID' then

ConArray.SysID := GetTok(s, 2, #61);

if GetTok(s, 1, #61) = 'SysCheck' then

ConArray.SysCheck := GetTok(s, 2, #61);

if GetTok(s, 1, #61) = 'OldNick' then

ConArray.OldNick := GetTok(s, 2, #61);

if GetTok(s, 1, #61) = 'OldPass' then

ConArray.OldPass := GetTok(s, 2, #61);

if GetTok(s, 1, #61) = 'NewNick' then

ConArray.NewNick := GetTok(s, 2, #61);

if GetTok(s, 1, #61) = 'NewPass' then

ConArray.NewPass := GetTok(s, 2, #61);

if GetTok(s, 1, #61) = 'NewPass2' then

ConArray.NewPass2 := GetTok(s, 2, #61);

if GetTok(s, 1, #61) = 'ParentEmail' then

ConArray.ParentEmail := GetTok(s, 2, #61);

if GetTok(s, 1, #61) = 'newsletter' then

ConArray.newsletter := GetTok(s, 2, #61);

if GetTok(s, 1, #61) = 'shareinfo' then

ConArray.shareinfo := GetTok(s, 2, #61);

if pos('END', s) <> 0 then

begin

// Daten auswerten

case ConArray.request of

apireg_ageverify:

begin

if CalcAge(ConArray.Bday, ConArray.Bmonth, ConArray.Byear) <> 0 then

ASocket.SendText(

'HRESULT=0' + #10 +

'Message=((Message))' + #10 +

'NewNick=((NewNick))' + #10 +

'NewPass=((NewPass))' + #10 +

'Age='+ IntToStr(CalcAge(ConArray.Bday, ConArray.Bmonth, ConArray.Byear)) + #10 +

'Consent=0' + #10 +

'END' + #13#10

);

ASocket.Close;

end;

apireg_getnick:

begin

if not _mysql.User_Exists(ConArray.NewNick) then

begin

if ConArray.NewPass = ConArray.NewPass2 then

begin

try

_mysql.User_Add(ConArray.NewNick, ConArray.NewPass, ConArray.Email, ConArray.newsletter);

ASocket.SendText(

'HRESULT=0' + #10 +

'Message=Your nick "' +

ConArray.NewNick +

'" has been successfully registered. Password is: "' +

ConArray.NewPass + '".'+ #10 +

'NewNick=' + ConArray.NewNick + #10 +

'NewPass=' + ConArray.NewPass + #10 +

'Age=((Age))' + #10 +

'Consent=((Consent))' + #10 +

'END' + #13#10

);

ASocket.Close;

except

end;

end;

end

else

begin

ASocket.SendText(

'HRESULT=-2147221248' + #10 +

'Message=The nick "' +

ConArray.NewNick +

'" is already registered. Please try another one.' + #10 +

'NewNick=' + ConArray.NewNick + #10 +

'NewPass=' + ConArray.NewPass + #10 +

'Age=((Age))' + #10 +

'Consent=((Consent))' + #10 +

'END' + #13#10

);

ASocket.Close;

end;

end;

end;

//

exit;

end;

end;

end;

end;

 

{$WARNINGS OFF}

function TRegServ.StrToAPIRegRequest(const APIRegRequest: string): TAPIRegRequest;

begin

if APIRegRequest = 'apireg_ageverify' then

result := apireg_ageverify;

if APIRegRequest = 'apireg_getnick' then

result := apireg_getnick;

end;

{$WARNINGS ON}

 

function TRegServ.CalcAge(const day, month, year: string): integer;

var

MonthNr: string;

begin

result := 0;

if month = 'January' then MonthNr := '01'

else if month = 'February' then MonthNr := '02'

else if month = 'March' then MonthNr := '03'

else if month = 'April' then MonthNr := '04'

else if month = 'May' then MonthNr := '05'

else if month = 'June' then MonthNr := '06'

else if month = 'July' then MonthNr := '07'

else if month = 'August' then MonthNr := '08'

else if month = 'September' then MonthNr := '09'

else if month = 'October' then MonthNr := '10'

else if month = 'November' then MonthNr := '11'

else if month = 'December' then MonthNr := '12'

else exit;

try

if IsValidDate(StrToInt(year), StrToInt(MonthNr), StrToInt(day)) then

result := DaysBetween(StrToDate(Format('%s.%s.%s', [day, MonthNr, year])), Now) div 365;

if result > 100 then

result := 0;

except

end;

end;

 

procedure TRegServ.FreeUserData(const ConnectionIdx: integer);

begin

ConArray[ConnectionIdx] := ConArray[high(ConArray)];

SetLength(ConArray, Length(ConArray)-1);

end;

 

end.

[/code:jrw3qiwf]

 

 

And here is the APGAR it's what westwood use's for password encryption

 

[code:jrw3qiwf]unit apgar;

 

interface

 

uses

SysUtils;

 

function _apgar(const password: string): string;

 

implementation

 

function _apgar(const password: string): string;

const

ENC = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789./';

var

pPassword: PChar;

w: array[0..7] of char;

i, a: integer;

begin

pPassword := StrNew(PChar(password));

for i := 0 to 7 do

begin

a := integer(pPassword);

if odd(a) then

w := ENC[((a shl (a and 1) and Ord(pPassword[8-i])) and $3F)+1]

else

W := ENC[((a xor Integer(pPassword[8-i])) and $3F)+1];

end;

StrDispose(pPassword);

result := w;

end;

 

end.

[/code:jrw3qiwf]

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...