Hi, we are currently inside of Baghdad, level 24, and in this lecture, we're going to try and go
to Baghdad, level 25.
So here you go.
It says that that Damon is listening in part to 30000 and to and we'll give you the password for the
Bendat 25 if given the password for your Bendat 24 and a secret numeric four digit PIN code.
So we're going to go into the Dysport and we're going to supply the password and a four digit pin code.
So this is good.
There is no way to retrieve the PIN code except by going through all of the combinations.
So let's try that and see.
I'm going to copy disbanded the level to 24 and let me try to copy it one more time.
I believe we couldn't get that one.
So I'm just going to copy this one and come over here and see if we can pass it over there.
Yep, we can paste this.
Of course, it doesn't make sense to enter because it won't do anything.
We have to open a port and at least communicate with the 2002 port and just see how it works.
I believe we're going to have to do some brute forcing as we are instructed over here, because we we
don't know anything about that four digit PIN code.
So it's something like one, two, three, four, five, five, five five.
But we don't know it yet.
So we're going to have to try every combination.
So let me see how this works.
First, I'm going to create a Netcare command over here.
So here you go.
It works.
It asks for the password and it says that I'm the PIN code checker, so I'm going to post this, not
this, but this.
OK, I'm going to copy this and I'm just going to delete this and I'm going to pass this.
Yeah, I couldn't do that.
Let me try it one more time, Pastis, and let me just don't give any pin code and see what happens
or just give one, two, three, four, five, six, something like that.
And here you go.
It says that enter the correct PIN code.
So let me try another one like this.
And here you go.
Yeah, it works, but we don't know the PIN code, so that's the problem over here.
So as you can see, it might take some time because there are a lot of combinations, like ten thousand
combinations.
And we cannot do that.
Right.
We have to write a script in order to make sure we Tomi's that process and you can't find it like that.
But it will take some like hours or something like that.
So let's see if there's Python over here.
Yep, there's a python and we can use Python in order to create a for loop.
And also we can use actually the best scripting one more time.
We already know that we can write my scripts over here and we can execute them.
And you have seen how to do a for loop in the best script within the previous lecture.
So let me show you what I mean.
I'm going to go into the TMP folder, OK?
And I'm coming over here because we can write something over there, right?
We can create a new folder.
We can create a new file and execute it.
So I'm going to create another folder like we used to do.
I'm going to create a table or I'm just going to call it twenty four because we are inside of twenty
four.
So I'm inside of until twenty four, OK.
And I'm going to create a new best script file.
And let me try that Nanoha one more time and see if this works.
My script that h no it doesn't work.
There is something wrong with Nanoha I believe within the system so I'm going to try with them.
OK vem.
And let's call this something else, not my script but I say you can't call it anything you want.
And Wim is another editor.
It's exactly like nano but it's harder to use so I don't use it very often in order to just keep it
simple.
But as you can see, I believe this works.
So if you hit I on your keyboard, you go to the insert mode inside of them.
So this is a text as well as you can see, and we can write whatever we want or they're right.
So it's the same thing, but it's actually harder to use.
So hit I and try to type the Shabangu like hash and exclamation point and you can write bin bash over
here.
Like this, so here you go after the bin bash, let me try to copy and paste and see if copying and
pasting works.
So let me come over here and paste this here.
Go.
I believe this is working, so maybe we can make this equal to Bendit 24 password, assign it to a variable,
something like this.
OK, so far so good.
We managed to create a variable over there.
Of course we're going to write the rest.
But for right now, let me test to see if we can save this file in order to do that, hit escape on
your keyboard.
It will take you out of the insert mode.
Now you can write comments over here at the left bottom side of your screen.
Now I'm going to write column W.
Q So it means that to write it and then quit it.
OK, column WQ and if you hit enter after you write this it will write it and then quit it.
So let me cut that out and see if this works.
Yeah, here you go.
It actually works.
So there was something wrong with Nano.
I don't know what it is, but we can use them, obviously.
So I'm going to go for one more time and complete complete my script over there.
And again, you can use Python if you want, but since we have started with my script, I'm going to
continue with the script.
So I'm continuing with the by scripting.
And if you run this one more time, you can continue editing your script.
So what I'm going to do, I'm going to create a for loop.
So remember, for loops are loops that you actually run over and over again until the condition is met
and the condition or a range is met.
And the range here will be from one one one one two nine nine nine nine in order to test all the available
digit PIN codes.
So it's written like this.
You have to follow me exactly what I'm writing over here or else it wouldn't work.
So I'm going to call this I.
And inside of the curly braces, I'm going to specify a range.
So our range will be from one one one one two nine nine nine nine.
And I don't know if it's supposed to be from zero zero zero zero, but I'm just going to try it like
this.
So in order to specify a range in my scripting, you can do it like this one one one one that dot nine
nine nine nine.
And then you can say do so.
Don't forget the semicolon over there.
And after do you can specify what's going to happen inside of this loop every time this loop gets called
Regan.
All right, Echo, OK, and just give the Bendit 24 password over here.
So this is our variable holding that password value for us.
And with a space, you can't write something like I over there.
And I sense for the individual pin that we have at that point.
So I will be one one, one one first and then one one one two one one one three one one one four up
until nine nine nine nine.
So it's going to repeat that process again and again until it's finished or until we get the results
back from the server and it get executed and it got canceled.
OK, and we can just write down over here.
And I believe that's our for loop.
Right.
And of course, we are going to have to create a connection between the part that we're trying to send
this to.
So what I'm going to do, I'm going to pipe this pipe this for a loop like that with a piping sign after
done, I'm going to take every input from here and I'm going to pipe this to the next cat so that it
can forward this information to the localhost 30000 and to like this.
OK, so do Cullin w q and hit enter so it will write and quit.
And if you Katmai my script that s h you will see the final result over here.
So far so good.
Now all we have to do is just make it executable like segment seven seven seven.
My script that as H now if we run this my script that I say it will do what we have instructed to do.
So it's going to try every possible pin code on that part.
So I'm just going to write this dash slash my script that S.H. in order to execute this.
And here you go.
It's trying and trying and trying and the connection is closed when we find the correct one.
And here we have the password for the banded twenty five.
Yep.
Let's copy this.
See, this is fun.
I told you so.
I'm going to come over here and I know the password that you see.
At least none of works in our own colonics so that we don't have to deal with them.
So I'm going to come over here to level twenty five and save this and just come out of this.
So right now we know how to go into the Bendit twenty five.
So I'm going to just do it and see if that password is right or not.
And if this is right, we're going to stop here.
Let's just test this.
I'm going to paste a selection and hit enter and here you go.
We are inside.
So I'm going to stop here and continue within the next like.
Your.