Wel, hynny'n gweithio, mae'n gwybod yn ymwneud yn ymddi'r ysgolwyd. Rwy'n gwneud yn ymddi'r ysgolwyd ein newydd ym YouTube, allan y golygu golff yn 2023. Mae'n ystafell yn 5 anhyggur doedd o gweithio'r ysgolwyd yn ymddi'r ysgolwyd. Yn ymddur, mae'n rhaid i esudio ymddur i'r ysgolwyd, a'r wneud ar rhai i symud ymddi'r ysgolwyd? A yna, mae'n gwybod yn ymddi'r ysgolwyd ychydig golff Youtube ym 2023. From My New Channel and What Are The Potential Earnings For You, if You're thinking of starting a new golf YouTube channel. Well, I'll answer all those questions throughout this video but first of all, I'm going to start off with my own new channel, why I chose to do it and what the potential is from My Perspective and it might answer some of the questions that we get to later on, the video when we talk about the potential and the considerations that you're going to need if you are going to consider starting your own YouTube channel. So a few weeks ago, I launched a new channel which is called Testing the Tips and I'm delighted to say that in the first fourteen days we surpassed 100,000 views. Now putting that in perspective, when I started my original channel five years ago it took me best part of a year to get to anywhere near 100,000 views so to do that in the best part of a couple of weeks, I'm absolutely delighted. We posted four or five videos, we got a lot of people to come on from our existing channel to come and watch, and that obviously gave me the major platform and the boost to get off to a good start. The new channel basically looks at me testing golf tips that are provided by other golf YouTubers, professional golfers. I basically take their lesson, their tuition, their tip, whatever you want to call it, and I put it through its paces and see if it works for me at least, translate that lesson into my language, relay it to you, fellow average golfers, and see if it can help your game. And I've got to admit so far the feedback has been fantastic, I'm absolutely delighted with the way things are going because what we do in our existing channel, as you well know, is predominantly review and test golf clubs. So it doesn't really, it's not necessarily a massive help to anybody's game, whereas testing the tips has already provided some incredible feedback where people have tried out the tip that we've filmed, come and reported back, and it's helped their game, which is an incredible sort of, I don't know, it just feels good to help somebody out in their game, especially someone at my level who isn't qualified to do so, but by relaying information that I found that has been successful for me, helping out a fellow golfer, and them having success in their own game, it's been fantastic. So loving what has happened and I really hope that that continues. Now I'll tell you what that 100,000 views earned me very, very shortly, but first of all let's get back to this idea of do you want to start a YouTube channel focused around golf in 2023 and should you do it? Well I'm going to say whether you should or shouldn't, but I'm going to pose a number of questions that you probably need to answer before you make that step. I'm going to start off with first of all the idea and the concept itself for the channel, and I would ask is it a unique idea? My own feeling was in terms of the second channel testing the tips, but it was very much that something nobody else was doing, so gave me a little bit of a head start in that respect and I would ask you to consider the same, is the content already being made and if it's already been made that's not such a bad thing, but can you deliver it in a way that is unique to you and give an angle that somebody is not perhaps considering? Again using my own history if you like, then I was reviewing golf clubs from the perspective as an average golfer whereas the majority of people who reviewed golf clubs out there right now were PGA professional golfers, so we always tried to look at something with a slightly different angle, so that's the first question I would ask you to consider, is your idea a unique idea? The second question, what is the target audience that you're aiming at? And the main consideration I would consider is age, that's the real interesting demographic, who are you trying to appeal to? Obviously there's a far different audience that I appeal to than to say what good good would appeal to and the main difference would be the age demographic I would think, so that's one other consideration, always consider who is your target demographic. Next question, are you able to commit time to upload regularly? This is a big one, I think there's a lot of people out there who watch YouTube videos and think it's an easy life and trust me it's far from that, it's the complete opposite. We post a lot of videos right now and it's been a slow build up but what you first need to ask, can you commit to posting regularly because it's what YouTube are going to want to see? Now that might just be that you post weekly but you're going to have to be posting on the same night every week for a number of weeks and a number of months likely before it becomes a successful channel and before YouTube starts to recognise when you are posting these videos and starts to fit you into a pattern, recognise that pattern and start to meet some of the requirements of that elusive YouTube algorithm but time and commitment to the project is really really important, the idea of creating one video disappearing for two or three weeks and then coming back to make another, I would say that is unlikely to work so another major consideration is the time that you need to commit to make this thing successful, right, is one for you, are you prepared for negativity because trust me there are a lot of people out there who just love hitting that keyboard and having a little bit of a pop, now you need to be fairly thick skinned for this job, you need to be able to deal with it in whichever suits you, I prefer to humour because some of these people are quite funny with the stuff they come up in my opinion but if you're a little bit touchy you might get offended quite easily with some of the things that are said so be mindful, everybody knows that social media comes with that kind of negativity nowadays but it's a consideration, the next thing to think about is what is the aim for the channel and what I mean by that is it just about fun, is about you sticking your iPhone on, you're playing some golf, posting on Instagram, you're playing some golf whatever it may be or is it a career and I think they're quite different things and I think you've got to choose the path that you want to go down in terms of a bit of a route map and it mightn't be the sort of believe me where we started and where we are right now wasn't part of the plan, it certainly evolves along the way but I think you have to have some kind of route map to say that this is where I want to try and take the channel and then like I said there's the odd diversion along the way but yeah I think some plan in place to what it is that you want to do with it is another good one for you, I'm reading them with a slight smirk on my face because they're all kind of considerations and problems that we have, does your unique idea provide enough content opportunities and what I mean by that is reviewing golf clubs was really good but what we need to do is make sure we got access to the golf clubs because without golf clubs we had no content, that seems fairly logical so testing the tips on the other hand is me testing tips from content that already exists so again we've got a well of content that we can go to and produce regular content on the back of it so that's the idea and the concept just think it through and are you able to then deliver consistent and regular content and enough content based on your idea, I hope that one makes sense but I think it's really important as well, another big one can you edit video or do you need help now from my perspective I was self-taught used a final cut from right at the very beginning spent hours and hours and hours whether it be on google or youtube trying to find out how you used different parts of final cut pro which we still use to this day and it's a long haul and a long process there are people out there that will edit videos for you obviously that comes at a cost and I would guess that early on you won't be earning income from day one so that's going to be a tough start but a real consideration they're obviously easier apps to use nowadays than going in straight at final cut but it's a consideration you're going to have to edit videos and from my perspective it's a real important part of what we do to make sure we deliver high quality content next one and maybe the last one I think at this stage is are you passionate about your idea because first of all are you passionate about golf and maybe are you also willing to lose a little bit of love for the game because I say that because it certainly becomes in my sense a career and playing fun golf social golf whatever you want to call it became less and less and less and like anything that you do from sort of Monday to Friday your job it becomes less enjoyable to then do that at the weekend and for me personally my I still love the game but not I don't play anywhere near as much social golf or get enjoyment from my hobby what it used to be as what happens now because like I said we just are at it no end and I think that so just be prepared you've got to be passionate and I'm hugely passionate about golf so if there is any doubt in your mind that you're going into something you're not fully committed to and not fully passionate about I would say that in a matter of weeks months it will soon become a bit of a chore and you will struggle to have the enthusiasm to create the content that is required so I would really make sure that yeah you give a real lot of consideration pretty much to all of those points I said about you know should you start I think absolutely you should start it's offered up me um so many opportunities it's been a real fun five years we've done so many things that I would never have expected to do I've been in with people that I would never have expected to be with and the opportunities keep on coming however it's been a long hard five years and the hours that I've put in if I was to go back and work out what am I getting paid on an hourly rate then trust me way below minimum wage because uh yeah it's their long weeks long hours be prepared I one of the biggest things that makes me laugh about comments that I made and we talk about the negativity if ever you get a sponsor to sponsor some video content and that means earning some money the comment that is often fired is oh you've sold out well trust me I would literally selling out is far from anything that I have ever done or any other golf youtuber has ever done in my opinion because they deserve anything they get because it is a hard hard graft and I said about dealing with negativity with humour it's the one comment that really does annoy me I still can't deal with it because I am certainly not and I wish you could sell out and make life just a little bit easier so it's a tough old grind and make sure you're ready for that kind of commitment back to my own project testing the tips I'm delighted with the way it's gone and I hope that we continue to build that channel and there'll be no end of effort going into that to make sure that I try and make that a success and to do that I need subscribers I need views and ultimately that is exactly what you are going to need so first of all I would ask you again encourage you to go over to testing the tips take a look at the channel there'll be a link in the description below support my channel by subscribing liking videos commenting on videos they're all major things that you're going to need to appeal appeal to your audience to do as well in terms of earnings while I put up a screenshot for you now this 100 000 views and this is what I have earned so far be prepared people it's a long haul because the first thing you need to do is you're going to need to hit certain criteria before you're able to monetize your channel now we've been able to do that and the way I will earn money hopefully fingers crossed in the future is by attracting more views which attracts more adverts which you then get paid for you get paid a minuscule amount it's a small amount and the only way you can be successful in this game is if you get a lot of views on your channel it is that simple not many channels go from zero to hero very very quickly not from my experience at least anyway but if you stick at it there is a career in this but you've got to be in it for the long haul and not expect to I hope you do and good luck to you if you do but not expect like I said go from on a very quick upward turn or upward trend rather but if you do like I said good luck and I hope that's what happens to our second channel testing the tips different video something very very different nothing I've ever spoken about on YouTube at all but with the introduction of our new channel I thought there's probably people out there oh are considering starting new channels in 2023 and like I said good luck go for it you will absolutely love it be prepared for the hard work I'm all done listen I will do a follow up to this video if it could be a disaster maybe it's nothing like what anybody wants to watch right now understand that maybe it's for you know not for my channel stick your comments down below if you've got any questions and I will do my very best to answer and hopefully help if if I can do it in any way and who knows there might be a part two for this video because we've covered very much the basics of some of the questions you need to ask yourselves right that's me done as ever thank you all for your support thank you for watching I will see you all tomorrow night with another video because we're cracking on as ever bye


Hi everybody, my name is Berna Cevikeng, I'm from Turkey, Istanbul, but now I live in Inegöl, Bursa. So I took this course, Tevhul from ITT. I am an English teacher in primary school. I took this course because it was so important for me. It's necessary for my school, this document. On the course time I have developed myself in FILED.  I can work everywhere as a teacher. When I was taking this course I learned so many details about education, training, technical information. Of course there were many things I know, but I repeat all of them again and again. So I advise for you, bye-bye. Thanks so much for watching. We are ITTT, the leading provider for Tevhul and TESOL training courses. If you like this video, please subscribe by clicking the button down here and click on any of the videos here on the left for more interesting teaching tips for getting certified to teach English abroad and online.


Hi. I'm Anjana Vacchial. Hello. Hope everybody's enjoying the week so far. I don't know about you guys, but I've seen a lot of slides this week, so today I figured I'd do something a little bit more experimental. No slides. I'm just going to show you some code.  Please do not take them seriously. Don't write code, like what I'm going to show you today. But my hope is that they'll illustrate some of the fun special dunder or double underscore methods here, which are also called special methods, magic methods, but I like the term dunder the best, so I'm going to call them dunders. As I mentioned, I put up all these examples in a little repo, vacchiala slash dunders. What I'm hoping is that at the end of the talk, to have a couple extra minutes to discuss with you guys, I'd like to do this more interactively. If people have other dunder tips and tricks that I am not able to cover, because there's too many wonderful things to fit into 20 minutes, I would love to have people discuss them afterwards, and possibly even after the talk if you can contribute to this repo, add stuff to the wiki, open issues, start discussions, and if you have fun little code samples that you want to add, there's a directory in here, sharing is caring, where you can put in whatever you want and file PR and I'll put it in there. So that's what I'd like to do today, because dunder methods are super fun, if you ask me. So what are the dunders? Well, they're these special methods and attributes surrounded by double underscores, which is why we call them dunders, and some of them are our best friends, right? So everybody probably uses dunder in it all the time, it's our basic constructor method, so here I've got a custom class, I'm going to call it a stringy int, and it's going to be a weird kind of number. I'm constructing it with this dunder in it, I'm giving it an attribute called value, and then another dunder everybody probably is already super comfortable with is dunder str, maybe there's a better way to pronounce that, I don't know, where we can have whatever kind of string representation we want. Usually it's just like the value of the object, but this one's going to be more exciting, it's going to have this is why you should never live code in presentations. So if we run this little module, we get to use another dunder that's super fun, which is this beloved if dunder name equals dunder main block, which as you all probably know is run only when you run the Python module itself and not when you import it into something else, so that's cool. Let's run a little interpreter, and I've set up some stringy ints here, so we've got one is a stringy int object, and two and three. Awesome, and if I print them since I've got my dunder str, I have fun string representations. And so another dunder that we all probably know and love is what is giving me this weird Python object-y looking string representation here, and that's dunder wrapper, which if I uncomment this here is supposed to be another type of string representation that's more the code object itself, it's supposed to be more unique to the object. In this case, I'm just going to have it be more boring and just print the string of the value, and so we can see that when we quit this and do it again now, now when it evaluates one, it prints out just the values, so I don't have to look at all this gobbledygook addresses and whatever. Okay, so far so boring. We all probably know and love these dunders. What about other fun stuff? So when I have regular integers, I can add them or multiply them. That's because the built-in int object has these fun operator dunders, like dunder add and dunder mole, which are used by the plus and the star asterisk operators to perform these mathematical operations, and I can overload them in my own classes by just implementing these methods. Super cool. So let's see here. What happens now when I have my one and my two, and usually if I add two integers together, I get, you know, reasonable things, like three, but if I add my stringy ints together, ah, it's giving me an integer that's just mushing them together like strings. This is a completely useless class. You probably don't ever need to implement anything like this, but the point is, you can't because Python magic. So what if I want to add a stringy int to a regular int? It doesn't work. The operand type is not supported. That's because it's looking for a dunder add function on the integer to the left of the plus operator that works with a stringy int object, and it doesn't find one. So if it tries to find the dunder add method on the left-hand side object but doesn't find something that works for the right-hand side object, Python will also try looking for these special R methods, which are like the sort of opposite implemented for the right-hand side object, like, for example, dunder add, which is possibly the best-named method in the world. So this one will be called on the right-hand side object as sort of a fallback if it can't use the regular dunder add on the left-hand side object. So now we can see that if we try one plus one, aha, it works now. We didn't change anything about the built-in int, but we use this dunder add, and it is super rad. I'm sorry, I can't help myself, you guys. Okay, one other operator that is a little bit different is this equal equals, right? We all know and love it. One is one, and the stringy int one is itself, but it would be cool if we knew that those two things were similar somehow. So I can do that by implementing dunder eek, and there's equivalence for all the, you know, less than, greater than, etc., etc. In this case, I'm going to try to make it work for anything that I can intify. So again, don't write code like this, it's just an example. So now if I try, okay, one is still itself, and my stringy one is still itself, and now, hopefully, oops, wrong direction, aha, now it knows how to compare these two different types. So the dunder eek function also is a bit special because it's also used for, for example, making objects hashable so that it can be used like as keys in a dictionary. So if I have a dictionary d, right now, if I want to make an integer a key, that's no problem, we do that all the time, but if I want to try using one of my stringy ints, it says, oh no, it's unhashable. Well, we can fix that, of course, with a dunder called dunder hash. So if I implement this dunder hash function, what I want to do is return a unique hash value for whatever this object is. In this case, I'm going to do kind of a really silly one, which is just returning the integer value itself. Ideally, you'd have something better than this, but the important thing is that you don't want to implement this kind of thing on an object that shouldn't be hashable, like a mutable object, you don't want that to be a key in a dictionary, but these are not mutable, so I can use it. So let's see now, if I have my dictionary d, okay, I can still use my regular integer keys, let's try now. Oh, I overwrote it, sorry. Okay, so now I've got, it's not complaining about the hash ability, and because of my dunderrepper function, it's difficult to see this, but if I do for key and d keys, it really is harder to type when you're up here, right? Let's print the type of each key. Okay, I see I've got one int and one stringy int, so it's working. So we can now use this new custom type as a hashable type for dicks. All right, one other thing I wanted to talk to you about with these stringy ints is a fun little dunder that's an attribute, actually, not a method, which is dunder slots. So dunder slots is a bit different. When I have an object like a custom object, usually I have a dictionary dunder dict that stores all of the attributes for that object. So that's what allows me to do like one dot value and get something out. And if I assign something new to the object, if I look at the dict, I see, aha, it got added to this dictionary. It's just a regular dictionary, you can mess with it however you want. But the thing is that dictionaries take up space, and so whenever you create a new object, Python gives you this dunder dict for all of the object's attributes. And it might be the case that for an object like stringy ints, you know that it's never going to have more attributes than value, it's only going to have that one, or maybe you just have a small set of attributes. And if I'm going to be creating like millions and millions of stringy ints, creating all those dunder dict dictionaries could take up more space than I want to use, it takes up also a little bit of time. So what I can do is use this, declare this dunder slots and name out all of the attributes that I want on my object. In this case it's just value. And what that does is prevent the dictionary from, the dunder dict dictionary from being created. So if this is right here, if I try now accessing the dict directly, ah, it doesn't have one. Does it still have its value? It does indeed. Can I add a new attribute? Nope, I can't add extra attributes. So it's basically constraining the size and shape of this object in a way that if you're creating gajillions of objects, that efficiency might actually come in handy. So I thought dunder slots was pretty cool when I heard about it earlier this year. All right. So let's see. Time flies when you're having fun with dunders. There are a lot of other fun dunders that we can use to make like container objects, for example. We already saw how we can make objects that are kind of simpler, you know, like numbers, numeric types. But what if we want to make things that have contents? So, for example, let's say I want to make a list, but I find lists really boring because, you know, when you add things to them, you append things, you know they're going to show up at the end. And when you index things, you know that you're going to find the right object for the right index. What if we want a crazy list where there's just an element of randomness? So in this case I've made a silly little object called a crazy list, which I've got my dunder init, I've got my dunder repper, I'm adding a little append method, just because all good lists need one, but instead of, you know, appending things to the end of this self.values list, I'm just going to insert them at a random place. Because why not? And so, again, I'm using my dunder name thing in here to run some code, right, when I run the module. Let's see here. All right. So I've got an L object, and it's got some elements in it. I want to find out how long it is. Oh, no, it has no length. That's not good. What should I do? Probably use a dunder. In this case, the one I want is dunder len. This is what's called by the built-in len method. So a lot of the built-in methods that Python, that we were used to using in our super beautiful Python code, they depend on these dunders, and one really simple one is dunder len. So in this case, instead of telling you actually how long the list is, I'm just going to sort of give you a random number that's somewhere in the vicinity of its length. Super useful, right? I hope you guys noticed the word abusing in the title of this talk. So now, if I try to len my object, aha, it gives me a completely wrong number, but at least it gives me a number. Sweet. Okay. So there's another, let's see. I'm going to try and skip ahead here. What if I want to do four item in my list, you know, print the item? Oh, no, it's not iterable. That's not good. How do we fix it? We fix it with a dunder. Yay. In this case, dunder iter. I skip dunder bool here. That's used for if l. You guys can get the idea. But dunder iter is probably more important if you're trying to make some kind of sequence object or something that you should be able to use in for loops and that sort of thing. You're going to want to implement this. And how it works exactly is a little bit more complicated than some of the other dunders, but in this case, I'll just point you to the documentation because we're running out of time. And in this case, I'm just going to kind of yield a random element from the list in the completely wrong range of the number of elements that may or may not be in my list. So really useful dunder iter function here, but hopefully you get the idea. So now let's try to do our four i in l print i. Okay. So I have a little thing in here that shows when dunder iter is getting called. It got called for that for loop. And it's doing something really useless, which is not only is it printing the wrong number of items, but it's also just printing question marks sometimes because mystery. But the point is that we can use this now in for loops. So if I wanted to define a really super useful dunder string method that uses a for loop to print out all the things in the list, I could. Okay. But what about, so usually in a list, like l, I want to be able to get a certain element by using this bracket notation, but it doesn't support it. If only it did. If only we had implemented dunder get item, which lets us pass an index or a key to these brackets for our object. And so depending on whether you want your object to be indexable using integer indices or you want it to be like a keyed item, like a dictionary, you can define this method to let's say look for a certain type, like only integers or to just handle anything, which is what I'm doing here, is I'm not even caring about what the key is or the index is. I'm just going to accept it and just give you a random item from the list no matter what you ask me for. So now I have my l. If I want a certain index, yeah, sure, whatever. Yeah. It's totally working. Great. And what if I want to try to access it as if it were a dictionary? Sure. No problem. Yeah. We'll just give you random things from the list. The point is, if you were to make an actually useful dunder get item method, then boom, you've got a dictionary or an indexable sequence or whatever you want. Okay. And there's also a dunder set item for the equivalent, which you can imagine for setting a certain item at a certain index or setting the value of a key. Okay. One other dunder that I want to talk about with containers is dunder contains. So if you have an object where you're going to be wanting to test for membership, like if x is in l, if you don't have dunder contains implemented, what you'll see is if I do, let's say, I want to see if 2 is in l. If you don't have dunder contains implemented, it's actually going to use the dunder iter and go through everything in the list and see if it finds something in there that's the thing you're looking for. That can be a bit slow, depending on various features, like, for example, how far close to the beginning of the list, the item you're looking for is. So if you implement dunder contains, this can be, doesn't need to be, but can be a faster way of testing for that membership. So depending on what your use case is, if you need something that you can really quickly decide whether something is a member of, like a set, let's say, dunder contains can be a good idea. So now we see that if I ask, okay, is 3 in l? See how my dunder iter didn't get called? I had that little print statement there. It's using dunder contains first. Okay, so a crazy list that's completely useless, but nevertheless showcases the magical container dunders.  So I have a little function here called add. It's super boring. It just adds two things, spam and eggs, whatever. But because Python is magical, since I have this doc string in here, I can, if I ask Python to help me out with add, it tells me okay, cool, the contents of that doc string and information about the function itself. Sweet. And when I add two things, it, you know, it does what the function says to do. But what if that's not cool enough for me and I want to hack my little function on the fly? So this is probably something you should never, ever do. But if you were a cat, you wouldn't care about adding two numbers together, you would want your human to give you more tuna. So what I've got here is a little function which makes use of some fun function object dunders, dunder doc, which contains this doc string. I'm going to change it to something more cat specific. And dunder code, which is actually the code object, the content, the functionality of your function. You can actually mess with that. You can replace it to be, for example, the contents of another function called more tuna, which instructs the human to give more tuna. So now, if I, if I have my regular add function, okay, add still good, add, it still works. Great. If I now catify it and I try to add two things together, it actually changed the functionality that's attached to this add name. And similarly, the doc string is different and useless. But this is something that you probably don't really ever want to do. But the important thing is that you should know that you can. And so if you ever see this kind of messing with going on, be really careful. All right, last thing, hopefully I have time for one more dunder. The, the with keyword works with two special dunders called dunder enter and dunder exit. And this is what allows us to define a context manager. So basically what happens is this dunder enter method is called whenever we enter a with block. And it can set something up for us. Like for example, if you use like with open file, right, it'll do some things like read in the file object. And then when you exit the with block, it calls this dunder exit method, which can do something useful like closing the file object. In this case, we're going to have it do something less useful, which is it's going to catify a function on the enter, the dunder enter. And it's going to uncatify the function by replacing the original dunder code and dunder doc with the boring human code and the boring human doc on the dunder exit. So what we should see here is that if I have my regular add function, it works. But if I do with cats in charge of add, and then I try to add two and three, and let's do something else too. Let's, let's just call the help and let's add, I don't know, four and five and six, sure. So what I'm doing on the dunder enter is catifying this add function. So we should see that any add calls I make in the middle of this block are the catified version. But when I exit it, I'm setting it back so any add calls I make after this block should be normal again. And just because maybe you guys want something that's actually a tiny bit useful out of this doc, I'm also putting in a timer here. So I'm timing when the cat reign begins when I go into the dunder enter method. And then I'm logging the time of when the cat reign ends when I leave in the dunder exit method and I'm printing out how long the cats ruled for. So this is an example of something you might actually want to do is write your own timer, for example, to time an arbitrary block of code. Okay, so let's try it out. Okay, so it called help and it's meowed and we saw that it called add twice and I'm actually using the numbers as the arguments to determine the Rs on per here. And then it told me how long it took, how long the cats were in charge. So just a little example of some things that you can do with these context managers, depending on what you're trying to do with your code, it can be a really useful pair of dunders. All right, so that's all I wanted to tell you about the dunders that I find cool. I would love to hear now if people have other ideas for dunders you find cool. And just before we kind of open it up to everybody, I just wanted to point out that the documentation for the Python data model has information about all kinds of dunders that you could possibly want to know. So if you're curious about any of these, yeah, check that out. All right, what do you guys think? Dunders to share? Thank you for your talk. If you overwrite dunder all in a module, then you overwrite what can be imported. So you can just say all is just these three functions. Okay, dunder all is not in this thing, but that sounds really awesome. So if you underwrite dunder all, you can overwrite what's been imported in the module, what can be imported from the module, that's cool. So is that something I should be able to access right here? Like, is it a... Try it. No, okay. Is it something that would be in the vars? Like in the... I've only ever written it. Okay, no. Where would it be? Anybody? If you put it in your module. Just anywhere. Should be a list. Okay, so if I want to say that only... We can only import catify. Like, is it... Would I do it like that or would I use the object itself? Okay. Does the order matter? Does catify need to come first? Okay, sweet. Let's see. So if I... No, wait, sorry. This is what would happen if I import from that. Okay, so let's try import from catification. Import add shouldn't work, right? Oh, okay. All right, all right, all right. So if I do from catification import star, then add should be aha. But catify is a thing. Cool. Thanks. Anybody else want to share stuff? Yeah, and it'd be cool if whoever just mentioned that could put a note in the wiki or add a little example. That'd be awesome. Sweet. Anybody else want to share something? Well, if you're looking for dundas that you can do crazy things with... Aren't we all? Yeah. The one to look for is dunder new. Dunder new? Yes. Which if you want to do crazy things, normally you would return your object instance, but you could return whatever you want. So for instance, if you return the integer 42, instantiating your class will get you the integer 42. Sorry, if I run it... If you're in your dunder new in a class, if you put return 42 at the end, instantiating that class will get you the integer 42 and not an instance of that class. Okay. So if I, in my stringy int, if instead of an integer I want, whatever integer I wanted, I just want always the answer to life, the universe and everything, I could do dunder new, self, whatever... Does it call with the value? Not self. You get class. CLS. Yes. And you get the value also. Okay. So it'd be like this? Yes. And I could just return 42? Exactly. And so now, if I run this, I should have, I had like one, should be 42. Exactly. Awesome. Very cool. Thank you. And if you do type on one, it'll say it's an int. So tricky. Thank you. Yeah, if you could put that in the repo, that'd be awesome. Anybody else? Yeah. So something I actually find really useful is if you still live in Python 2 and you don't have the LRU cache, yeah, you live in Python 2. Sorry about that. You can use the underscore, sorry, the dunder missing. You use the dunder missing. You get the cache out of a dictionary in five lines of code. Sorry. Could you say that again? Maybe more slowly? Yeah. So if you inherit from dictionary and you implement dunder missing, whenever an item is not found, you can specify a function. Okay. And that's a cool way to implement the cache. Awesome. So like, I imagine that would also be useful for things if you want like default values, like a default dict or something with that work. Very cool. Dunder missing. Yeah, if you could add that too, that'd be awesome. You can implement method call and dunder call to call object as function. Right. Okay. So if I have like an integer, shouldn't usually be callable? You need to method new. Right. Let's replace it. Okay. And it takes, what, self, right? And any arguments? Can we like just take however many we want? Will that work? And I don't know. I'm just going to print like yay dunders and return, I don't know, 42. Okay. So now if I have one, okay, it's my number and it's still hopefully a stringent. Cool. But I should be able to call it. Yay dunders. Sweet. Dunder call. And you can implement method and dunder get, dunder set, dunder deal, and dunder delete. Right. Right. So yeah, we saw like some of the getting and setting, but there's a bunch of other dunders like delete and whatever, which you can do, special cleanup code or whatnot that you need. Very cool stuff. Thank you. I don't know how we are for time. Are we? So actually the launch break started. All right. Well, thanks everybody for sharing. And yeah, if anybody wants to contribute to my little dunders repo, I'm hoping that it can be like a conversation starter. So go for it. Thank you.


I hope you understand when we are doing pore pressure parameters, we are talking about CU prime test and UU prime test, clear? Prime is the word with prime is how we differentiate them, consolidated undrained test with pore water pressure measurement, unconsolidated undrained test with pore water pressure measurement. So by means of a CU prime test, the shear strength parameters of the soil were found to be C prime equal to 10 kilo Newton per meter square, P prime equal to 24 degree. So this problem is the abridged version of the previous problem, clear? In the previous problem, we were shearing the sample and we reached up to failure, clear? And there we were computing A value, clear? All that has disappeared, the final state of the failure is known. So C prime, phi prime is known, your 50% job is done, you need not to understand the material, clear, under effective stress material, effective stress parameters. Now added to this is AF and what you are observing is a negative sign, fine? So what it corresponds to, what type of state of the soil is this? Very good. So it is a heavily over-consolidated material, clear? Heavily over-consolidated material will always show you suction, clear? So the pore water pressure which you are going to compute would be negative, that is it. So this is a type of characterization of the soil mass. Now in a UCS test, what UCS gives, remember? Go back to your lecture notes and check what UCS gives you, unconfined compression strength, what type of parameter gives you? So in a UCS test, a sample of the soil failed at a compressive stress of 162 kilo Newton per meter square, determine the initial value of suction in the soil. So this problem is a very straightforward direct problem, all right? No complications at all, everything is well known. Most of the time these type of tests are done, sorry, these type of analysis is done to check whether your pore water pressure measurement devices are working all right or not. You cannot believe, you have to calibrate them, clear? So I hope now you realize that from this what I am going to get is pore water pressure and pore water pressure I am measuring also, Cu prime, so consolidated undrained test with pore water pressure measurement. I want to check both the things. What could be another reason? Why I am so much eager to know about the pore water pressures? So this answers your question what you have been asking. Very soft, sensitive soils, the way you have made the sample, the way you have touched them and the way you have installed them on the pedestal might have changed the state of the materials also. In short, there are ways to check our experimentation and the results which we obtained from there. So rest of the problem is very simple. We have done this problem number 2 I suppose, where what we did is we obtained for C prime, 5 prime, the state of stress was given there and then we obtained pore water pressure if you remember. Now what we are doing is we are going to use the concept of AF over here. So AF is equal to delta U2 upon delta sigma 1-delta sigma 3. So what is given to you is a compressive stress of sigma 1-sigma 3 will be equal to 162 and because this is a UCS, so sigma 3 becomes 0. So sigma 1 becomes 162, how are you going to use the value of AF? So AF multiplied by 162 should be giving you delta U value alright. So what is the value of delta U? Delta U will be equal to initial pore water pressure minus the final pore water pressure and the pore water pressure which is coming from here. Let us say U2, rest is simple. So you have the Mohr-Coulomb envelope given to you, AF value was known, compute the suction value and this comes out to be 66.64. Be careful with the sign of the pore water pressure, it is a negative value in kilo Newton per meter square because if you compute the positive pore water pressure this will be redundant solution. What is the genesis of this pore water pressure development? Try to go by that alright. So you are achieving the failure by shearing the sample and then determine the initial value. This is a reverse problem of what we did just now, there we fixed that at 00 value something was given, I do not know that value. So I want to compute that. So what it says is determine the initial value of the suction in the soil sample before you started testing it in a triaxial test on a partially saturated soil. If you remember when we were talking about the capillarity in the soil and when we were computing gamma d values I had created a situation like this that you might be having a multi layered system of soils and somewhere here is the water table alright. Depending upon the type of the filling which you are going to use here and the compaction efforts, you are going to create a zone where saturation would be a function of Z. Everything below the water table is saturation equal to 1 here. We call this as a variably saturated soil deposit. Then I introduced the concept of capillary fringe here if you remember. So because of this water table over here and again depending upon the soil type and its compaction, you might be having a zone in which the capillarity dominates, is this part clear? We could compute this by using the hc value if you remember. So this thing we classified as hc equal to some 0.3 upon ed10 if you remember. This is an mm and this was in meters. So we have compute the capillary fringe also. What happens beyond capillary fringe is dry material unsaturated or variably saturated. So this becomes a very interesting problem. So the triaxial test on a partially saturated soil, it appears that I have taken a sample which is slightly above the capillary fringe. So it is not saturated, it is not submerged clear? Fine. It is a different state of the material which is defined like this. I was very eager to know now how the shear strength is changing, shear strength parameters are changing as a function of z because the question was that where should I lay the foundation? Correct? So I have given you a profile which I can obtain by doing investigations. I will do sampling, I will do different type of non-investing, non-invasive test, geophysical investigations. I will establish the subsurface profile clear? Now the question is where should I lay the foundations? So suppose if I decide that I will go for a shallow foundation or a strip footing clear? The question is what type of shear strength parameters are going to prevail there? This is the type of problem which we are doing. This is the background, okay? So there is a context for which you are doing triaxial testing, trying to obtain the parameters so that you can complete the design. So with all this story in mind at the back of your mind, now move ahead. So in a triaxial test on a partially saturated soil which is clay from particle size analysis from your Etterberg limits and all the characterization whatever you have studied until now, soil characterization clear? The sample was consolidated a sigma 3 of 150 kilo Newton per meters square after which the cell pressure was raised to 300 kilo Newton per meter square. The failure was achieved. I hope it is understood that you have sheared the sample. So DS is changing deviator stress and then you are failing the sample. Determine sigma 3 prime and sigma 1 prime at failure. First question is try to understand whether this problem can be solved or not without giving additional information. So quick answer is it cannot be because you need further information because failure condition is not defined yet properly. When we started this course, we were talking about failure. If you remember we said sigma tau at failure clear? And this was related to sigma x, sigma z, sigma y and tau series and angle of inclination if you remember at a point but the material did not come into the picture anywhere. That was the limitation of the Mohr's circle. Now once we go into the material, material can be depicted in several ways. Two easy ways would be either you talk about a parameter because a includes everything and we will see in the rest of the lecture today because a is a parameter which talks about the pore order pressures because of shearing related to OCR related to hydraulic conductivity related to particle size distribution clear and even plasticity index. So in short, if I want to solve this problem, I have to give the material properties. So if I give you C prime is pi prime is same as the previous problem, only thing is saturated sample, unsaturated sample less than 0.95 and AF prime is given as 0.25 rest of the things are same. Another thing is train your mind in such a manner that answers to all these problems should be not more than 3, 4 steps that part will come to you with the more realization. So this hardly has much to be done. You will be getting sigma 3 prime as 300 kilo Newton per meter square and sigma 1 prime will be equal to 120. Now where is my friend who was talking about sigma 3 greater than sigma 1 and sigma 1 greater than sigma 3. Are you realizing something? So in effective form what has happened? So your Mohr circle has shifted on the second quadrant, AF value is positive, read the problem in a tri-shell testing on a partially saturated soil, the sample was consolidated at this. From this state sigma 3 was increased to 300, clear. So your delta sigma 3 becomes 150. Now listen delta sigma 3 becomes 150, you know the B parameter, you can go ahead with all those things, AF prime is known. So you know delta sigma 1 is delta sigma 3, try to fit in that Mohr circle within this envelope, that is it, do both the ways numerically as well as graphically. Most of the infrastructure projects which are going on everywhere. One common mistake which people do it is that they do not talk about the gain in shear strength of the soil concepts. Now suppose if this is the formation of the soil and this soil is poor, soil is poor means either void ratios are very high, moisture content is very high, this is compressible, MV values are very high, CC values are extremely high, very close to unity let us say or more than unity, CCs are very high, void ratios are extremely high, alright. And velocity index is extremely high, now this is the delight of a geotechnical engineer because this becomes a difficult situation to train, we call them as problematic soils. General public call it as a problematic soil, but those who are technologists for them this problematic word gets changed by very good, excellent that is the spirit and not only the soils, this is the conditions, so what are the domains in which we are active these days, offshore engineering, challenging conditions, improving the soils in the marshy lands, waterlogged areas, organic clays and so on. This is something new which has to be learnt by all of you, our generation could do geomechanics with good formations, unfortunately now good formations are not available, so you have to go and encroach upon the challenging grounds, fine. Now what happens is, suppose if I consider this point O, what is the state of stress at this point, say sigma V prime and k times sigma V prime, you have studied effective stress principle, so now I am using effective stress terms, okay. Now starting from this state, if I load this system under undrained conditions, what is going to happen? This system will get converted to let us say sigma V prime plus let us say delta sigma clear and what is going to happen over here? This will also get changed to k sigma plus delta sigma or a function of delta sigma, I would try to tear as a multiplier of let us say A into delta sigma. The more and more I compress, what is happening? The system is getting improved, number one, that was the whole concept of one dimensional consolidation and by putting the, you know, pre-loading on the top of this deposit, so that the sample gets compressed, E values change, Cc decreases, Mb decreases and hence shear strength changes, so all these things are getting reflected into Cu. So truly speaking, what is happening is that Cu and delta sigma V prime, they play a balancing act, alright. So the more and more delta sigma V prime you apply, what is going to happen? Cu is going to enhance, why? Because this is the function of the material and this hypothesis was given by Schemton in 1957 that it is equal to 0.11 plus 0.0037 into Pi, this is what is known as Schemton's equation, 1957, ultimately this whole thing has to be analyzed. So if you follow the first principles, what you will be getting is the undrained cohesion or undrained shear strength of the material would be, do not remember this equation, my whole purpose of writing it over here is to demonstrate to you, so this is the form of the equation which you will be getting, importance of the parameters which we have talked about until now. Now K0 is the earth pressure coefficient at rest, AF is what we have discussed until now a parameter at failure. So what you are realizing is that there is a relationship between the undrained shear strength with the effective stresses which are getting caused on to the sample. Normally design charts are available between Cu upon delta sigma prime and they are plotted with respect to OCR and this is how you have these relationships, only thing you have to remember is for Cu equal to 0 is the condition for ANSI material, so truly speaking this function gets transformed to Cu upon delta sigma prime equal to this halter, so if this is 0 Cu upon delta sigma prime would be this parameter. One quick hint is if you do not include the change in the Cu value, there could be a situation where you might come across the consolidation which are more than 100% and that is not valid. There were beautiful bypasses which were designed in the country and the designer forgot this concept and to your surprise you will realize that the entire report the degree of consolidation achieved by more than 200, 300, 400% what this is known as is undrained shear strength and effective overburden relationship.


Mark, three points on the board. Big, big result, your thoughts on that, please. Fantastic. We asked for a disciplined performance, the work that we've done all week in training. We showed today, we improved on our performance at Crawley. The desire to defend the books is what we wanted right from the start. Defend the books, build the foundations from there. In possession, we showed today in the first half how good we are on the ball and we're always going to create chances. Overall, we're pleased on that performance. It's another foundation to build on going into Chooses again. Again, just the one goal, but chances in abundance, like you said, in the second half hit the post and could have had a few more. That must be encouraging that we're getting into those positions for the second time on your leadership. First of all, we need to stop conceding goals and that's what we've done. How we defended the box, I think that game goes on for another 10 minutes. I don't think we conceded that kind of day. So how we're creating chances. We always knew that. Me and Connor, as soon as we walked into the building, we knew that the players that we've got in, that we're going to create chances. A bit more disciplined in the second half, how we knew they were going to come at us, but we knew then on the counter we've got chances. We were unlucky hitting the post with Cookie and we had a few other chances later on. Speak about the clean sheet. A welcome. We had many this season against the side as well. We've scored 29 league goals this season. You speak about the defensive solidarity. It must be good to see again. Yeah, yeah. I think that's two games now. I think we've only had one shot on target. Credit to the full team. It starts up there with Noves, but how we defended the box, how disciplined I was, I keep saying it, but that was a team performance as a collective. How impressed have you been generally, obviously we spoke on Tuesday as well, since you and Connor haven't had the building with the players' desire, the efforts and the openness to open their minds to what you and Connor are trying to get across and put it out and to play on the pitch as well? Yeah, the players are brought in to me and Connor's way of working. They know that we want to play through the first when we can, but we know obviously that we've got to keep the door shut on the back. We came here to set the foundations for the players in regards to the defensive structure, but in possession, again, it's about us and what we do. The goal from Pritch tonight was absolutely fantastic. How he took his goal, and I fought first half in possession were very good. You mentioned briefly how much of a platform now can this build on, obviously, we are expecting a new manager at some point, but for whoever comes in, for whoever's out on the pitch, a victory, a welcome one, heading into a busy Christmas period, it must be a great positive for everybody involved. Yeah, the players are in there in good spirit now and they know the standard. We'll make sure if we're in charge of myself and Connor on Tuesday, then we'll make sure that we keep building on the foundations we set. If it's a new manager that comes in, then brilliant, you know, some foundations to work on and we'll only hopefully go up the table with that.


So we're artsy, we're crafty, we're creative around here at the art res and headquarters, and Joanne made something for Valentine's Day too. Now she's not allowed to enter the contest, of course, because that'd be weird if she won, but we wanted to show you what she made for Valentine's Day too, so here it is.


Welcome to Nursing School Explained in this video on the lab test of creatinine. Now this is a very standard test that we many times see on the complete or the comprehensive metabolic panel and let us know about the kidney function but let's look a little bit deeper as to what the creatinine really assesses. So first of all I've written down a reference range here from 0.8 to 1.2 but always remember that it depends on whatever lab you're working with and make sure you check the reference range for the specific lab and what they have there so that you know if your patient's value is in or outside the normal range. And whenever it comes to creatinine what it is is a byproduct of protein metabolism so we always want to think with protein we always want to think about muscles and creatinine is produced proportional to muscle mass which means the less muscle mass you have the less creatinine you're going to have. So people who are older typically have less muscle mass and therefore their creatinine might be a little bit lower than expected. Creatinine is usually filtered out by the kidneys and then excreted by in the urine and so that means that we use it very commonly to diagnose any kind of renal disorders or monitor those. And so it's always used or usually used in combination with BUN, blood urea, nitrogen but the creatinine value in itself is more specific to diagnosing renal disease and the reason is that the level of the BUN can be influenced by the patient's hydration status by their fluid volume status and the creatinine is not affected by the patient's fluid volume status or whatever diet they have consumed. And here is a very important part in red if the patient has a normal creatinine level but the BUN is elevated that usually means that we have dehydration or what we also call fluid volume deficit but if both creatinine and BUN are elevated that usually means that there is something going on with the patient's kidneys. And this might be anything from some acute injury like pulmonary nephritis, ruptomyolysis or chronic end-stage renal disease and please check out my renal disorder playlist where I go more into details about those specific disorders. Now when do we check the renal dysfunction and this is something that your professors might ask you it's not just the answer shouldn't be it's a standard test on a metabolic panel but we assess for renal disorders we also monitor those and then we always check the renal function by checking the patient's creatinine before we give any drugs that might be nephrotoxic so toxic to the kidneys certain antibiotics fall into this classification as well as chemotherapy drugs and even IV dye for CT contrast so keep that in mind and that's why we always have to fill out that questionnaire and or get the patient's creatinine check before we administer the contrast and then we also helps us to assess the patient's glomerular function. So thanks for watching this video on creatinine hopefully it allows you to understand the lab a little bit better and what's really behind it please also check out my other videos in the lab test playlist so that you can get a better understanding also check out the renal disorders and then another specific video on BUN and also creatinine clearance so that you can tie all those together and know how they all work together to help us evaluate the patient's kidney function. Thanks for watching Nursing School Explained see you soon.


Hello everyone, my name is John Hammond and welcome back from the YouTube video We're still looking at some try hack me rooms in this video was super duper requested by dark or d4r CKH So shout out to you my friend this video is for you. We're finally taking a look at the Tartarus room This is a beginner friendly room It's titled a beginner box based on simple enumeration of services and basic per-legislation techniques So I've spun the machine up here And I already have some of these user flags and root flags submitted here So please forgive me on that, but I'll showcase how we can get each of those so I will hop on over to my terminal where all the good stuff happens and I will cd into ctf try hack me and I believe I already have a directory for this recording Yep, so let's start off with the read me if we want to do to take good notes So we could start off with an nmap scan What I'm going to do is I'm going to use rust scan because everyone is all about that lately I'll set a batch size of 500 and I will slap in that IP address and we'll see what we get looks like we have Port 21 open or FTP port 22 open for SSH and port 80 open for HTTP or a website with that said we have a few things we can go explore I'll fire up that IP address and we have a default Apache page So we could do our usual test to check out robots.txt see if that's a thing Looks like we do have that and there's dark again great So we have an admin directory that is not supposed to be admittedly found right at the start So let's check that out and there we go. We have admin durr and this is directory listing for credentials.txt Okay These look like potential passwords. Let's store this. I will W get this guy Just to download that and what is that user ID? Okay, these might just be names for users So maybe credentials is a list of passwords while user ID is a list of user names. That is worthwhile I don't know where we're going to end up using this Maybe we can try Hydra because we have SSH open But we should do some other enumeration other than just kind of our manual robots.txt So I will start a little Niktoe session. I'll Niktoe this guy Tee him to Niktoe.log. Niktoe just a simple web scanner attack each to specify the host and I'll supply in the HTTP prefix for this URL I'll spin him off. I'll move my Rust scan because I'm sure he'll pass that to end map and do some good stuff with it But let's also start to run some go buster. So let's go buster durr attack URL So that you there to specify that and I'll use the word list from my Directory list medium that typically ships with durr buster I would get let that run and we could also specify some extensions if we really really wanted to but well that is enumerating Let's go ahead and take a look at some of those other services because we know we have SSH open if I were to try and netcat to that guy just to grab a simple server banner Looks like we do have open SSH on Ubuntu So we have a good idea. This is Linux and we kind of had that same thought and we're looking at an Apache Ubuntu default page There's nothing else in this source code here I hit control you just to view the source on the web page And I don't see any hidden comments or any other gimmicks that they might be trying to trick us or fool us with So let's take a look at that FTP URL or that FTP port. We could access Let's get connect with my simple command line client FTP here and We'll see if that ever comes back There we go Or not connection timed out is the box still up or did I hose the thing box is still up? We do have FTP on there. Don't we? Yeah, we go. Okay Okay, looks like I'm running VS FTPD. That is a later version of VS FTPD So there are some pretty well-known vulnerabilities for VS FTPD or the very secure file transfer protocol Damon But a lot of them are very very old if you see dot like one one dot three dot five That's normally a big one to check Anonymous it might have anonymous access enabled and we might already be able to see that if we've kicked off End map which we have so Russ can found these three ports very very quickly And now he's going to give that to end map to do some actual enumeration with the Aggressive flag and very very verbose and those specific ports. So I really really like Russ scan. It looks like he's already finished cool and There is Anonymous access enabled and everything that we already found Nikto found our robots dot text here. Sorry. That's humongous Robots dot text contains one entry which should be manually viewed Anyway, let's get back to our FTP enumeration If we're logging in as anonymous We don't need to specify a password so I can just slap enter there And now I am connected and I can run LS to see the commands I have here or the files on the file system. I do see this test dot text. We can go ahead and get that as we would and Simply looking at here at that test dot text file. That's the classic VS FTPD test file Grr. Okay. Annoying. I did that also in peak hill, which is my room on try hack me Where I just left that file there also a shout and call back to peak hill Don't forget when you're working in an FTP client to check for the hidden directory So you can do that with LS tack L a or that a to note all files and we see an interesting one That has three periods rather than one or two So that symbol for one period or a dot means the current directory two periods will refer to the parent directory But a three periods is not normal. That's not actually a thing in usual computer speak So they might be trying to hide something interesting there note that that is a directory You can see that D prefix there to specify. Hey, that's going to actually be a folder So let's try and change directory or the CD command into that location. You could run LS again. There's nothing there Don't forget LS tack LA and now we see more interesting things like another dot dot dot So very very clever very very tricky. Let's go ahead and CD into that again. We can see that as a directory So let's hop over there and now LS Now we've got you got good eyes dot text and just for our Safety LS tack LA and there's no other excess files. So looks like you got good eyes is what we want to work with So let's get that now that we've downloaded that file We have this you got good eyes dot text file on my local system. So let's cat that out and This looks interesting because that forward slash might be indicating that that is a web Directory or a location we can access on the website. So I see super secret in some leads speak Let's go check that out and This looks like a login page Okay, very very cool We know we have credentials previously from when we found that robots dot text entry So maybe we could try some of the credentials here, but it gave us a username list and a password list So maybe we have to try and brute force some of these Here so You could do this with Hydra if you wanted to I really don't like doing that primarily because I Dislike the syntax for Hydra and because trying to determine and figure out whether or not it properly got a new page Or it successfully authenticated or not is really frustrating and annoying So what I'm gonna do is I'm gonna look at the source code and see how this actually works And then I'm going to write the script to log in to all this and brute force this web Login page with Python. So stick with me. I hope you don't mind Let me open up my terminal and I'll start a like web brute dot pi file and I'll bring that down. I don't need to have some of my CTF challenges visible there So let's go ahead and start with a shebang line user bin environment Python 3 I'm gonna be working with online web stuff. So I will import the request module. I'll go ahead and create a session I'll use an s object or a variable to capture that session and for good practice I'll go ahead and close it and leave that at the very end of my script here So we know that we're working with this URL and I'll specify that as a string variable But this post request this actual form submission is going to a very specific page That's going to the action attribute in this form HTML element. That's going to authenticate dot PHP And it's going to post to that location. So rather than using super secret as the URL We actually want to make sure that we're using based out of that current directory going to that authenticate dot PHP page Let's go ahead then and now take the names of each of these variables that this form is awaiting to accept So I see username and I see password and it's also good practice just kind of include the submit value as well so let's go ahead and try maybe we could just to simply define a login function and Maybe you know what it changed my mind Maybe we won't need to use a session because if that's going to be logging in potentially one of these will actually get a hit We don't need to capture that and keep it. So forgive me that I guess we don't need to do that We'll just use the regular requests module and let's continue our function though Let's get a username and password that we could simply supply here And then let's do an are four requests object to do a requests Dot post to that URL which I will move up so we can actually have that variable to find already And I'll include the data here that we're going to post that'll just be a dictionary object So username is simply what we will pass the string variable is going to be the key here because that's the data Variable that that form or that web page is actually going to expect this Without quotes username is going to be the variable that we pass in to this login function I'll do the same thing for password Password that will again be what we pass in and I'll grab that submit value as well Just for good practice that will be a constant or static string there Okay, now we have an our object so we can print that Or just return that I suppose actually and we can print it later outside of that login page but now let's just try to print login with John and Please subscribe or please sub cool.  I'll hit control B and we got a response to hundred Let's actually grab the text of that page and see what it's going to return to us because that might tell me oh Incorrect username ooh That's actually some good info because we could go ahead and actually check what the username is before the password If it's going to tell me just that first detail that my username is right or wrong Then I don't have to like test every single one of them I can just start enumerating all the usernames and Then I can start enumerating passwords after I've found the correct username. So Let's go ahead and open up these files. I'm going to kind of collapse that page and let's get Little open function here user ID is the name of that file that has all of the usernames in it And are to read it as a string. I'll use a little context manager here. So I'll use width With open user ID read in with just a regular reading without bytes I don't need to use that b prefix here because I just want to pass in a string I'll use h and I'll use h dot read lines Or I'll just use h dot read it because that way I can do some simple list comprehension To remove out all the new lines and properly read that as a list So what I'll do is I'll just say usernames equals h dot read H dot read will return a big long string of all of the Content in that file. So I'm actually going to end up splitting that on new lines And I will actually go ahead and strip each of those. So I'll do a line for line in This this is some list comprehension. So some inline python H dot read it'll be the data that we're looking through We'll split it to get it into a list format Then we'll iterate through each of those For line in and then we'll create a new list with that variable line being our iterator But we will strip out Maybe any access new lines or stuff that just happens to be in there So after that I should be able to print out usernames And now I have a big long list of all of these here. It looks like I do have an excess so That empty string can also be kind of easily removed if I just do if line In the list comprehension So that line if that line actually exists if it's not an empty string It'll go ahead and include my if line at the very end there will make that go away Okay, we have all the usernames now. Let's grab all of the passwords. So with What is that credentials dot text? Is that right? Yeah, I think so. Ls. Yep credentials dot text cool. Let's grab passwords Okay, so because we know from our little test earlier just with our simple login function We can determine if it is the correct username or not So let's start by hammering usernames first and just passing in a bogus password So let me do a for username in usernames We can go ahead and try and log in. Let's actually get a response variable And then let's print out with a simple f string so I can say username With the username variable passed in We'll get this response There we go And let's try to run this And I have a print f accidental. Okay. Let's uh do this in the terminal So you have a better look on it actually. Let's do python 3 web brute username dark incorrect incorrect 32 diablo all those enox incorrect incorrect All of those are seemingly incorrect. Hmm Why is that? Oh Because I forgot to change the variable that we passed in it is not going to be john anymore It's going to be our username classic good sanity check. You guys should have told me You guys should have yelled at me like why why didn't you let me know that I was wrong there? You probably did Running this again. I see an oddball. I see this enox user gets an incorrect password. So we know He is probably the correct username because all these others are returning incorrect username and that one Got passed that layer of logic. So enox must be the right username Now, let's try that with the correct password Or try and brute force a password so for password in passwords plural We can specify enox and then the password that we're looking for. So username enox password Password can be passed in I can type I promise And let's see how that goes Let me try and connect to that incorrect password incorrect password incorrect password, etc, etc That's going to Change the screen. So let me go ahead and clear that for you Good brute forcing. I know hydra probably could have done this just as well. But oh Okay, we actually got a hit It was able to log in seemingly with the credential enox and password 1234 Good to know. Let's take a note of this. Let's just actually if we were to have our readme.md We would go ahead and keep track of those credentials. So Let's get that done Save that and now let's go ahead and log in Now that we know that enox and password 1234 Okay, now we have an upload page where we can upload a file Hmm I don't know what kind of file we might be able to upload But we could certainly try anything the most fun thing to try would be Some php code to get code execution, right? So let's go ahead and copy over our opt php reverse shell And Let's get that into this current directory. I'll actually move that to I guess rev shell dot php. Let me check out what my ip address is ton zero And I am 14 11 So let's modify this rev shell And use That ip address so it will call back to me with my reverse shell and I'll listen on quad 9 9 9 9 9 or quad 9 I don't need to say all those nines if I've already said quad. That's the whole point of saying quad So that is now something that I could upload And let's start to listen on things Let me close out of some of these shells that we don't need anymore And go buster doesn't need to keep working. Let's go ahead and I guess start ponkat. That'd be fun ponkat um source environment bin activate ponkat does weird things with the um With the php reverse shell though, let me try it. I'll show you. I'll show you what I mean python tack m lp And I used quad 9, right? python tack m ponkat. Sorry Now that he will be listening tack lp Now that he will be listening. We're really doing well for this video guys Let's upload our reverse shell that should be in ctf try hack me Tartarus Slap in a rev shell upload that Rev shell has been uploaded now. Where is that going to actually upload to? It doesn't exactly tell me where So I guess I can kind of start guessing is that in Simply rev shell dot php. No Is there an uploads directory? No, is there an upload directory? Where did you go? Where did you put this thing rev shell dot php? Super secret All right, let's try some durbuster on this location Because apparently we need to go buster dur http u word opt directory wordless. Please crank on that found images. Okay What is in images? There is an uploads directory in images and that has my rev shell. What is this pod cat? Thank you try hack me. Thank you You're the best rev shell out php click on that. We should have our call back coming through ideally No failed to demonize did I have the right port in there? Did I do something wrong? Did I do something wrong again and you guys didn't tell me? Oh, no, no, no, no I use the bad ip address I am listening on ton one right now I'm a fool So, you know what the problem is guys to be honest the problem is I've been trying to do More videos for you and I put in my hack the box address Don't tell anybody don't tell don't tell try hack me. Don't can I your stinking log back in please? What is it? You were home dot php? Yeah, okay cool rev shell do it Uh, are we still listening? No, we aren't now. Let's get back to listening Let's change these preferences or this profile to be black So it looks like I'm on the attacker machine and it's super cool and stuff images uploads rev shell Whack that and there we go. Now our connections coming through. Okay It's going to take a little bit of time with ponkat. Uh, we are working on ponkat by the way We are trying to make it a little bit better because obviously some of the stuff is a little bit slow and funky and weird Also, it's not very extensible if you want to pass in more arguments for a specific thing that you're trying to do like running a module with real specific I don't know variables and parameters and options that you want to specify Um, like maybe doing enumeration or a privilege escalation with crontab stuff because we're trying to make it better We're trying to improve it. So we thought well, originally we didn't want to go with like a metasploit like methodology and retrieving information or supplying information So we didn't and now we're reconsidering that. Um, what is this database doing guys? Did I not specify? Oh, I didn't specify a config file. So it's also probably whining about that Okay, okay, okay, let's No ponkat. Sorry Gosh, I hate doing that in videos and then everyone's like, uh, didn't do it. Let's uh, Try and stabilize our shell. So let me verify. Do I have python on here? I do Do I have python 3? I also do so it doesn't matter which stabilize shell I really use uh two or three Um, that script that I just ran comes from my poor man's pentest framework So if you're interested in that sort of thing, I have a talk on that on my channel Um, but let's see what's going on. I am dub dub dub data The apache or engine or hgtb daemon service or the user that's going to run the web server And that's a low privilege user. There's not going to be a lot going on right now Uh, so I need to do some privilege escalation and try moving to a better looking account I could do manual enumeration. I could do stuff with ponkat to do enumeration I could run lin peas. I could do plenty of things Let's take a look at what we have and it's that repassword first Just a good idea for these users. So I see a 32 user and there's dark again fantastic. Is this your room, buddy? I don't know what's going on So what can this account do? It's always a good idea to check sudo tac l It would be very very weird for dub dub dub data or a web account user to be able to run commands with sudo In this case we can so good for us right our attacker point of view That's great. I will take code execution when I can get it. Especially as another user But Maybe that's not normal on a web server. It shouldn't be right So 32 this other user that we saw and it's a repassword can Be used we can access dub dub dub data and use his account to run Var dub dub dub gdb or specifically this command without a password as the 32 user so gdb has gtfo bins or has code that we could simply run to uh Execute commands or do malicious things or read files or write files or upload files or peculiar stuff So if you go to gtfo bins dot github.io There's a great resource for all these linux local binaries and common utilities that can be used with certain Privileges or permissions to do other things like escalate potentially So this can spawn a shell and it will run with this syntax gdb I think it's I don't know what the nx is no execute or x or some command it can specify Yeah, ex looks like it's specifying a command But let's go ahead and try and slap that in with our sudo syntax I'll use sudo to specify a user with tack u 32 will be the user that we're going to use And we will have to use this specific command right var dub dub dub gdb Get that exact location in and I'll paste in gdb with that syntax now if I whack enter You can see gdb has started for me, but down below I have a dollar sign prompt Which is not what gdb usually does so if I run id I'm running as that 32 user So we've executed sh or started a shell. Let's actually sort of bash So I have a better prompt here. I can check out who am I and I am still 32 So that works just fine. We could go into 32's home directory. Looks like he has a note dot text Hey 32 the other day you were unable to clone my github repository now you can use get took a while to fix it But now it's good Incredible Where is my user dot text? Am I supposed to have a user dot text? User flag should that have been double the data or is that going to be dark? That might be dark Um, let's check out what we can do as this user once again simple sudo tack l just to verify Looks like he can run as dark This user been git so Once again Git is a gtfo bins that can be used and abused ponkat can do this um ponkat does weird things because the privilege escalation enumerate Enumeration technique that it uses actually finds the set uid bit first on that binary rather than running it as sudo so It tries that and then it doesn't properly get it We're still working the bugs out, right? That's the whole point of it. We want to release it kind of in development. So showcasing what it's growing and what it's learning to do. Anyway, you don't care about that stuff. Sorry for my tangents dark As the user that we want to run user been git And we'll slap in this syntax. Uh, let's try this one. You could use this one because this one is actually setting a variable It doesn't really work And initially especially if we're trying to use sudo with this But git help config will launch the default pager Which is usually less just like kind of that explains It is less and you can tell because of our paginated input or output I can use up and down arrow keys actually get stuff So I can use the dollar sign to try and run a command and I will simply run bash There we go. And now my prompt has changed and I am dark. I am the new user I've once again done our horizontal privilege escalation If that's the proper word for it, whatever Dark let's go into his home directory. Do we have user dot text? We do have user dot text. All right Let's slap that in get those points and Win try hack me just in general Win try hack me. What is this cleanup dot py script? Looks like it's a python script, right? So let's cat it out. See what we got here user been environment python import os import system Mm-hmm. How is this ran or is this ran? Looks like it sudo attack l can I invoke that? Oh, I need to know his password and I don't know dark's password But that's annoying Okay So maybe that cleanup is ran by cron or something All right, we could check this out if we were just looking in et cetera cron tab. Let's see what we have here I do see a weird entry. It kind of slid on the radar because it's not at the very very bottom It's kind of at the top. So it is minute hour day to the month month day of the week user And it looks like we have Every day every minute of every hour, but every minute divided by two So every two minutes it will go ahead and run cleanup dot py now cleanup dot py is in our home directory It's in this dark user's home directory that we have access to So since This cleanup script that is ran by root is in our home directory Oh, and we can actually write to it and control it, right? Then we could make it do Whatever we want, right? We could very very well change this os.system command to actually Run another command like get a reverse shell or Copy the root file to a file location that we can access or what I really like to do is mark bin bash As a set uid binary. So that way it will able it'll be able to be invoked by us And we can keep the permissions of root and that root user that actually owns that binary And we could actually use that to do some privilege escalation So if I actually monitor the sticky bit or the permission set on bin bash You can see right now. It's currently just regular rwx But after our half a minute hits after we get to minute 54 or the A multiple of two and even number every two minutes, right? That should trigger And because it's running as the root user root has the permission to add that bit to this binary And then we'll be able to use bin bash tack p and keep our privileges as root So we got five seconds four seconds. We got a little countdown. Let's see if it does it fingers crossed And there it is. Okay. Awesome. Now we can go ahead and run Bin bash tack p And you can see my prompt has changed with the middle of hashtag pound symbol octo thorp and I am root So I can hop on over to the root directory here Grab that root dot text and that box is done. So very very cool very fun A couple of gimmicks that I think we've seen before in previous videos. So forgive me. Hey, we're just I don't like to be doing the same thing over and over and over again on different videos, but Dark can really really ask for this. So hey, I hope you enjoyed I hope this video is everything that you wanted. Maybe you learned some tricks with that python gimmick. Maybe that Bin bash tack p you're setting the set uid bit on Bash is always a fun trick to do But just some good stuff and fun doing some manual enumeration As we need to thanks so much for watching everybody I hope you enjoyed this video. If you did, please do press that like button. Maybe leave me a comment Please do subscribe. You know, I'm super duper grateful. Thanks for watching everybody. I'll see you in the next video I love you. Take care