WEBVTT

00:00:01.140 --> 00:00:04.840
We're going to start by looking at some tips on installation

00:00:04.870 --> 00:00:06.860
to make sure we can get LaZagne running.

00:00:08.440 --> 00:00:11.810
The GitHub repository has an installation guide for this,

00:00:11.900 --> 00:00:15.660
which involves installing Python and the required dependencies.

00:00:15.970 --> 00:00:16.560
That's here.

00:00:17.740 --> 00:00:21.550
Next, we'll look at creating the Windows executable file.

00:00:22.740 --> 00:00:26.460
You could install Python on a Windows machine that you're targeting,

00:00:26.690 --> 00:00:29.850
but an executable file makes things much simpler.

00:00:30.940 --> 00:00:36.410
You can get a copy of the executable from the GitHub repository here; however,

00:00:36.520 --> 00:00:41.860
the releases aren't up to date, and the current one I see is over a year old,

00:00:42.240 --> 00:00:45.150
which means it's missing a lot of the recent code changes.

00:00:46.240 --> 00:00:48.760
The solution to this is to build it ourselves.

00:00:50.040 --> 00:00:54.660
It is possible to take the Python code and create an executable file from it.

00:00:55.440 --> 00:00:57.560
There is a guide for that on GitHub too,

00:00:57.940 --> 00:01:01.560
but it didn't quite work for me, so I've got some additional guidance.

00:01:02.940 --> 00:01:04.180
To start the installation,

00:01:04.180 --> 00:01:07.950
we need to get the latest version of Python from python.org.

00:01:08.940 --> 00:01:13.670
If you're using Windows, make sure you don't get it from the Microsoft Store,

00:01:13.680 --> 00:01:16.050
as it's currently got some permissions problems.

00:01:17.040 --> 00:01:19.560
Now, we need to clone the repository from GitHub.

00:01:20.440 --> 00:01:24.360
Git can be used for any of the operating systems we might use for this,

00:01:24.590 --> 00:01:26.860
and the syntax is typically very similar.

00:01:27.840 --> 00:01:31.860
To clone, we use git clone and the URL of the repository.

00:01:34.240 --> 00:01:36.550
Now we move into the directory and take a look.

00:01:38.940 --> 00:01:44.100
Here we can see a file named requirements.txt which contains a list

00:01:44.100 --> 00:01:46.560
of the dependencies required for LaZagne to work.

00:01:47.540 --> 00:01:50.280
We're going to use pip to install those requirements,

00:01:50.450 --> 00:01:52.360
which works by giving pip the file.

00:01:53.240 --> 00:01:57.150
The use of pip and Python are a little outside the scope of this course,

00:01:57.160 --> 00:01:59.150
but that should give you enough to get running.

00:02:00.140 --> 00:02:03.870
Now, we want to go to the Windows directory in the repository.

00:02:03.870 --> 00:02:07.750
A quick call to python and we can see it's working,

00:02:08.240 --> 00:02:11.960
showing that we're using version 2.4.4 of LaZagne.

00:02:12.840 --> 00:02:16.560
At this point, we could collect passwords from this Windows machine.

00:02:17.140 --> 00:02:17.920
For Windows,

00:02:17.920 --> 00:02:21.080
installing Python is additional work and complexity

00:02:21.080 --> 00:02:22.660
compared to using an executable.

00:02:23.640 --> 00:02:26.760
It is, however, less likely to be picked up by antivirus.

00:02:27.640 --> 00:02:31.630
To create an executable, we need to start with a couple more pip installs.

00:02:31.850 --> 00:02:33.550
The first is pyinstaller.

00:02:35.540 --> 00:02:39.050
We've already got a text file called lazagne.spec.

00:02:40.140 --> 00:02:43.050
I'll make my version of that available in the course files.

00:02:43.940 --> 00:02:48.760
This differs from the GitHub repository, which includes some Windows DLLs here.

00:02:49.940 --> 00:02:51.760
They cause compile failures for me.

00:02:52.540 --> 00:02:53.260
I remove them.

00:02:54.340 --> 00:02:57.960
Finally, still in the Windows directory, we create the executable.

00:02:59.840 --> 00:03:04.460
Then if we go to the dist directory, we'll see our new executable file.

00:03:05.540 --> 00:03:07.720
We can then run it to see that it works.

00:03:08.340 --> 00:03:10.350
We'll save running it properly for the next demo.

00:03:11.340 --> 00:03:15.450
We can now use this on Windows machines without having to install Python.

00:03:16.340 --> 00:03:19.720
This file will get picked up by antivirus unless you have

00:03:19.720 --> 00:03:22.160
disabled it or used evasion techniques.
