Sorry for the delay as I was just mentioning to some people up here. I feel very strange because I just came from a midterm, like proctoring midterm, so I didn't just teach for like 15 minutes, so I feel kind of rusty right now.  Great, so before we get back into TCP, anybody have questions? Yes? What was the secret test of 5-2? What was the secret test to part 3? Which one? There's two. 7-2, yes. Okay, so I'm going to stop the recording so if I reduce this assignment. So the second, so the first secret test was testing URL encoding. So are you properly URL decoding the URL, not to execute the command, right? But anything in the URL can be URL encoded, right? Including the EXEC, right? And it means the same thing because it's just encoding. So you have to decode that before you test it. Does that make sense? Yeah. Well, sure. Second one was just doing a pipe. So I was doing this exact same thing as one of the other tests, but it was calling, I think, LS something, I think, slash ETC, and then piping that through some other program like TR to translate spaces to underscores, and then comparing that with that same command being executed. So if you weren't handling pipes correctly, you would fail that. Any other questions? Was it fun? Good, thank you. Yeah, I don't have the graphs, but like the number of submissions, at least like two hours before, shot up to like 36 in the queue, and that held kind of steady, so that's why it took so long for the results. I have ideas of how to speed up the submission system, but I obviously wasn't going to implement that right two hours before the deadline, so I did not do that, but I think in the future I'll try to. It's a trade-off because I had ways to make it faster, but then that caused it to be more unreliable, which is not good for you guys anyways, because you want to know that it actually passes, it's going to pass the exact same way every time, so. What ended up being the average? I have no idea, I kind of looked it on. A number. I looked through them, they looked, of the submissions, they looked pretty good. There weren't a ton of incredibly low scores, so that's good. Yeah, in the back. Would you give me a project so I can start thinking of it? You want another one?  The projects? That'll be, we'll do it about halfway through the course. I think we're still about two or three weeks to go before we hit half a point. Something after the break. Yeah, that's probably a good idea. Yeah, I'm thinking after break we'll start to talk about projects, but at this point it's a little premature because it's like a third of the stuff I want to cover, right? There will be five assignments, or? Whatever the syllabus says? Whatever the syllabus says? Yeah. No, that's my answer. Whatever the syllabus says. This is three or four. It's just the 50% on the assignment. I don't know. It's just somewhere in there how many assignments? I think it's like three or four. Any other questions? Project questions? Any other questions? Who said that? No one. No, the homework will be released once it's released. I want to give you a little bit of a break. Probably Friday, maybe Wednesday. Sorry, probably Monday, maybe Wednesday. We'll see.  Yeah, that's fine. Wednesday would be good? I will see. Any other questions? So maybe the TA should not give out dates of assignments when they're not due yet. All right. Cool. All right. So let's clarify and go back to where we were, right? So we're talking about TCP and we're talking about how does TCP work? How does it specify all the segments? We had some confusion and I say, we, I really just mean me. And probably also you as well because of that. So the idea was looking at, we looked at this when data is being exchanged, right? So here in this packet, the client is sending the server 25 bytes of data, right? And the sequence number is 6575. So I re-looked at the spec to clarify my mind. So yes, the way we eventually got to it is correct. So the sequence number says, okay, at byte 6575, that's the first byte of this packet, right? And the next 24 bytes all go in there. So that when it acts, the act is always the next thing that it's expecting, right? So it's gonna be, and it's the problem of the, like I was trying to come up with a good way to explain it. I just had to draw it out and look at like, okay, if I sent four bytes and the first byte is at 6575 and the next byte is at 6576, the third byte is at 6577 and the fourth byte is at 6578, which means that I'm expecting 6579, which would be this sequence number plus the four bytes that I sent. So that's how we got there. So that's all good. Any questions on that? So this is why the act is essentially the sequence number plus the size. So we looked at data being exchanged and we looked at it at the packet level, right? So we saw that the connection here is pushing data and we have our acts back and forth. Somebody's gonna have to remind me do we go through these? Do we stop here? We didn't. Cool. So we can see that we have packets being sent and we can see here TCP dump is actually doing some nice stuff for us. It's showing us that, hey, up here, this 12 is the size of the TCP packet. So it's showing, hey, this is the sequence number that's being sent and it's from this to this, right? So it's doing that to the end there and so we can see the acknowledgement is correct here in the acknowledgement of that packet. If you're gonna do this in TCP dump, you want to do the, there's a flag to do absolute offsets so you can see the actual value that it's being output. Otherwise, it will actually take the initial sequence number as essentially zero and show you offsets from that. So we know how to connect. So how do we connect using TCP? How does it work? Send. Send that. Act. Yeah, three-way handshake. That's something you should, like, catch you on your arm. Or maybe not on your arm, maybe like on a part that's not so conspicuous. Or just memorize that's not a good way. Because it's something that's really important, right? This is the protocol that underlines all of our crazy internet traffic, right? Okay, so we know that and then we know how we can actually get data across, right? And we use these sequence numbers so that we know when we get multiple data and we know that we actually received the data and we get confirmation that that data got there. So now we actually have this reliable mechanism. But basically, now we need some way to shut up, right? And be like, okay, let's stop. Let's stop talking. Like, how do we do that? So this is the shutdown procedure. So basically, either partner A or B can terminate it in string by sending a packet with a thin flag sent. So what is... Why does it mean one of the partners? Shouldn't it be like the client or the server who decides? It doesn't matter. It doesn't matter? What do you mean it doesn't matter? Because the server can just say, oh, I don't want to send anything else or the client can just say, no. Right, so TCD is a full duplex, right? So both sides can communicate or send data either way. So this is a way for one side to say, hey, I'm done sending data to you. Right? And so the other partner B answers with an act at thin. And this means now A will not send any more data to B. It will only acknowledge the data that B sends, right? So you have this one-way, only one-way data stream open.  It's sending a thin packet, receiving an acknowledgement, and then they're done. They know they're done talking. Cool. So this looks... So if the client wants to terminate the connection to the server, it's going to send the packet here with an act and the thin flag set. So that's how you know it's a terminating packet and the thin one there. Now comes the very interesting thing where the server acknowledges this. So how does it... So this is something that I had to also revisit so we didn't have a repeat of Wednesday. And looking at what's... So what's the data of this thin packet that the client sends? How much data is there in this example? Zero. Yeah, there's nothing in there, right? So the sequence number is 6983. So acknowledgement numbers, what are we normally acknowledging? The next expected byte, right? So we haven't sent any data here, right? But when we reply back, when the server replies back, it acts acknowledgement number that's one greater than the sequence number that the server sent us. So why does it do this? Because... Because... Yes, but why? Look at it. Tell me that's what it does. But why does it do that? It's a counter for the packages to go, like how the networks are coming. But it seems counter-intuitive, right? Because the sequence number... Acknowledging a greater sequence... Acknowledging a higher byte than what you actually got because we didn't actually receive any bytes for 6983. Might be counting the counter for the headers, too. Nope. We have a separate count for headers somewhere else in here, which we're not showing. It's already... It's already 6983... So think about it this way. How does the client know that the server got the thin packet? If I just send it back a packet with... Yeah, exactly. So it knows that the other side received that thin packet. If it gets back an acknowledgement with that additional... The increment of the acknowledgement number. So it's not that we actually sent... Because it seems very strange because we didn't send any bytes, so we shouldn't be incrementing the acknowledgement number, but specifically in this case with the thin. And normally I would probably not go into this much detail, but I've made a big deal about it, so I'm not going to continue to do that. Even in this scene, we return with one plus string. Only with data, though. Only with data. Like, look at this packet, right? So this is acknowledging 6777, right, the other way, and then we're sending a sequence of 6777, right? So that doesn't change because no data has been exchanged, right? The sequence and acknowledgement number should only change if we actually are sending data, right? But that's what tripped me up just because I was looking at this. So then finally, so we can actually... So now the thin came from the client, right? So that means the client's not going to send the server any more data, but the server can always send the client data, right? So it's going to send... Or that's not any data. It sent data here, right? So the server can send 30 bytes here. So the server... Let's see. I should probably stop doing this, Matt. Yeah, I'm going to stop. Okay. So then it can send a thin packet, right? So it sends data, then it sends a thin packet. And now once the client has acknowledged that, it can acknowledge, let's see, up to 698808, which means that it received the thin packet and all the data that was sent, right? So now both sides know we've properly closed our connection. Both sides know that we've closed our connection and we can go about our business. Questions on this? Yeah. Why does the first packet from the server send 30 bytes of data? Just because it's an example. It doesn't have to. It's a specific example. Yeah. So just to clarify, when you send the thin, you're signifying that you're closing your... You were done talking. You're never going to send any more data? Yeah. Whoever sent it is no longer going to send any data. So what happens if we send data on a closed connection? Should it... Is it just going to drop it? What does that kind of mean? At a high level? Someone is just trying to... It doesn't have to be. It could be. It kind of just means we both sides have some kind of... Something bad has happened and we have desynchronized view, right? I thought you closed the connection and you still think that this connection is open. Yeah. Well, you could tell if it was in the window. But if I tried to send additional data, like past... Yeah, exactly. Past this fin sequence number, basically. Yeah. Wouldn't both the client and server need to send each other thin packets? They don't have to, no. You can close one side of the connection and leave the other side open. So you only get that in one direction. So this is where the reset packet comes in. Right? So if I were to get that, I would say... The server would say, uh, client, which means something's really messed up. So it would send a reset packet to say, hey, we should reset this connection because something's going on. So it sends a reset and then it goes back to the original state waiting for a connection. Is there a hand in the back? Can I send a data with a fin flag? Can you send a data with a fin flag? I have to look. Thank you. Yes, you can, because I saw it when I was playing around with this. Yeah, it means that this is, you know, the fin is the sequence like this is the last data I'm going to send, so after this there's no more. Cool. Okay, so we can look at this and see our original connection right from dot 20 and dot 10, right? So 22 sends a fin and then dot 10 acknowledges that, so it acknowledges the sequence number here plus one. And we can see here that it's sending zero data. And then the other side dot 10 sends a fin packet and then we can see the other side acknowledges it and now we're done, right? So this terminates basically our four tuple, right? Our source IP destination port destination IP, right? So now we can make a new connection and that's a brand new connection that's not related to this one. So we want a port scan. We've talked about UDP port scans, right? We want to try to find out what services they're getting on a host, right? What ports are they listening to? So we also want to do this in TCP. So how would we, what's the easy way to do this? Send a sin packet, send a sin packet. Yeah, send a sin packet, get us an act packet, send an act packet. Act packet, right? And so we saw that there's services that are statically associated with port numbers, right? This is a convention, a standard. It doesn't have to be this way. But it oftentimes is. So yeah, in this stupidest, simplest form of TCP port scanning you try to connect to all 65,000 ports on the machine, right? If you get a valid connection then you're good, right? So we know if we did that three step handshake with the sin, sin, act, act then we know the connection is good. So is this good? Yeah, two questions. I guess the one is how many sockets can a port handle if a colleague know it's dependent? It has nothing to do with the port on the server side because it's the four-tubble, right? So you have the same destination IP, the same port number, but as long as the source IP and the source port are different you can have any combination of those. As many as the operating system will allow basically. Second question? Okay, so this is, I mean does it work? This is the first question will it work? I mean if we can do a three-way handshake it means that something's listening there, there's something there that we can send data to on that port, right? So it definitely works. What are some downsides? Is it perfect? Packets we're going to send? Three times 65,000 Is it lower than UDP? Yeah, so UDP right? We just sent packets and we would see the we would get ICMP port and unavailable messages back for those ports that there was not services running on. But we weren't necessarily guaranteed to get a response back if it was there. Another advantage, so we'll look at this a little bit more, so you don't need to be root, right? So any program can make a TCP connection to any port and any IP on another system, right? So doing this, you don't have to be root, you don't have to fiddle with any packets, you just ask the operating system, hey, connect to this IP and this port using TCP. And then if it says connection successful, then you go, yes, awesome, I've port scanned this machine. The disadvantage as we saw, right? It's very noisy, right? You're sending all three-way handshakes all the time. So it's noisy on your end and on their end. Yes? Good question. We'll think about that as we refine this some more. Yeah, so unlike UVP, we can play a lot of different games here. And we'll see, we can actually get it very advanced, which is very cool. Is it because you tell the client what is the next expected packet number? We'll see. We'll see. Yeah. Basically, yes, that would be if we could do it with less packets, then that's definitely going to be better. But let's look at what this looks like. So you can use Nmap to do this. I guess you don't have to be a brute, I should change that. So you can Nmap and it will just try to and you can see here that this version of Nmap actually only does the top 15,000 ports that are used by TCP. There's a fly, I have no idea what it is to change it to do all ports from one to 65,000. And then so it shows you. Okay, on port 7, TCP, there's the echo service open and it shows you the names of those services. And once again, the important thing to remember is all the information that this is giving you is I was able to connect to this IP on this port, successfully make a connection. And I know that that port number is associated with this service name. It does not guarantee that that service is actually living there. It's entirely possible to change port 22 and change it to a completely random port. And then it will show up in the services as HTTP if it's port 80 or whatever it happens to be. So it's just important to keep this in mind that just because Nmap says that these things are there doesn't necessarily mean that they're actually running. Yeah, so our refinement of this technique is, okay, instead of doing the whole handshake, let's just send a SYN tagging.  Something is listening there, right? Because the server is trying to connect to us. It's not giving us a denied message. So we never have to send the finished the finished act. And so this is called, for this reason, half open scanning because you're only halfway making it's not actually halfway. It's like two steps of a three-step process. Yeah, so you send a SYN packet. If the server answers with the SYN act packet then the port's open. But if it sends a reset packet or you get no response back then it means that that port is closed. And then the attacker can send a reset packet instead of the final act so that that way the operating system on the other end just terminates the connection. So this is actually an important point to note at the bottom here. This obviously depends on the operating system and the versions and everything like that, but this could be something that's handled by deep networking IP layer code that says, hey but I get a SYN packet I send a SYN act and then if I get a reset I just stop. I kill that connection. But it's not actually logged anywhere that somebody tried to connect to this port unless you have additional logging features. So we can look at what this looks like. Now for this you do need to be root to do this because you need to actually create packets and only do half of the connection. Linux doesn't allow you that level of packet granularity by default to any application. But using like libnet or scabby you can easily do this, which is how Inman does it. So I would say, okay these are the ports that I found was open and we can look and see that okay it's sending from .69 to .38 It sends a packet to port 78 and there should be like dots above here because there's a lot of stuff that's happening. It sends a send packet to maybe it doubles it for some reason? I actually don't know. I think maybe it could copy past that error. Port 82, port 80, port 79. So we get a reset packet back from port 78. So we know 78 is not open. 81 is not open, 82 is not open and we get a send back from port 80. So we know if that's up and then we send a reset back to port 80 so that way it terminates the connection doesn't keep anything open and we just continue going about our business. Does it acknowledge our reset? No, that's a reset from 79. Are these in order 78 if you want it to again? Any questions on this? So this is our attempt to essentially use the knowledge of the T-SK stack and how it works in order to scan because what's the bit or I guess 65,000 bits of information we're trying to get? So this result tells us one bit of information what's that bit of information? Port 80 is open on that IP. That's that one bit of information. When we're doing these scans we want to find out for all ports. So 65,000. So I'm just thinking of it like it's one bit of information, is it open or closed? And one way is try to connect. But by using our knowledge of the T-SK stack, which is something you guys identified right away it's like yeah, why do this whole three-way handshake? We can actually get that bit of knowledge earlier in that handshake between sending the SIN and then if I get a SIN act back now I have that bit of information. I don't have to complete the connection. So that's what kind of all these techniques are about is how can I extract that one bit of information that this port is open or closed based on my knowledge of networking and that kind of stuff. Isn't it locked somewhere? It depends on the system. I can't get into the particulars. You can kind of see that clearly you want to log all fully established connections. But for every reason maybe you don't log every single error case in every single reset packet. So that's kind of what this technique takes advantage of. I still think even with this sending the reset, I think it uses less packets for port, right? For open port. Yeah. Why do we need... Because the operating system the abstractions that it gives us to operate with IP and port only allows us to say connect to this IP and this port. I think the higher ports are allowing the lower ports. That's for listening. Not for connecting though. For connecting everything? Yeah, you can connect to whatever port on any other machine. But, so the operating system abstracts all these details from you, right? So you only get a response back when you've done the SINAC hack. Right? And then you get a good that packet is good, now we can use this to communicate. But it doesn't give you any of this. So it's really to say only send the first two packets but when you get the third one back send a reset packet. So that's why you have to manually craft these packets. The TCP implementation doesn't give you that type of abstraction. Okay, so there's other cool ways to do this and we're going to go through them. So one way is fin scanning. So what does this sound like it means? It doesn't fold TCP connection and it goes to the left. So actually, so SIN scanning right, use the SIN packet to do SIN, SINAC, ACK for full connect scanning. This is, we're going to try sending a fin packet to that port. So why might this be interesting? How could this give us that bit of information? What? An acknowledgement. This is actually to establish a connection. So now we're kind of diving the level. So if you think about it at a high level the connect scanning that actually takes advantage of the protocol level.  Both those two the half open and the fully SIN scan, they take advantage of the protocol. But now to be able to sneak here we can try to take advantage of different implementations. What do they do in error cases? Does their response when I do something that's not in the spec does it allow me to get that bit of information that it's listening or not listening? So here in a lot of TCP IP stacks if the port is closed when they get a fin packet a reset packet is sent back that says hey, we've reset but if the port is open the fin packet is ignored so now we have a way to distinguish between these two cases we can extract our one bit of information just by sending fin packets. Of course this doesn't work in all cases so on some versions of Windows a reset packet is sent either way so it doesn't actually work for all TCP stacks. But if you know you're targeting a Linux machine you can use these techniques and there's this is kind of like a general concept of it's actually applied a lot in security so basically can I fingerprint or can I get some information extract some information based on variations in an implementation does the implementation change its external behavior based on the condition that I'm interested in this case port listening and what happens when I send a fin packet what happens if I just like what if I set all the bits in the flags what if I set the fin packet, the push packet and the urgent packet why is it called a Christmas tree or Xmas packet everything is all lit up like a Christmas tree all ones so what does it do I believe this back has no say of exactly what should happen in this case so that means implementations are free to do it differently and if they respond differently depending on the the status of the port now then we have a way to detect what if we set no flags all flags is zero how does the implementation respond so we can look at this you can do this Nmap supports all these kinds of things it has tons of options you can look at this so you can say okay scan for using fin scanning so in this case it's going to send a fin packet to port 79 82, 81, 80, 78 and it gets it gets back a reset from 79 82, 81, 78 and it gets back so we know from the timeout here we didn't get a reset from port 80 so we've inferred that port 80 is open just like relying on any kind of timeout based technique it could be that that packet just got lost just like with UVP so we should probably do some other steps then to verify that this was the case any questions on this so it's kind of a general idea this concept applies in a lot of different places in security so for instance areas you wouldn't even expect like fingerprinting browsers so often times advertisers want to try to fingerprint your browser to link your profile and your browsing habits with other different users in different sites so to do this they'll use features of your browser like what fonts are installed and what functions are available like what exact version of your browser are you using what fonts are installed what extensions are installed and those few bits of information are enough to uniquely identify you so this is kind of the same idea just in a different context can I say that fingerprint scanning is not accurate because it comes in and it works that is busy and it drops a lot so most of my packages are full yeah so the other ways were more reliable like especially connect scanning I know 3-way handshake but whereas in this if the package gets dropped or something happens to the network so maybe you take an additional step afterwards to verify but you're sending an awful lot less traffic so it's good as an advert yeah yeah well it depends on the time out you don't want to overload the network so I can't do a hybrid approach where you don't get a response back in a certain period then you send a send you can do a hybrid approach you can use this list to build and do some reconnaissance of what services are listening on that machine that information on its own isn't that interesting the attacker will try to leverage that information by trying to connect to those services to do something so yeah eventually you're going to want to verify so if we think about this from the defender's perspective what's kind of the downside of the attacker for all three of these or all of these port scanning techniques slow they're not actually that slow it depends but yeah you need root access for some but that doesn't have anything to do with a defender it's not leveraged in what sense yes that's true so we're not, we probably can't use this for any time in denial of service attack because in denial of service we need some kind of leverage what was what were some of the things we could use ICMP packets for like smurf smurf attack why could we do those things because what? we didn't need a response why don't we need a response what did that allow us to do spoof the source IP address right can we do that with these techniques can we spoof the IP address for SIN scanning or connect scanning no why not so can we spoof, let's think about this one so it's a three step process can I spoof the the source IP of the SIN packet yes, just an IP packet I can spoof that but when the server replies we reply to yes, the other person that we we replied to or we spoofed but in order to successfully complete that connection we need to send an acknowledgement of whatever that sequence number that went to another machine that we don't control right so we'll actually get into how we can do that but for connect we need to send a packet and we need that packet to come back to us so in all three of these cases for connect scanning and SIN scanning and FIN scanning we need the responses back to us so we can't spoof where this comes from well is that good as an attacker we can't hide ourselves with a Smurf attack we can actually hide that it was us doing it which makes it I'll say two things way cooler and also more dangerous and more impactful so there's actually other ways that are stealthier to do this port scanning that don't actually come from you but that are can be less reliable so we trade off kind of reliability for stealthiness this is what's called idle scanning so it's a little bit complicated but it's really interesting so the idea is we're gonna this might be on the related but NF has a spoof option to do you know what that does so I'm ahead of no yeah I don't know I mean so okay when I say that you can't spoof right if you spoof a host on your local network that doesn't exist and you can use like powerful poisoning to pretend that it came from a different IP address on your local subnet because you'll still get those packets coming back so you can change that you can spoof the 9 address too but doing like something really interesting like pretending to be a computer and a computer network for most attacks okay so the idea is we're gonna use a victim host to basically relay our scan so we're gonna try to use this host to extract that one minute information from a different from our actual victim host so we use this host essentially as a relay so the basic idea is the word idle comes from here is we want a machine that's not generating a lot of traffic we want a machine that's essentially idle that's doing basically nothing our relay then what we're gonna do is we're gonna send our victim that we want to scan we're gonna send them a sim packet spoofed from the source IP of our relay and what we'll see is that by so it seems that packets are coming from the victim right or from the victim relay and the target it seems like the packets are coming from the relay and so the target will then reply to the victim, apply to our relay so if the port is open right we expect the target that we're trying to scan to send back a sim and if that happens then the victim said hey I never sent you a sim packet we should reset this connection because you're going crazy there's no I never sent you a sim packet but if the target replies with a reset so if the port is closed right and our target sends a reset packet then our relay doesn't send out any packets at all so we can actually leverage the fact that in most TCP IP implementations the ID datagram the IP datagram right has an ID field what was that field used for? why do we want to identify packets at the IP level? fragmentation yeah we fragment packets and know that they come from the same original packet so what I can do as an attacker I first send a packet to the relay see what ID number it is then I send this packet spoofed as if it's coming from the relay this behavior here will conditionally change the ID of the IP datagram and then I send another packet to the relay and it will respond back with a different ID depending on if this was successful or not so the idea is if I know that this datagram has increased then I know that the port on the target machine is actually open otherwise if it's not increased then I know that port is closed so I'm essentially inferring the state of the port on a third machine being open or not depending on if the ID field of an IP packet changes on my relay machine and I can do that because this machine is idle and it's not servicing requests because I'm essentially trying to see if it does this one if it increases based on one packet being sent back so questions on this at a high level and then we'll kind of step through this so hopefully it'll make a little more sense is this not really cool? it's really cool you're like tricking another machine into scanning a third machine okay so first step we have to do is the attacker needs to determine what's the initial IP ID that sequence number should be ID right so we have our relay we have the victim and we have the attacker so the attacker is going to send a packet to the relay says hey this is from the attacker we can't spoof our address because we need the response back so hey this is an attack this obviously would be you wouldn't say I'm attacker you'd say from IP address me to IP address you of the relay ID doesn't matter to some port a SINAC or something and then it sends us a reset packet back and this has an IP datagram ID of 1234 which makes it very easy to remember so now I know so now what I'm going to do is I'm going to the attacker is then going to spoof a SIN packet as it came from the relay to the victim okay so the victim is going to get this for port 80 because I want to see if port 80 is open and then when the victim gets this what's it going to do if port 80 is open SINAC to who the victim right not to us not to the attacker we don't get that right so it responds back and says hey thank you for your connection attempt here's the second step of the two-way handshake and then what does the relay see right the relay didn't see this top packet at all right it has no idea about this so it's just getting a SINAC packet from a random machine right so it's like what are you doing crazy stop talking to me it sends a reset but look at what happened to the ID number here got incremented to 1235 from 1234 which we originally had when we talked to the machine so now I do the same thing now I've done this so now I want to determine the relays final IP ID so I'd send another packet like a SINAC or whatever and it would send me a reset and so I see it's 1236 right so it incremented 2 from when I originally sent that packet right so then what about the case where I send a spoof connection this is a closed port port 80 is closed is the victim going to send a SINAC no he can't it's either going to send nothing right which we saw could be the case on some systems or it's going to send a reset packet say right this is not good and then the relay when it gets a reset packet for something it has no idea if you think about it right if I say hey our connection is messed up and you get that and you're like I'm not expecting a reset here's a reset your packets messed up we would just keep sending back resets forever right so this is why the relay shouldn't reply to a reset right it should just either ignore it or not do any behavior here so now what's the next IP packet that relay is going to send what's it's IP going to be 1235 right because we got 1234 first this didn't generate any packet from relay the next packet is going to be 1235 so now we can make that connection and see that the packet back is 1235 so now we've used this that difference of that ID field try to get that one bit of information of is port 80 open on a completely different machine and victim only ever sees IP traffic from the relay right he doesn't even know we exist it doesn't know our IP address it doesn't know nothing about us and if really it's a machine that's idle and it's not being used at all then I doubt they're doing any logging of who's sending packets to them questions on this does this have to be really centralized I mean yes and no so if you want to precisely determine based on one of this yes but the nice thing is you could do like a you do this multiple times right statistical analysis and say okay is it likely that this port is open or not right and the more time you do it the more time you'll be able to tell how long would the FTP need to wait until sending another packet to relay yes it's tough I don't know right I mean there's no one good answer right because you also have to yeah you have to send spoof that packet it could be that victim is a policy where he doesn't send any packets back to relay's IP address right you could have to try different relays that's why you're trading off your reliability versus stealthiness because you have to rely on this completely third party machine that you have no control over so packets could get lost accidentally right in the network you would never know about it all that kind of stuff it could be that victim never and you don't know if it's did this IP number not increase because victim ever got your original packet or did the response from victim to relay get dropped any number of things could have possibly happened so but you know you can you do it enough times and you can kind of you're reasonably I mean not assured but you have some idea how do we first determine whether a system could be used as a relay system or not how can we do that how can we do that what was it sniffing let's say they're all on completely different networks and they're all stretching so so yeah right so we're already relying on the fact that the IP datagram is essentially doesn't have to be monotonically increasing but is increasing based on the traffic right so we could send these packets and try to send these packets to relay and see how that number is changing right if that number is changing not very much at all then we can say yes it's probably idle if we know the server like it's located in the US and it's used for ASUs random companies payroll or something right we can say okay it's probably highly unlikely that this is going to happen at like Sunday at 3am right so we could do that then yeah one more question like we are looking at the ID number over here but this won't be much this technique would be much reliable because the relay can be talking to many other people so might be ID number can change to a high extent yeah so that's why we have the idle so that's one of the keys of this technique is you choose a relay that is idle and it's not making a lot of connection okay I really want to get done with this okay we have alright we'll definitely be able to finish all this on Monday I'm probably going to cut some stuff but we'll finish networking on Monday


What's up ladies and gentlemen, Dan Whitmer from ZenDude Fitness and today I'm going to be showing you my favorite jump rope trick. Now please understand a couple things, if you cannot do advanced jump rope tricks that is totally fine. We have a whole YouTube channel full of workouts and tutorials to get you on that jump rope ninja level speaking of which if you're not on that jump rope ninja level yet check out our how to jump rope like a ninja series it's its own playlist. Hey guys this happens to be my favorite trick right now. This is not my favorite trick forever but what I wanted to start doing was showing you guys how to do some of the tricks that I'm learning as I learn them and what's awesome about this is a lot of the tricks that I'm learning are from you guys. They're from going into our Facebook group if you're not in our Facebook group check out the link below getting our free blurry challenge. The cool thing about these tricks is that I'm seeing you guys do some of these tricks and then realizing Dan you need to step your jump rope game up a little bit. So that's even pushing Brandon and I to start learning new stuff. So today we are doing the side swipe excuse me crisscross. Now it's not a super advanced trick but the way that I do it is a little bit more advanced and I like to get this nice rhythm down and make it go very fast.  They don't say that.  Alright ladies and gentlemen so the first thing we're going to start off is I just want you guys to see the move side swipe crisscross before we get into it. So just check this out here it's very simple it's just a sideswap very simple for those who are a little bit more advanced. It's a side swipe and as soon as I'm done the side swipe I'm just crisscrossing and going right back into it as you can see here is the side angle. So what I recommend first guys is if you haven't check out the side swipe tutorial that I just linked and also the crisscross tutorial first let's talk about the side swipe. So guys the side swipe is a very simple movement where as you can see I go from my right to the left you can go left to the right right there you see that movement my eye after I do the cross here you'll see in a sec my hands are open I swing that right that right hand over and as soon as the right hand comes to the left I immediately swing the left hand over to the side as well you're kind of doing a little figure eight as you can see here when I dip my right hand I throw my left hand over it as the rope spins around so check this out in slow-mo side swipe left to right and just doing a little under over so my right hand is coming under and then my left hand is coming over check it out right goes under left goes over bam now we're open and ready to do the crisscross so check this out from the front guys here we go right left comes down so it's a little under over as you can see here again my right goes under my left goes over and then as I open it back up I get ready to do the crisscross the side swipe is not that difficult of a move but it's something that you guys are going to have to practice a lot but what I would recommend is getting down the side swipe first before you move on to the crisscross and again check out that tutorial if you haven't now in addition to the side swipe one thing you're going to notice look at this when I go to side swipe I'm not just doing a regular side swipe I'm gaining momentum by stepping back check it out right here boom you see how my body is moving back what I'm doing is using my momentum to pull the rope back so that when it comes forward so that it comes sorry so that I can side swipe a little faster than I normally would that it looks like something very small but that little bit of torque look there a step back and it allows me to side swipe at a higher pace and get me more ready for the crisscross here we go so step back side swipe good step back side swipe so that back leg is the one that's really leading everything and coming back so when you guys do the side swipe just make sure as soon as that right hand goes forward you're taking a big step back with your right foot could be your left foot if you want but for me it's my right now let's add everything together and do the crisscross ladies and gentlemen so that basic little side swipe right there the step back and then having that step back allows you a little bit of momentum right here boom crisscross so we're going left or sorry right to left and then crisscross here we go again right arm left arm and now we're back and open and see how I'm running through this I don't want you guys to just do regular bounce what I want you to do is run through this so as you can see here I'm alternating my right and left feet but then once I take that step back and come out of the step back I'm ready to do the cross check it out step back and I'm stepping forward to do the crisscross so just like you got the momentum to go back when you were doing the side swipe what I want you guys to do now is when you do the crisscross move forward and move through that crisscross again to speed the rope up check it out again side swipe and crisscross there we go guys if you guys have questions feel free to let us know zendu nation thank you for another great tutorial post your comments below and just let us know what we can help with guys the whole goal of this is for you to become a badass jump roping ninja so let us know how we can help zendu nation see you guys on the next tutorial


What's up everybody Jason here for Jasper's case breaks calm 2020 try start quest top shelf one envelope break number three just sold out Remember, this is first Random first letter of last name. So again, of course super high risk high reward only one item redemption per break 21 total spots every biggest around letter from the list below where we don't have qv x y and z Have been removed from the list We'll be going by the first letter of the last name that is shown on the redemption So example Kobe Bryant will go to letter B We pull Muhammad Ali it'll go to letter a as other examples on here if we pull a pale a Which has no last name is shown on the red. It's just straight up pale That'll go to letter P and same goes for each year old name are etc. Remember junior does not count as the last name and get car Anthony Towns would go to a as an example since Anthony Towns is part of the last name together so Here we go dice roller customer names Dan down a Danny and there's the letters good luck guys roll We got ourselves a six and a two eight times. Good luck one two three four five six seven eight Anok down to Branson eight times one two three four five six seven eight times eight times C down to R All right knock you have C Brian with M down with F Danny with I Aaron with H Gretchen with O Brian Frank with N Danny with K Josh Melton with P day with W Aaron Pettit with B Logan will with J I'll brenton with S and knock with G Brian Frank with E Nick with T Logan with a dating with UD Brian with L Ferguson that is and then brenton with R. So if anybody wants to trade letters, I'll give you guys a quick minute All right, I'm assuming no treats All right you guys so good luck. So we only have two more envelopes. So number four is already on the website That'll be the last one. Let's open this up really quick Two more envelopes left guys either two or three Of the last two Let's close it up Let's see which one we're gonna use here guys two or three. Let's generate a number two or three one now Two all right Go to number three of you for the last one.  Well, look at that 16 by 20 Muhammad Ali Day to birth there Greatest of all time Muhammad Ali was the first boxer to win a heavyweight championship three about a championship about three times Corrector included 61 wins 56 by knockout to only look five losses Ali won the Olympic gold medal in 1960 Rome summer games as well. That is awesome So I think Muhammad Ali was like a perfect example in our thing right Ali would go to Spot a first letter of last name Logan man. It's Logan even awake. He's not even watching right now There you go. You get a Muhammad Ali man. Sweet.  So potentially still get some nice stuff here. We only have one more envelope left It's on the website guys number four. Let's get it going. Jasper's case breaks.com


What's up everybody? Jason here for jaskiescasebase.com. We just filled up a team filler for mosaic picketing number two With a guaranteed team or a box, which is the $800 top valued prize So there's 16 spots we sold guys will take all the 16 customer names and randomize them only and they will match them Up with the list below number one on the randomizer get to hobby box and mosaic ship sealed Which is the $800 plus value number two gets the Lakers, which I believe we're closer to 300 mavericks for over 200 kings over 200 and all the way down of course to the jazz here. So everybody is guaranteed a team We did sell some teams of filler style with a little pack filler So a lot of these customers here from Terry down in Mallory only paid I think 40 bucks to get into this break and won those spots. So there you go guys Let's collect the dice roller and it is a full 12 full 12 We'll match you up with this list here guys once we are done with the randomizer So it's a one two three four five six seven eight nine ten eleven and 12th and final time boom 12 times Brett at the top so you won't be in the break, but you are gonna get a box ship sealed Which again is a great value for a hundred and fifty five bucks and you bought a spot straight up So definitely good come up right there Let's get these here like this. So again, Brad, you're gonna get a box ship sealed James. Congratulations Your free spot in the pack filler got you the top prize in the Picker teams Which was the Lakers so there you go and Mallory. Wow, you got them as well You're in the same situation Josh. You have the Kings. That was a $200 team very nice Mallory with the pistons. It is pretty much breaking even right there and you got that in the pack filler James you're afraid of straight-up follows the Celtics George last one with your calves Heat for Brandon Andrew Thunder Craig Spurs Josh with the Wizards Brian Crouch with the Suns Terry with the Nuggets Sean Maddock with the Rockets John with the Blazers and Russell You got the Jazz so even Russell at the bottom that did the Jazz were like 40 bucks So kind of break even on the pack filler price so not too shabby there guys will really appreciate it guys So coming up next is the break itself and we will start picking number two in a separate video. Thank you


Okay Okay Here Hello, everyone. Oh gosh, okay Okay so Hi, um, my name is Shannon Bosch. That's my father over there But I'm gonna be talking a little bit about a few things but before I get started I'll talk a little bit. You can I'll tell you about me This is my incredible family Very happy without them. I would not be here And this is a little bit more about me. I love reading music. I actually love making PowerPoint presentations So I hope you like this one. It was a lot of fun to make and I like social media and coding Which brings me to my first point of sometimes instead of using apps. I draw them now Please excuse my drawing I was just give you a little bit of background. That's probably two hours into scrolling through Instagram and I realized that It was kind of cool how Each page and only a few buttons that connect the page have kind of consumed lots of hours in my lifetime so I just draw like the very fundamental pages and that kind of got me thinking of just the basic foundations of all apps that I've kind of used Which brings me to I was kind of drawing some other things and I decided to put those pictures into Into powerpoint and then I hyperlinked the buttons To the buttons which they would go to and then I I kind of discovered how With enough of those rough drafts and with enough hyperlinks you can kind of make A very rough draft of any application that you kind of have ever dreamed of so Moving on about a few weeks ago. I was a helper at a girl code workshop at n us and it was a really really cool Experience I met a lot of new people we had about 65 girls come And the whole point of it was we're just trying to give them an intro into computer programming mostly python But my part in it was I had from the beginning I asked them to Take something that was in their mind I feel like that's a very important part of just making anything so First of all we had like lots of incredible colorful papers Markers just letting their creativity run wild and we just asked them To draw something they were interested in and that's it And then after that we asked to think of something how they could take what they were interested in and use Programming actually make something up it and there was no computers around We just asked them to draw what they would make so as you can see here Someone drew like this video game maze someone else drew like a pet rock app health thing I think and just really fun stuff and not only were they able to Draw things that they could make but they were also able to learn a little bit about the basics of programming Using code combat which is something I really recommend. It's very fun And it was just a really cool time And throughout the whole experience I was thinking of all of these girls and what they were making and I kind of Had a little bit of spark of creativity as well. So when I got home that night I drew this and it's very basic, but I am a huge Bookworm you could say so I love Percy Jackson. So I'm just yeah So this app was pretty much my idea of having character images And then when you pressed when fans could press like a button You would up the vote for the person you wanted to go on a specific quest And so I took this idea and I decided it would be really cool if I used just the Programming coding skills that I know and actually tried to take this drawing this prototype And actually make it into something usable that I could share with other people So this is some initial html that I did in a website very basic I had like the title some buttons I put some images in the buttons and then I just put random numbers The buttons just to kind of give myself an idea of what I wanted it to look like But of course I couldn't do as much as I wanted with html So then I decided to add view which is kind of the title I'm in love with the shape of view which is the word play but anyways So I created that and then I added the element property And then I referenced the element that I wanted to enhance as you can see here the arrow And then I decided to add counter. So this would be kind of my form of what I wanted to do to change the Ability of my buttons to actually function, which is mainly what I want to focus on So I decided to replace the numbers next to my buttons with counter into curly braces And I just came up with a very random number 22 But as cool as it was There was nothing that happened after I pushed my button So I decided to add add click inside my button element And that way it would reference and whenever I click the button the number would go up So I was getting closer, but it was not quite there yet So I decided to add even more counters for my different buttons to reference different counters So I had one two and three as you can see here And this is pretty much what I wanted and it's I think Using what I had I was just very very happy with it And then I realized I didn't need actually I didn't need the button element So I just put all my stuff into the image element as you can see here But once I had that I I was able to actually Take what I had and share with other people and was I was able to actually take my first image of my very prototype on a note Low card and I was able to also show people my app and say this is how I got from here to here And so I showed to a few people and I got incredible feedback about like reset buttons for the voting if it would be possible to see Who's leading in the voting and all that but throughout this whole process I just thought it was really cool how if you can tell someone that they can make whatever they imagine Just by drawing something on a piece of paper That's an incredible amount of power and no matter if you're really great at coding Or if you have a little bit of coding experience or at all. I think that it's important to tell people That no matter kind of where they're at if they can do enough of those papers And if they can show enough people what they're planning to do Some way they can achieve what they were intending to achieve So that's all I hope you learned something or it was entertaining for you. My name is Shannon I am your future intern And uh live longer prosper. Thank you All right, that's going to be hard to follow but um I'll try and be half as much cute and we'll see how it goes Who who am I kidding? I've got no prayer Okay, let's see All right, so um When shan was going to do that I thought it would be good to maybe share the the other side of things that that I run into So I'm a university professor and I've taught a lot of courses where we prototype designs and come up with new ideas I lead a development team that's always trying to move sort of larger applications forward And one of the things that I really want to encourage people is exactly that just go draw on a piece of paper In fact draw me two versions go show it to five people And then come back and tell me why you like version one instead of version two That's much more productive usually than hey prop. I have an opinion. This is better. Let's let's change it But when you do that you do get some code that um It's it's it's very variable. It's very different than what I might design It's very different from what I would expect my uh my software engineers to design So what I want to do is walk through why I like view as well I've done a lot of angular. I've done a lot of react and I too am in love with the shape of view It's it's just been easier for me to do a lot of things than I used to So I'm going to walk you through sort of what it's like for me trying to refactor an app It's a wonderful app. I love it Shannon. It's exactly what it was supposed to be But now I'm going to try and make it a little bit more Software engineering if you will so typically what we do is Software engineers as architects as computer scientists We make things more and more complex until no one else can understand it And then they have to pay us more money Because no no one year's two year out of university person can do it You know what I mean? We do this we have our own reasons But all they need to know is only we can understand it So first of all I want to get that javascript out of my html page And I'm going to take all the javascript that was here Shannon did a nice one page app about 15 lines of code work just fine I'm going to take that I'm going to put it over in main.js Mainly so that I have my my javascript in one place and so I can go do some test driven development with it Then I'm actually going to go ahead and just export The default app this is just I'm just trying to show you what I do very quickly when I'm trying to get my Hands around designs and I don't know what I don't know yet So I'm just going to export that And then over here in the html page I've replaced where Shannon had all of her her stuff inside the javascript tags I've replaced it with a reference to main.js everybody got that cool show hands who in here has played with view before Who in here has never written any view code? Excellent. Oh, okay excellent. So you guys will enjoy this. I hope All right, so everything else is the same as Shannon's except I replaced that Now I want to go off and I want to do test driven development So I have a lot of engineers asked me why do I bother writing tests after the app is already written And I always tell them because I'm usually going to want to change stuff I'm going to do this fancy thing called refactoring and when I start changing things I'm going to break stuff and I want to know when I broke something Because if I don't know that I broke something then I'm afraid to change something because I won't know if I broke anything And if you've done a lot of worked on a lot of big projects, this makes a lot of sense to you So I'm going to go write some tests Just to sort of then I'll sort of show you how I start writing the test first and then how I rearchitect the design So just a simple that you know test. I'm going to import view. I'm going to import the code the javascript from main I'm going to describe one test and here. I'm just going to start with a failing test expect one to equal to One's not going to equal to and so I'm going to get a failing test Depending on what framework you use but in this environment I'll have a nice place that I can go down and and see that I expected the value to be two But I received one of course that's wrong So we always make our tests fail first for the main reason that we want to make sure our test works For test never fails. It's not really a test It's just you feeling like you did something that you didn't do So now we're going to change the two to a one and now all of our tests fail. I love all green Green is a color you love to you learn to love if you do a lot of unit testing Because every time it's green. It's like, yes, awesome. I accomplished something time to go get a coffee time to uh, You know go go do whatever I do to take a break before I dive right back in All right, so that works So now we're going to try and make it a little bit more real We're going to go expect app dot counter one the counter that shannon Created we're going to expect it to equal one But we expected one and we got zero Because it start it turns out that the counter starts with zero So I changed that to zero and now it's passing So now at this point if I ever break counter one or I change the default for counter one My tests will fail and I'll be reminded to do that If you have a hundred features in your app, which happens very quickly that there's a hundred things that could go wrong It's nice having these little tests because you you end up break You don't know which one of the hundred things you're going to randomly break All right And so then I said let's just go check all of our counters because she had four of them They come all equal to zero yay all tests are passing All right So let's say let's go add something new All right, so I wanted to share a little bit about you So I decided to add one more thing that wasn't a shannon's design. This is going to be called counter total and what counter total is supposed to do It's just supposed to add up all the counters all the votes for the four different characters All right, so I say make app counter total equals zero And I get an error because there's nothing called counter total. It doesn't exist in the javascript code It's undefined. So first we need to fix that So we go back to view where we had our data And I'm just going to add a new property here counter total in my object make it 99 And now I'm still failing all that's cut off the slide instead of zero now. I'm getting 99 So I go change it to zero my zeros match all my tests are passing right feel like a magician, you know all green okay So then what we want to do is when we want to figure out How are we going to be tracking when any of the counters actually change if um If the total counter is changing and what I noticed very quickly when I got to this point that if I was running the app I was getting six. I was like, where's the six coming from? Well, one of the things if you have a whole lot of tests and they're all like Incrementing your counters or setting values if you don't reset your starting values to zero before every test You'll end up with these type of errors So typically what we do is we reset our state before we run our tests And we do that before every test. So we have a deterministic type of result So here my counters, you know, we're all supposed to be a zero And so what i'm going to do here is i'm going to increment my counters This time and so what i'm going to do is call app counter plus plus which is the same code That uh shannon's code was doing when she pressed the button And so I should be able to say hey Counter total should be zero when I increment one counter the counter total should equal one And it doesn't Because i've not written the logic yet That adds up all the separate counters and puts them into counter total So I could figure out how to watch the different counter values and go add things up whenever anything changes But one of the nice things about view that um, I just found out accidentally when uh, when messing around with it Is you just get this built-in thing called computed so rather than just your data that stores everything You can create a computed value And and then for that same variable name give it a function And every time the things that make up this function change, they're all watched This thing gets re executed and you have a new value for computed All right, so I didn't really have to write any code other than to say when I ask for counter total I want the result of counter one plus counter two plus counter three plus counter four these four counters Make sense All right. Awesome. So I've computed so no more that me having to write the code to um, just you know, uh Manually add up things and keep track of them when they change view is going to do all that for me. All right, so that's fun All right, and then um Now I come in here and before I had this code here where I'm I'm adding one to a counter Then another then another then another and now I've got my counter total. I want to make sure it equals Four, but before I make the test pass. I'm going to make it fail. So I put one in there says I got one I expected four Good. That's what you were supposed to do test I I change it to four all green. Yay okay, all right Um people do unit testing for a living.  But if you don't do testing this is this is actually what it looks like it goes pretty fast and it's make it fail Make it pass make it fail make it pass All right Now that we've got this counter total not only can we use it in our java script code Since we're doing view we can go back into our html and anywhere we want we can stick in this computed value All right, and so what I've done here is I've just made another header tag Said counter total equals votes and now whatever the total of all the counters are that's going to be our number of votes across all the characters all right now increment encounter so rather than just Hardcoding the counter plus plus inside the html. I want to pull that out into a method So I'm going to call the method increment counter It doesn't exist initially. So I get this nice error Tells me what to go do next which is go create a new method And so in right below computed I've added another section view lets you add things called methods Which are exactly what you think they are their methods that you then are going to use that you can call from other methods Or from your html. All right Now the other thing is A lot of you in here if you're if you're super coders you're used to changing nine things at once I do this all the time over the years though I have learned if I try and change six things at once it is exhausting to me I'm having to keep track of it. I have a little notepad to my right where I'm saying don't forget to do this this this You broke these five things check them off when you're done Uh, I still do that at times when I'm just hacking around trying to get things done But there is something that makes it more fun if you go step by step Fix one thing at a time add one test a break it picks it. So we make our function And then we're going to go in our function fails now. It's always returning zero We're going to come in and say hey when we when we run this we actually want to increment counter one all tests are passing Yay Time to time to break something again. Okay All right Also now up here instead of doing counter plus counter one plus plus in the html I've replaced that with this increment counter function All right, same thing All right now about this time I'm starting to realize that you know what Uh, I don't want to have four different counters. I'm going to go have to Replace I'm going to have to go rewrite that increment counter method four times if I write write a separate increment counter You know Function for every single counter so to set right now. It's time to do some heavy-duty refactoring So instead of having individual variables for my counters I'm going to go up and I'm going to create something called counters plural And it's just going to have to start off being an array of you know Four zeros so these are going to be my counters at index zero one two and three and I'm going to use that to replace the counter variables All right, so here it here is in my data. I add it right here the moment I stopped typing for a second My environment notices that it's time to run my tests again. They run it and I see all green All right, there's something something like that. Sometimes I find I'm trying to type just fast enough So because I know as soon as I stop it's going to run my tests and they're going to fail again But if I get that last bracket written, uh, it'll it'll be all green Okay, all right And then uh from there, let's just keep making it more complex, right? So it's harder for hr to hire someone to work on this app So now instead of calling counter one and counter two I'm going to replace the counter one with counters and index zero the first You know number that's in that javascript array All right Now this is uh one of the places where when I was playing with view I came across a newbie error You know, I ran it to the issue. I said, what in the world is that? Why is this not working? I did like you did I went over to google pasted the error into google and then google led me to this page on the documents Hey newbie. Here's what you guys don't realize how things work Whole lot of code But the main thing to say is view is going to do its best to update things whenever your data changes Except if it's in an array, it's not going to look inside your arrays at every single index item Uh, I actually got around this issue at one point by when it wasn't updating. I said, you know, what's easy to do I'll just add something to my array and then I'll pop it off So in my initial view code when I was playing around it was like push one pop one or push one pop You know nothing, uh, and then I finally got around to figuring out what I was doing And and the main thing is is we're just going to use this array splice Rather than this um array zero equals value and that's going to do enough of a mutation that view will notice it And then they'll they'll recalculate all of our values All right, so that's what this is we've changed increment counter from just being this that counter zero plus plus to actually being um Find the new value and then go splice it in uh to the array And the main reason we're just doing it the harder way this way is so we get the uh responsiveness from from view All right. Well, all that's working pretty well except When I start switching to this all my code is breaking It just seems like that would be just fine, but I just changed my increment counter button It's no longer, you know working the right way. I get some failing tests So I go off and I just start changing a lot of things. I'll jump ahead a little bit here since uh I want to leave a little bit of time for questions, uh, but eventually we have all of our counters and everything's passing again All right, and then what I want to do for finding my total is I don't want to add up counter one two three four and five I came in here and I said, you know what? I'm just going to reduce this list of counters by adding them all together Accumulating them and then returning that as my counter total If you've never got around to learning how map and reduce work in javascript. I highly recommend you do it They're awesome. They're powerful It and once you do it you'll be able to read things like this This pops up more and more in people's code They like using reduce and if you're not used to what reduce is doing It'll at least it makes a lot of my students tilt their head sideways and squint a good bit All right Um, and so now we just we don't really want all all these counters anymore What we'd like to do is that same increment counter, but we'd like it to work for all of these So what we're going to have to do is we're going to have to pass an index in uh to our counter So we're going to start replacing increment counter with increment the zero counter the first counter the second counter The third counter and that's going to end up making all of our tests pass again. All right And so this is just an example of how I do A lot of refactoring in view going from things that are a lot of duplicate code And trying to replace them with things that are just a little bit more efficient So now on increment counter this is where we pass in the index for one update And this is how we're actually updating the values this dot counters of whatever our index is Add one two All right, and um Jump ahead a little bit here. So I had all that working next thing in our html We're going to use increment counter. We have to replace all these counter plus pluses with this increment counter magic And that's what we're going to do Get our counters working get our increment counter show the counter that's in the array and After we do that our view code is a lot simpler. It's small So literally the whole thing to make the app work all that stuff showed you ends up just being about 18 lines of a Uncommented code. We just have our counters We just have the counter total which adds up the value of the counters to give us our votes And then we just have this increment counter value that as long as you pass at the index it will update The correct counter. All right, so at that point. I'm like it's a good place to stop That feels good. My code is uh, it's nice and dry.  That looks like a lot of duplicate code as well. That all looks the same. The only thing different is the urls to the images Hey, maybe if I could pull those urls out I could put those urls in an array and then make all these images look a little bit more similar And so then if I do that I can just create one loop. So this is my last view thing. I'll show you there's this v4 And you can do for x in urls But if you if you wrap that in parentheses and do common index You can get both the current item as the urls as you're looping through them And you can get the index the 0 the 1 the 2 the 3 and this is my quick hack That's how I get the number the the index that I want to use for increment encounters All right. And so now I've got down to my nice 20 It's actually 20 lines. I think if you take out the spaces but of dry html code and I've got my dry JavaScript code and and dry generally means do not repeat yourself And if you can ever keep from repeating yourself, it will reduce your bugs over time Trust me or don't trust me. That's fine But what'll happen is if you don't reduce your duplicate code one day, you'll have to change something You'll change it in one place. You won't change it in the other and you'll leave a bug behind Right or somebody will be designing a client to work with your code And they'll look at one copy and they won't notice that the other copy is done a little bit differently All right So that's why going through all this now. I have some dry code. It feels much more engineering Appropriate for me And I know if I come back to this in six months after I've forgotten what it does I'll be able to glance at that code just have a few lines of code and remember what was going on And with that I'm going to invite Shannon back up for questions. Thank you Any questions drawing prototyping Spiring the women of tomorrow refactoring Yes I like just just just seems to work Uh, I like suggest is what the facebook guys have built into react It works mostly out of the box with a view. I haven't played enough with the View specific ones yet and I like just because I can do code coverage very easily And uh, sometimes I like to just look at a code base and go how covered is it? Is it 10% or is it 50% so um And just works well for my command line It works really well from this code sandbox. Oh, I oh environment without me doing anything So, uh, it could be it's the path of least resistance But it's also just done most of the things I wanted to do I've I've not really looked up, you know, it's very basic The very basic stuff there, you know, is it's pretty much what I'm using. Yeah Any other questions? All right, excellent.  Excellent next speaker


Want to learn about stocks, cryptocurrencies, NFTs, and the metaverse? Join RichTV.io. Hey guys, how you doing? This is Rich from RichTV Live. Everywhere I go, everyone asks me, Rich, what's the number one pick that you would suggest to investors? Now there's a lot of different picks that we talk about every day. I personally am invested in a lot of different companies, but one of the companies that I think has incredible potential is Neobattery Materials. They are now expanding into the United States. They're about to do an investor conference. They have huge, huge, huge news. Seems as though they continue to bring up great news on a consistent basis. I believe that they have a chance to be a huge winner in 2023 and beyond. And we're gonna talk about it right here, right now, exclusively on RichTV Live. Don't touch that dial. Remember, if you like these videos, smash the like button, comment down below, share the video everywhere, and subscribe without any further ado. Let's get into it a little bit further. Neobattery Materials, the symbol in Canada NBM, the symbol in America NBMFF. Let's take a look right here, right now, at Neobattery Materials. All right, so I wanna give you a big update on everything that's happening with Neobattery Materials. First and foremost, Vancouver-based startup Neobattery Materials is expanding into the United States. This is huge news. A Vancouver-based lithium-ion battery materials company had just reported that they have expanded into the United States to pursue business opportunities there as well as opening manufacturing plant. This is Neobattery Materials Limited, a low-cost silicon anode materials developer building longer-running, rapid-charging lithium-ion batteries. The new US subsidiary is called Neobattery Materials America, LLC, NBM America. Last week, Neil reported that it has successfully incorporated Neobattery Materials America, LLC under the provisions and requirements of the state of Delaware as a wholly-owned and operated subsidiary. NBM America will now allow active and aggressive business development and relationship-building initiatives to market Neil's core silicon anode materials in the United States. The management team is expected to visit Ohio and Kentucky in late March and early April to select the site for operation. The agenda involves building and strengthening business relationships with EV, battery, industry players, and governmental organizations that include the Ohio Economic Development Association, Jobs Ohio, and Ready Cincinnati. NBM America intends to secure strategic capital and funding to enable US commercial plant construction and create financial capacity for silicon waste recycling and other battery-related value-added products. Neil's goal is to become a silicon anode active materials supplier to the electric vehicle industry. And you know we love electric vehicles and we're a big fan of Neil Battery Materials. Once again, this is their website, neobatterymaterials.com You can see the symbol in the right corner in Canada on the Toronto Stock Venture Exchange, on the symbol NBM, and in America on the OTCQX Exchange under the symbol NBMFF. All right, the next piece of news that everyone needs to be aware of is Neil Battery Materials will be participating in the Electric Vehicle and Autotech Virtual Conference presented by Maxim Group and hosted by M-Vest on March 30th. So put that on your calendar. March 30th, Neil Battery Materials, a low-cost silicon anode materials developer that enables longer running, rapid-charging lithium-ion batteries, announces that Chief Executive Officer, Spencer Huh, and Corporate Development Manager, Danny Huh, will participate in the Electric Vehicle and Autotech Virtual Conference presented by Maxim Group and hosted by M-Vest on Thursday, March 30th, 2023. Now this is their website, neobatterymaterials.com. You can see right here the NBM Korea Current Developments, South Korea Silicon Anode Commercial Plant Construction and the new commercial plants can do 240 tons per year. So huge increase, 24 times increase for optimization and positive results, target completion for the first half of 2024. So we're not far away anymore. The presentation will be participated on March 30th, 2023 at 10 a.m. Eastern, the ongoing adoption of electric vehicles, more technology in automobiles and later and more efficient batteries can create opportunities for companies in many sectors. Executives involved in different parts of the electric vehicles and Autotech markets will discuss future opportunities and sector changes. This conference will be live on M-Vest to attend. Just sign up to become an M-Vest member.  And then once you click on news, it'll give you all the latest news right here on the website. And you can see here all the latest news and on March 17th, this is the news, click on that. And then that will give you a link. When you go down on the news, you can literally click on the link right here to reserve your seats and learn more about the conference right in the news. All right, so that's the news as far as the investor conference on March 30th, on Thursday, March 30th, 2023 at 10 a.m. Eastern. And don't forget the symbol for Neobattery Materials in Canada on the Toronto Stock Venture Exchange as NBM in America on the OTCQB Exchange NBMFF. All right, so there's some more news that just came out on March 22nd, and we're gonna take a look at the news release right here. Neobattery Materials provides South Korean commercial plant and corporate update. So some of the key points of this press release in discussions with three contractors for RFQ in two weeks and we'll select the best contractor based on critical procurement factors, additional materials evaluation with further enhanced silicon anodes and three US based battery cell manufacturers, including a solid state battery developer engage with working partners to carry forward collaborative ventures in domestic and international markets. And in the final stages of securing prominent US, BC Venture Capital, Clean Tech and Battery Funds for long-term reliable and value enhancing strategic investment. So lots of news happening here with Neobattery Materials. That's why everyone needs to put it on their radar and on their watch list. Now, I always like to take a look at everything that's happening with these companies. I always like to look at the stock and the share structure. So right now NBM, FF in America, NBM in Canada just looking at both stocks. You can see right here Neobattery Materials so far in 2023 has done amazing. It started off at around 17 cents in January of 2023, hit a high of 50, that's a 200% gainer and investors took profits as they should when you're up 200%. And right now it's sitting right around 31 cents. So it's up almost 100% right now on the year and it's just getting started. So I think it's one that everybody needs to be aware of. This is their US symbol and we're gonna mark the high high in the low low. So the high high in America is 36 cents. So far in 2023, the low low is 9 cents and we're currently sitting at 20 cents. And if you zoom in you can see we're kind of in the middle of the Fibonacci's trading just above the moving averages. So literally right on the moving averages. So it's kind of in the middle of where it's been as far as high high low low. We believe that there's a lot of upsides from here but obviously as an investor you always wanna know where the low zone is, the high zone and try to bite on dips if you're trying to get into the stock. Now I must remind you that Rich TV Live is strictly for information and education purposes.  Now when you go to their website neobatterymaterials.com for those who have missed the January 2023 webinar all you gotta do is click on the link below, subscribe to their channel for more updates on neobattery materials, okay? And from there you go into the website and you're gonna get tons of information about the company and on the right hand side you can actually see all of their social media. Feel free to go and follow them on social media. You can follow them on their Twitter, their YouTube and their LinkedIn, okay? Now neobattery materials is disrupting the lithium ion battery industry with silicon anode materials. You scroll down, you can see all of their latest news and then if you continue to scroll down you can see some information about neobattery materials. Now to give you some info on the company I think this is a company that has a lot of potential and I think that electric vehicles are one of the fastest growing industries in the world but one of the problems that electric vehicles has is battery life. So neobattery materials is one of the companies that is trying to enhance the battery life. Silicon anode solution for EV batteries is what neobattery materials is really focusing on. They are really disrupting the lithium ion battery world, okay? And they are focused on silicon materials for lithium ion batteries in electric vehicles. The company is looking to develop silicon anode materials through NBM side, okay? Which is trademarked through proprietary nano-coding layers to transform the anode material space for the EV industry. The energy density of a lithium ion battery is highly dependent on anode material integrating silicon with graphite in the anode can increase battery storage capacity by nine to 10 times. That is a game changer as well as help reduce battery costs and increase charging speed. So this is why so many people are messaging me for literally all over the world asking me about neobattery materials. And despite the company's strong ties to South Korea where neobattery materials will initially invest 24 billion KRW or approximately 25 million Canadian to support the construction and expansion of a silicon anode commercial plant, they are more recently focused on expansion in the United States, which I talked to you about earlier. In January, Neo announced it was establishing NBM America Limited, and you can see here making a big shift in battery technology. And in the United States, a US subsidiary, NBM America will achieve seek US expansion opportunities that include the company's core silicon anode business and any new projects in the battery materials space. So a lot of big news and a lot of updates and upgrades happening on a consistent basis with Neo battery materials. This subsidiary will allow closer interaction with US based parties that are currently under non-disclosure agreements and DA's expedite business and collaborative activities. It is also anticipated that NBM America will be able to secure funding opportunities from state level programs and federal liberal initiatives that include the inflation reduction act and department of energy funding. The subsidiary will also target accessing the large pool of US venture capital funding and focuses on clean tech, thematic investing and strengthening EV, electric vehicle infrastructure assuming those targeted companies are not tangled up with the collapse of Silicon Valley Bank, SVB. So they're obviously very aware of everything that's happening on a global scale and they are trying to get the right partners to help them continue to move forward in expanding into America. NDAs and LOIs are driving potential commercial relationships. We've talked about a lot of the news that's coming, the NDAs that are coming, the LOIs that are coming, which are letters of intent. And you can see here, Neo Silicon and Nanocoding Technology right here. And pursuing the strategic appear and this strategy appears to be paying off because by the end of February, Neo Battery Materials was announcing it had signed five additional NDAs non-disclosure agreements in the EV battery industry including a US-based investment bank and a private equity firm. The company also further elaborated on its US aspirations, stating that they plan to establish an R&D research and development center to manufacture Silicon anode samples for North American value manufacturers. That's so big. To expedite the timeline for joint venture opportunities, this facility will improve logistical efficiency by reducing the time between material evaluation and optimization. A week later, Neo issued a press release that it had signed a letter of intent, LOI, with a developer of robust durable polymer electrolytes for Silicon anode optimization with a spin out company from a top US university. The LOI will jointly explore opportunities to integrate the come to parts, polymer electrolyte technology into Neo's Silicon anode system to improve performance by effectively controlling the Silicon Valley volume expansion issue. Additionally, the non-flammable nature of polymer electrolytes can provide increased safety improvements as opposed to conventional liquid electrolytes preventing the risk of battery fires and explosions although it has been a while since I've seen a video of Tesla burning on the side of the road. So jump ahead to this week and Neo has confirmed plans to do a tour of various locations in the United States. The company announced that management is expected to visit Ohio and Kentucky in late March and early April to select the site for the US headquarters location which I touched on earlier. The management team and key advisors also plan to visit New York City to hold meetings with prominent clean tech VCs, venture capitalists and investment banking firms. So a lot of big things happening with Neo battery materials. This is the Neo battery materials focus on increasing charging speed and storage capacity with a nano-coded Silicon anode. This is why I believe these guys have a chance to be game changing. My final thoughts are that Neo battery materials has some pretty ambitious plans but if those NDAs, those non-disclosure agreements and LOIs, letters of intent start leading to real deals that get closed I think they're gonna need both of their facilities in Korea and the United States to keep up with the business which means this could be very explosive and we're still early in the game with this company. So, you know, put it on your watch list, put on your radar, do not forget to watch them. I'm gonna show you some of the different areas. Look at this, boosting energy density and significantly increasing battery life cycle. This is where I believe they are a game changer and 70 to 80% higher initial energy capacity compared to their competitors. This is where I believe they are extremely unique, okay? And getting funding from big clean tech firms in the United States will also support the build out in the United States and top up the Treasury which was sitting at around $2 million Canadian of working capital as of November 30th, 2022. The company currently trades at a baby market cap of only 30 million. I believe that that could grow exponentially if these NDAs and LOIs started to actually close. So, really, really exciting. Now, always important to follow these companies on social media, keep up with all of their news, keep up with everything that's happening. This is their YouTube page, NeobatterMaterialsLimited. Make sure you subscribe on their YouTube. This is their Twitter page. Make sure you're following all of their updates on Twitter. This is their LinkedIn. Make sure you're following everything that is happening on their LinkedIn. Thank you guys for watching. If you're not winning, you're probably not watching. We bring you the winners. We bring you the news. We bring you CEO interviews, analysis. We love to identify undervalued, underappreciated, underexposed, early stage companies first. We believe Neo, Battery Materials falls into that place, into that category. As you can see, huge potential here. And I believe they're just getting started. Thank you for watching, everybody. It's your host of the most, your boy Rich from Rich To Be Live, bringing you Neo, Battery Materials. Once again, the symbol in Canada, N-B-M. The symbol in America, N-B-M-F-F. Put it on your radar, put it on your watch list. And if you like these videos, smash the like button, comment on the video. Let me know what you think. If you have any questions, please comment on the video. It's your host of the most, your boy Rich from Rich To Be Live saying, have a nice day, everyone. We'll see you soon.