 Hey everyone welcome back to another python programming video. We're still looking at python challenge. We're now on the 8th challenge We just got finished off with the last one number seven oxygen. We moved on to integrity So right in front of us staring us in the face is this be Okay, there is a scroll bar, so there is more to this page and the only hint that we get here is down at the bottom Where is the missing link? Alright Let's do some investigation as always. I'm gonna right-click this and View the page source and here we go. Okay title is working hard Stame CSS same CSS page. We've always seen Is an image integrity dot jpeg. Oh, it has a map. Okay map So that brings us to good HTML Can we go there just go Where's the missing link and on and On the NPW UNPW This comment down here kind of wonder what all this is I'm kind of curious what the map is though. I'm gonna go to that one first Oh, I want to go to return good.html. Let's go there Go up in my URL bar return good.html Hey username and password of being requested by the page the site says inflate username and password Guest no password admin Administrator Okay, that didn't help. Oh Not allowed to go there. That's the same thing that the map will take us to right so alright I notice if I move my cursor around the image If I get on the B if I click the B Okay, yeah, it takes me to that same authentication thing UNPW Well, okay, if we go look at the page source one more time this This UN and this PW must represent username and password that makes sense. So I'll just I don't know why these would be username and password, but I mean Let's try it because it this looks like random raw data. No, that didn't work either username and password being requested by Python challenge the site says inflate What? What is inflate? I don't know what that means Well We're using Python. So let's do some research. I'm to create a new tab. I'm a Google Python Inflate I'm feeling lucky. So let's go to the first result Python inflate and deflate Know that Python includes Zlib and the C libraries. Okay, it wasn't And if I hit the back button, okay, yeah Zlib is a return result in In In Google I'm gonna look at the documentation here compression compatible with G zip What? Okay, so do we have to like that like this at this rod data here? Do we have to inflate it? It's got to be what the hint is I'm gonna look to this inflate on this page. There is no inflate function No speaking of inflate if I go back to this stack overflow page He's using this decompress function Let's try I'm just gonna fire up idle and play with it in here because We're just playing import Zlib Let's grab that Let's grab this username here. I'm just gonna copy and paste that Zlib dot decompress that's the function to use Zlib dot decompress and he's passing in a string of some kind so decompress paste in the string Error negative three will decompressing data incorrect header check. Okay. I don't know what that means either Oh, he gets the same error I received the following error error negative three incorrect check G zip doesn't work either these guys tell them. Oh wait, wait, wait Says he solved it All right solve To handle raw deflate and inflate data Without the header and checksum. Okay, if we're getting an incorrect header check, I guess we don't need the header Strip the first two bytes Yeah, the following things need to happen Strip the first two bytes and the last four bytes to check some decompress, okay strip the first two Last four these are These are escaped and there's another thing that needs to happen. Oh There's a second argument. Oh, that's deflate Strip the first two bytes header and last four bytes checks. Okay, so we don't have to do that if we're inflating on inflate Which is I think what we're doing since I mean, that's what it said on the page site says inflate There's a second argument for window size if the value is negative it suppresses headers, okay, so Arguments negative negative one No Well preparing to decompress data and consistent streams eight. Let's just do a little bit more reading What did this guy say see sharp deflate streams Java okay, all right, I think I'm getting into no man's land up here More information the first the first two bytes of the dotnet deflate data After B64 decoding just not Be zip to data Okay, we're working with zealib Gzip it said didn't work for him either. What is B zip is B zip to I remember when we removed the release when I was thinking of removing Like the first two bytes it says BZ up here I Wonder okay, that could just be like pure coincidence, but I wonder if that has anything to do with B zip I'm not gonna need to have and just research that Python B zip to hey, all right. There's a module for it compression compatible with B zip to and Python Decompression of files. Hey, that's the same like thing we were doing with with ours and we were trying to inflate So, okay, I'm gonna go back to it Decompression of files. Is there an inflate function if I control F for that? No, there is not But whoa brought me down to the bottom of the page and there is a decompress function Let's do it. I mean, let's just let's just try it Decompressed data in one shot if you want to decompress data sequentially use an instance of BZ to decompressor instead I think this function just might do it though back to idle Import what is this module called BZ to? BZ to import BZ to BZ to dot decompress Passing the string. Oh, okay. All right. We get a string huge Whatever that means Well, that's got to be that was the section of that was the username, right? So now we need the password pw I'm a copy and paste this guy If I run BZ to decompress Oh didn't need those extra quotes huge file Okay so so username is huge password is file Hey, all right, awesome challenge number nine. We did it. Dude. That was that wasn't that bad. Um I'm kind of curious what more stuff BZ to can do now So a copy of interface for the BZ to compression library Implements a complete file interface one shot decompression functions and types are sequential Made I am very curious. I'll have to read and learn a little bit more about this Huh, okay. Well, uh, well, I mean the purpose of the video is done. I mean we're done We we got to the next challenge So, let's see Well, we didn't have to write any like real code in a text editor for this We just kind of worked in idle. So now we got a little Christmas tree of Strings and errors, but well, hey, thanks for watching guys. Hope you enjoyed this one I know it was a little bit of a different kind of poking around trial and error thing, but well, I mean it works So again, thanks for watching. Hope you enjoyed this video and I'll see you in the next tutorial