-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a75e14c
commit f11aa9d
Showing
494 changed files
with
60,905 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
/* | ||
* | ||
* Module Name: MAGclass.c | ||
* | ||
* Register Class of OS/2 Workplace Shell Access Control | ||
* | ||
* Return 0: ok | 1: Fehler | ||
*/ | ||
|
||
#define INCL_WIN | ||
#define INCL_PM | ||
#define INCL_DOS | ||
|
||
#include <os2.h> | ||
#include <string.h> | ||
#include <stdlib.h> | ||
#include <stdio.h> | ||
|
||
HAB hab; | ||
|
||
void Anleitung (char *string) | ||
{ | ||
printf ("Syntax: %s <profile_path>\n\n", string); | ||
return; | ||
} | ||
|
||
int main (int argc, char *argv[]) | ||
{ | ||
HINI hini; | ||
BOOL bRC; | ||
PSZ psz, pszBuffer; | ||
|
||
if (argc == 1) | ||
{ | ||
Anleitung (argv[0]); | ||
return 1; | ||
} | ||
|
||
hab = WinQueryAnchorBlock (HWND_DESKTOP); | ||
|
||
hini = PrfOpenProfile (hab, argv[1]); | ||
if (hini == NULLHANDLE) | ||
{ | ||
printf ("Error opening file %s\n", argv[1]); | ||
return 1; | ||
} | ||
|
||
pszBuffer = psz = malloc (65536); | ||
|
||
while (!feof (stdin)) | ||
{ | ||
fgets (psz, 65536-strlen (pszBuffer), stdin); | ||
psz += strlen (psz); | ||
} | ||
|
||
PrfWriteProfileString (hini, "_Env", "NewEnv", pszBuffer); | ||
PrfCloseProfile (hini); | ||
|
||
free (pszBuffer); | ||
|
||
return 0; | ||
} | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Created by IBM WorkFrame/2 MakeMake at 19:16:46 on 12/28/94 | ||
# | ||
# The actions included in this makefile are: | ||
# COMPILE::CLC C | ||
# LINK::LINK386: LINK | ||
|
||
.all: \ | ||
.\createenv.EXE | ||
|
||
.SUFFIXES: | ||
|
||
.SUFFIXES: .C | ||
|
||
.C.obj: | ||
@echo WF::COMPILE::CLC C | ||
icc.exe /Ss /Q /Wextparproretuse /Ti /G4 /C %s | ||
|
||
.\createenv.EXE: \ | ||
.\createenv.obj \ | ||
makefile | ||
@echo Link::Linker | ||
icc.exe @<< | ||
/B"$(LDB) /PM:VIO /NOL" | ||
/Fecreateenv.exe | ||
.\createenv.obj | ||
<< | ||
|
||
|
||
!include makefile.Dep | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.\createenv.obj: \ | ||
createenv.C \ | ||
makefile | ||
|
||
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Debug is YES |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Debug is YES |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
#include <os2.h> | ||
#include <stdio.h> | ||
#include <stdlib.h> | ||
#include <string.h> | ||
|
||
#include "samglob.h" | ||
#include "magpro2.h" | ||
#include "Profile.hpp" | ||
|
||
/* Key fr die Verschlsselung */ | ||
ULONG key[2] = {ULKEY1, ULKEY2}; | ||
|
||
int main (int argc, char *argv[]) | ||
{ | ||
CHAR sz[CCHMAXPASSWORD]; | ||
ULONG ulc; | ||
|
||
if (argc != 2) | ||
{ | ||
printf ("Syntax: %s <username>\n", argv[0]); | ||
return 0; | ||
} | ||
|
||
Profile profile; | ||
memset (sz, 0, CCHMAXPASSWORD); | ||
|
||
printf ("--- Encrypting password ---\n"); | ||
|
||
ulc = CCHMAXPASSWORD; | ||
profile.queryProfileData (argv[1], MAGPRO_PASSWORD_KEY, sz, &ulc); | ||
if (sz[ulc-1] != '\0') | ||
sz[ulc] = '\0'; | ||
|
||
printf ("actual password: %s\n", sz); | ||
|
||
profile.writeProfileCryptedData (argv[1], MAGPRO_PASSWORD_KEY, sz, CCHMAXPASSWORD); | ||
|
||
printf ("--- Encrypting service data string ---\n"); | ||
if (profile.queryProfileSize (argv[1], NULL, &ulc) == FALSE) | ||
return 0; | ||
|
||
PCHAR psz = (PCHAR)malloc (ulc); | ||
PCHAR pszService = psz; | ||
profile.queryProfileData (argv[1], NULL, pszService, &ulc); | ||
|
||
for (int i = 0; i < MAXSTRING; i++) | ||
{ | ||
if (strncmp (pszService, MAGPRO_SERVICE_KEY, 2) == 0) | ||
{ | ||
// Service string gefunden; verschlsseln | ||
profile.queryProfileSize (argv[1], pszService, &ulc); | ||
ulc =(((ulc + 7)>>3)<<3); | ||
if (ulc) | ||
{ | ||
printf ("Encrypting %s\n", pszService); | ||
ULONG ulc1; | ||
PCHAR pszServiceString = (PCHAR)malloc (ulc); | ||
memset (pszServiceString, 0, ulc); | ||
|
||
profile.queryProfileData (argv[1], pszService, pszServiceString, &ulc1); | ||
profile.writeProfileCryptedData (argv[1], pszService, pszServiceString, ulc); | ||
|
||
free (pszServiceString); | ||
} | ||
} | ||
pszService += strlen (pszService) + 1; | ||
} | ||
|
||
return 0; | ||
} | ||
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# makefile | ||
# Erstellt von IBM WorkFrame/2 MakeMake um 13:06:46 am 13 Mai 1999 | ||
# | ||
# Diese Make-Datei enth„lt folgende Aktionen: | ||
# Compile::C++ Compiler | ||
# Link::Linker | ||
|
||
.SUFFIXES: | ||
|
||
.SUFFIXES: \ | ||
.cpp .obj | ||
|
||
.cpp.obj: | ||
@echo " Compile::C++ Compiler " | ||
icc.exe $(CDB) /I..\include /I..\ToolLib /Q /Ti /G5 /C %s | ||
|
||
{d:\work\c\wpsac\cryptpasswd}.cpp.obj: | ||
@echo " Compile::C++ Compiler " | ||
icc.exe $(CDB) /I..\include /I..\ToolLib /Q /Ti /G5 /C %s | ||
|
||
all: \ | ||
.\encrypt.exe | ||
|
||
.\encrypt.exe: \ | ||
.\main.obj \ | ||
..\ToolLib\SamUtil.lib \ | ||
{$(LIB)}cutil.lib | ||
@echo " Link::Linker " | ||
icc.exe @<< | ||
/B" /de $(LDB)" | ||
/Feencrypt.exe | ||
..\ToolLib\SamUtil.lib | ||
cutil.lib | ||
.\main.obj | ||
<< | ||
|
||
.\main.obj: \ | ||
d:\work\c\wpsac\cryptpasswd\main.cpp \ | ||
{d:\work\c\wpsac\cryptpasswd;..\include;..\ToolLib;$(INCLUDE);}samglob.h \ | ||
{d:\work\c\wpsac\cryptpasswd;..\include;..\ToolLib;$(INCLUDE);}magpro2.h \ | ||
{d:\work\c\wpsac\cryptpasswd;..\include;..\ToolLib;$(INCLUDE);}Profile.hpp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
:TARGET.SUFFIXES | ||
:TARGET.SUFFIXES | ||
:DEPENDENCY..cpp .obj | ||
:TARGET.all | ||
:DEPENDENCY. | ||
.\encrypt.exe | ||
:RULE..cpp.obj | ||
:ACTION.Compile::C++ Compiler | ||
:COMMAND. | ||
icc.exe $(CDB) /I..\include /I..\ToolLib /Q /Ti /G5 /C %s | ||
:RULE.{d:\work\c\wpsac\cryptpasswd}.cpp.obj | ||
:ACTION.Compile::C++ Compiler | ||
:COMMAND. | ||
icc.exe $(CDB) /I..\include /I..\ToolLib /Q /Ti /G5 /C %s | ||
:TARGET..\encrypt.exe | ||
:DEPENDENCY. | ||
.\main.obj | ||
..\ToolLib\SamUtil.lib | ||
{$(LIB)}cutil.lib | ||
:ACTION.Link::Linker | ||
:COMMAND. | ||
icc.exe @<< | ||
/B" /de" | ||
/Feencrypt.exe | ||
..\ToolLib\SamUtil.lib | ||
cutil.lib | ||
.\main.obj | ||
<< | ||
:TARGET..\main.obj | ||
:DEPENDENCY. | ||
d:\work\c\wpsac\cryptpasswd\main.cpp | ||
{d:\work\c\wpsac\cryptpasswd;..\include;..\ToolLib;$(INCLUDE);}samglob.h | ||
{d:\work\c\wpsac\cryptpasswd;..\include;..\ToolLib;$(INCLUDE);}magpro2.h | ||
{d:\work\c\wpsac\cryptpasswd;..\include;..\ToolLib;$(INCLUDE);}Profile.hpp |
Binary file not shown.
Binary file not shown.
Oops, something went wrong.