Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
scadl committed Mar 24, 2019
0 parents commit eb00f72
Show file tree
Hide file tree
Showing 13 changed files with 192 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Auto detect text files and perform LF normalization
* text=auto
13 changes: 13 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
*.iml
.gradle
/local.properties
/.idea/caches/build_file_checksums.ser
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
.DS_Store
/build
/captures
.externalNativeBuild

release
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2019 Alexandr KD

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
13 changes: 13 additions & 0 deletions PassGen.mpproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<Project>
<MIDlet Name="PassGen" Vendor="MIDletPascal" Version="1.0.0" Icon="/icon.png"/>
<Sources>
<source filename="PassGen.mpsrc"/>
</Sources>
<Resources>
<resource filename="icon.png" configurations=":all:"/>
<resource filename="warn.png" configurations=":all:"/>
</Resources>
<BuildConfigurations>
<configuration name="Default" type="normal" version="1" math="1"/>
<ActiveConfiguration index="0"/> </BuildConfigurations>
</Project>
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# PassGen-J2ME
131 changes: 131 additions & 0 deletions Unit1.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
unit Unit1;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, sEdit, sSpinEdit, Buttons, ExtCtrls;

type
TForm1 = class(TForm)
GroupBox1: TGroupBox;
CheckBox1: TCheckBox;
CheckBox2: TCheckBox;
CheckBox3: TCheckBox;
CheckBox4: TCheckBox;
BitBtn1: TBitBtn;
Memo1: TMemo;
Label1: TLabel;
Label2: TLabel;
sSpinEdit1: TsSpinEdit;
sSpinEdit2: TsSpinEdit;
Button1: TButton;
procedure BitBtn1Click(Sender: TObject);

procedure sSpinEdit2Change(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.BitBtn1Click(Sender: TObject);
var pass:string; e,p,r:byte; sel:array [0..255] of byte;
begin

p:=0;

if (CheckBox1.Checked=false) and (CheckBox2.Checked=false) and (CheckBox3.Checked=false) and (CheckBox4.Checked=false)
then MessageBox(handle,'�� �� ������� �� ������ ���� �������� ��� ���������.'+#13+'�������� ���� �� ���� ��� � ��������� ������.','��������!',MB_ICONWARNING)
else
begin

repeat
e:=0;
pass:='';
r:=0;
randomize;
repeat
if CheckBox1.Checked then
begin
// big
repeat
r:=random(91);
until r>64;
sel[0]:=r;
end else sel[0]:=0;

if CheckBox2.Checked then
begin
// small
repeat
r:=random(123);
until r>96;
sel[1]:=r;
end else sel[1]:=0;

if CheckBox3.Checked then
begin
// dig
repeat
r:=random(58);
until r>47;
sel[2]:=r;
end else sel[2]:=0;

if CheckBox4.Checked then
begin
// symb
repeat
r:=random(47);
until r>32;
sel[3]:=r;
end else sel[3]:=0;

{memo1.Lines.Add(inttostr(sel[0])+', '+
inttostr(sel[1])+', '+
inttostr(sel[2])+', '+
inttostr(sel[3])+', '+inttostr(r));}
r:=0;

while r=0 do
r:=sel[random(4)];


pass:=pass+chr(r);
e:=e+1;
until e=sspinedit1.value;
memo1.Lines.Add(pass);
pass:='';
p:=p+1;
until p=sSpinEdit2.Value;
end;
end;



procedure TForm1.Button1Click(Sender: TObject);
begin
memo1.Lines.Clear;
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
BitBtn1.Caption:='������������� '+sSpinEdit2.Text+' ����';
end;

procedure TForm1.sSpinEdit2Change(Sender: TObject);
begin
BitBtn1.Caption:='������������� '+sSpinEdit2.Text+' ����';
end;

end.
9 changes: 9 additions & 0 deletions bin/PassGen.jad
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
MIDlet-1: PassGen, /icon.png, FW
MIDlet-Jar-Size: 10069
MIDlet-Jar-URL: PassGen.jar
MIDlet-Name: PassGen
MIDlet-Vendor: MIDletPascal
MIDlet-Icon: /icon.png
MIDlet-Version: 1.0.0
MicroEdition-Configuration: CLDC-1.0
MicroEdition-Profile: MIDP-1.0
Binary file added bin/PassGen.jar
Binary file not shown.
Binary file added classes/M.class
Binary file not shown.
Binary file added res/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/warn.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/PassGen.mpsrc
Binary file not shown.
2 changes: 2 additions & 0 deletions src/build
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
C:\[Works]\[Programming for J2ME MobilePhones]\PassGen\src\passgen.mpsrc
C:\[Works]\[Programming for J2ME MobilePhones]\PassGen\classes
Expand Down

0 comments on commit eb00f72

Please sign in to comment.