Thursday, 5 May 2016

Script to create CAPTCHA in PHP


CAPTCHA stands for “Completely Automated Public Turing test to tell Computers and Humans Apart”, it’s very common functionality to use at the time of submit data to prevent machines access of your website. In this post we will developed CAPTCHA script suing PHP with help of easy three steps.This is very basic captcha which is generated by PHP.

Following files will use in this Captcha Example

catpcha.jpg – A Image for catcha
captcha.php – This file is use to generate captcha with PHP using PHP session.
index.php – This file is use to show captcha image to end user.




























Step 1








This image will used to generate captcha image using PHP GD library.This is a only dependency(GD library)


Step 2


We need to create a new file captcha.php
copy the code below in captcha.php



<span class="php"><span class="php-script-tag">&lt;?php</span>  
<span class="php-function">session_start</span><span class="php-brackets">(</span><span class="php-brackets">)</span>;  
<span class="php-function">header</span><span class="php-brackets">(</span><span class="php-string">"Expires: Mon, 26 Jul 1997 05:00:00 GMT"</span><span class="php-brackets">)</span>;   
<span class="php-function">header</span><span class="php-brackets">(</span><span class="php-string">"Last-Modified: "</span> <span class="php-operator">.</span> <span class="php-function">gmdate</span><span class="php-brackets">(</span><span class="php-string">"D, d M Y H:i:s"</span><span class="php-brackets">)</span> <span class="php-operator">.</span> <span class="php-string">" GMT"</span><span class="php-brackets">)</span>;   
<span class="php-function">header</span><span class="php-brackets">(</span><span class="php-string">"Cache-Control: no-store, no-cache, must-revalidate"</span><span class="php-brackets">)</span>;   
<span class="php-function">header</span><span class="php-brackets">(</span><span class="php-string">"Cache-Control: post-check=0, pre-check=0"</span>, <span class="php-keyword">false</span><span class="php-brackets">)</span>;  
<span class="php-function">header</span><span class="php-brackets">(</span><span class="php-string">"Pragma: no-cache"</span><span class="php-brackets">)</span>;   
  
<span class="php-function">function</span> _generateRandom<span class="php-brackets">(</span><span class="php-var">$length</span><span class="php-operator">=</span><span class="php-number">6</span><span class="php-brackets">)</span>  
<span class="php-brackets">{</span>  
    <span class="php-var">$_rand_src</span> <span class="php-operator">=</span> <span class="php-keyword">array</span><span class="php-brackets">(</span>  
        <span class="php-keyword">array</span><span class="php-brackets">(</span><span class="php-number">4</span><span class="php-number">8</span>,<span class="php-number">5</span><span class="php-number">7</span><span class="php-brackets">)</span> <span class="php-comment">//digits  </span>
        , <span class="php-keyword">array</span><span class="php-brackets">(</span><span class="php-number">9</span><span class="php-number">7</span>,<span class="php-number">1</span><span class="php-number">2</span><span class="php-number">2</span><span class="php-brackets">)</span> <span class="php-comment">//lowercase chars  </span>
<span class="php-comment">//      , array(65,90) //uppercase chars  </span>
    <span class="php-brackets">)</span>;  
    <span class="php-function">srand</span> <span class="php-brackets">(</span><span class="php-brackets">(</span>double<span class="php-brackets">)</span> <span class="php-function">microtime</span><span class="php-brackets">(</span><span class="php-brackets">)</span> <span class="php-operator">*</span> <span class="php-number">1</span><span class="php-number">0</span><span class="php-number">0</span><span class="php-number">0</span><span class="php-number">0</span><span class="php-number">0</span><span class="php-number">0</span><span class="php-brackets">)</span>;  
    <span class="php-var">$random_string</span> <span class="php-operator">=</span> <span class="php-string">""</span>;  
    <span class="php-keyword">for</span><span class="php-brackets">(</span><span class="php-var">$i</span><span class="php-operator">=</span><span class="php-number">0</span>;<span class="php-var">$i</span><span class="php-operator">&lt;</span><span class="php-var">$length</span>;<span class="php-var">$i</span><span class="php-operator">+</span><span class="php-operator">+</span><span class="php-brackets">)</span><span class="php-brackets">{</span>  
        <span class="php-var">$i1</span><span class="php-operator">=</span><span class="php-function">rand</span><span class="php-brackets">(</span><span class="php-number">0</span>,<span class="php-function">sizeof</span><span class="php-brackets">(</span><span class="php-var">$_rand_src</span><span class="php-brackets">)</span><span class="php-operator">-</span><span class="php-number">1</span><span class="php-brackets">)</span>;  
        <span class="php-var">$random_string</span> <span class="php-operator">.</span><span class="php-operator">=</span> <span class="php-function">chr</span><span class="php-brackets">(</span><span class="php-function">rand</span><span class="php-brackets">(</span><span class="php-var">$_rand_src</span><span class="php-brackets">[</span><span class="php-var">$i1</span><span class="php-brackets">]</span><span class="php-brackets">[</span><span class="php-number">0</span><span class="php-brackets">]</span>,<span class="php-var">$_rand_src</span><span class="php-brackets">[</span><span class="php-var">$i1</span><span class="php-brackets">]</span><span class="php-brackets">[</span><span class="php-number">1</span><span class="php-brackets">]</span><span class="php-brackets">)</span><span class="php-brackets">)</span>;  
    <span class="php-brackets">}</span>  
    <span class="php-keyword">return</span> <span class="php-var">$random_string</span>;  
<span class="php-brackets">}</span>  
  
<span class="php-var">$im</span> <span class="php-operator">=</span> @<span class="php-function">imagecreatefromjpeg</span><span class="php-brackets">(</span><span class="php-string">"captcha.jpg"</span><span class="php-brackets">)</span>;   
<span class="php-var">$rand</span> <span class="php-operator">=</span> _generateRandom<span class="php-brackets">(</span><span class="php-number">3</span><span class="php-brackets">)</span>;  
<span class="php-var">$_SESSION</span><span class="php-brackets">[</span><span class="php-string">'captcha'</span><span class="php-brackets">]</span> <span class="php-operator">=</span> <span class="php-var">$rand</span>;  
ImageString<span class="php-brackets">(</span><span class="php-var">$im</span>, <span class="php-number">5</span>, <span class="php-number">2</span>, <span class="php-number">2</span>, <span class="php-var">$rand</span><span class="php-brackets">[</span><span class="php-number">0</span><span class="php-brackets">]</span><span class="php-operator">.</span><span class="php-string">" "</span><span class="php-operator">.</span><span class="php-var">$rand</span><span class="php-brackets">[</span><span class="php-number">1</span><span class="php-brackets">]</span><span class="php-operator">.</span><span class="php-string">" "</span><span class="php-operator">.</span><span class="php-var">$rand</span><span class="php-brackets">[</span><span class="php-number">2</span><span class="php-brackets">]</span><span class="php-operator">.</span><span class="php-string">" "</span>, ImageColorAllocate <span class="php-brackets">(</span><span class="php-var">$im</span>, <span class="php-number">0</span>, <span class="php-number">0</span>, <span class="php-number">0</span><span class="php-brackets">)</span><span class="php-brackets">)</span>;  
<span class="php-var">$rand</span> <span class="php-operator">=</span> _generateRandom<span class="php-brackets">(</span><span class="php-number">3</span><span class="php-brackets">)</span>;  
ImageString<span class="php-brackets">(</span><span class="php-var">$im</span>, <span class="php-number">5</span>, <span class="php-number">2</span>, <span class="php-number">2</span>, <span class="php-string">" "</span><span class="php-operator">.</span><span class="php-var">$rand</span><span class="php-brackets">[</span><span class="php-number">0</span><span class="php-brackets">]</span><span class="php-operator">.</span><span class="php-string">" "</span><span class="php-operator">.</span><span class="php-var">$rand</span><span class="php-brackets">[</span><span class="php-number">1</span><span class="php-brackets">]</span><span class="php-operator">.</span><span class="php-string">" "</span><span class="php-operator">.</span><span class="php-var">$rand</span><span class="php-brackets">[</span><span class="php-number">2</span><span class="php-brackets">]</span>, ImageColorAllocate <span class="php-brackets">(</span><span class="php-var">$im</span>, <span class="php-number">2</span><span class="php-number">5</span><span class="php-number">5</span>, <span class="php-number">0</span>, <span class="php-number">0</span><span class="php-brackets">)</span><span class="php-brackets">)</span>;  
Header <span class="php-brackets">(</span><span class="php-string">'Content-type: image/jpeg'</span><span class="php-brackets">)</span>;  
<span class="php-function">imagejpeg</span><span class="php-brackets">(</span><span class="php-var">$im</span>,NULL,<span class="php-number">1</span><span class="php-number">0</span><span class="php-number">0</span><span class="php-brackets">)</span>;  
ImageDestroy<span class="php-brackets">(</span><span class="php-var">$im</span><span class="php-brackets">)</span>;  
<span class="php-script-tag">?&gt;</span></span>


Step 3

We will create template file index.php
copy the code below in index.php

<span class="php"><span class="php-operator">&lt;</span>div <span class="php-keyword">class</span><span class="php-operator">=</span><span class="php-string">"container"</span><span class="php-operator">&gt;</span>
<span class="php-operator">&lt;</span>h<span class="php-number">1</span><span class="php-operator">&gt;</span>A Simple Example Of PHP CAPTCHA Script<span class="php-operator">&lt;</span><span class="php-operator">/</span>h<span class="php-number">1</span><span class="php-operator">&gt;</span>
<span class="php-script-tag">&lt;?php</span>  
<span class="php-keyword">if</span><span class="php-brackets">(</span><span class="php-keyword">isset</span><span class="php-brackets">(</span><span class="php-var">$_POST</span><span class="php-brackets">[</span><span class="php-string">"captcha"</span><span class="php-brackets">]</span><span class="php-brackets">)</span><span class="php-brackets">)</span>  
<span class="php-keyword">if</span><span class="php-brackets">(</span><span class="php-var">$_SESSION</span><span class="php-brackets">[</span><span class="php-string">"captcha"</span><span class="php-brackets">]</span><span class="php-operator">=</span><span class="php-operator">=</span><span class="php-var">$_POST</span><span class="php-brackets">[</span><span class="php-string">"captcha"</span><span class="php-brackets">]</span><span class="php-brackets">)</span>  
<span class="php-brackets">{</span>  
    <span class="php-comment">//CAPTHCA is valid; proceed the message: save to database, send by e-mail …  </span>
    <span class="php-keyword">echo</span> <span class="php-string">'&lt;div class="alert alert-success"&gt;CAPTHCA is valid; proceed the message&lt;/div&gt;'</span>;  
<span class="php-brackets">}</span>  
<span class="php-keyword">else</span>  
<span class="php-brackets">{</span>  
    <span class="php-keyword">echo</span> <span class="php-string">'&lt;div class="alert alert-danger"&gt;CAPTHCA is not valid; ignore submission&lt;/div&gt;'</span>;  
<span class="php-brackets">}</span>  
<span class="php-script-tag">?&gt;<span class="html">
<span class="html-form-element">&lt;form role=<span class="html-attribute">"form"</span> method=<span class="html-attribute">"post"</span>&gt;</span>
  <span class="html-other-element">&lt;div class=<span class="html-attribute">"form-group"</span>&gt;</span>
    <span class="html-other-element">&lt;label for=<span class="html-attribute">"email"</span>&gt;</span>Email address:<span class="html-other-element">&lt;/label&gt;</span>
    <span class="html-form-element">&lt;input type=<span class="html-attribute">"email"</span> class=<span class="html-attribute">"form-control"</span> id=<span class="html-attribute">"email"</span>&gt;</span>
  <span class="html-other-element">&lt;/div&gt;</span>
  <span class="html-other-element">&lt;div class=<span class="html-attribute">"form-group"</span>&gt;</span>
    <span class="html-other-element">&lt;label for=<span class="html-attribute">"pwd"</span>&gt;</span>Password:<span class="html-other-element">&lt;/label&gt;</span>
    <span class="html-form-element">&lt;input type=<span class="html-attribute">"password"</span> class=<span class="html-attribute">"form-control"</span> id=<span class="html-attribute">"pwd"</span>&gt;</span>
  <span class="html-other-element">&lt;/div&gt;</span>
   <span class="html-other-element">&lt;div class=<span class="html-attribute">"form-group"</span>&gt;</span>
    <span class="html-other-element">&lt;div class=<span class="html-attribute">"col-sm-5 pull-left"</span>&gt;</span><span class="html-other-element">&lt;label for=<span class="html-attribute">"pwd"</span>&gt;</span>Anti Spam code, Please Enter 3 Black Symbols<span class="html-other-element">&lt;/label&gt;</span>
    <span class="html-image-element">&lt;img src=<span class="html-attribute">"captcha.php"</span> alt=<span class="html-attribute">"captcha image"</span>&gt;</span><span class="html-other-element">&lt;/div&gt;</span>
    <span class="html-other-element">&lt;div class=<span class="html-attribute">"col-sm-7 pull-right"</span>&gt;</span><span class="html-form-element">&lt;input type=<span class="html-attribute">"text"</span> name=<span class="html-attribute">"captcha"</span> size=<span class="html-attribute">"3″ maxlength="</span>3″ class=<span class="html-attribute">"form-control"</span>&gt;</span><span class="html-other-element">&lt;/div&gt;</span>
  <span class="html-other-element">&lt;/div&gt;</span>
  <span class="html-other-element">&lt;div class=<span class="html-attribute">"form-group"</span> style=<span class="html-attribute">"<span class="css"><span class="css-property">padding-top<span class="css-selector">:</span><span class="css-value">75px</span></span>;</span>"</span>&gt;</span>
    <span class="html-form-element">&lt;button type=<span class="html-attribute">"submit"</span> class=<span class="html-attribute">"btn btn-primary"</span>&gt;</span>Submit<span class="html-form-element">&lt;/button&gt;</span>
  <span class="html-other-element">&lt;/div&gt;</span>
<span class="html-form-element">&lt;/form&gt;</span>
<span class="html-other-element">&lt;/div&gt;

</span></span></span></span>


Monday, 2 May 2016

India Is The Top Source And Target Of Cyber Attacks


HomeSecuring SessionsIndia Is The Top Source And Target Of Cyber Attacks
India Is The Top Source And Target Of Cyber AttacksSecuring Sessions 2016-05-01  No Comments  Sid  cyber attacks, india, Security breach


India is well known for obvious reasons but recently the country started getting consistent attention in the field of cyber security. India was once considered the spam capital of the world. It is now gaining notorious popularity  as a country that has become home to a significant number of malicious cyber crimes. According to a report published by Symantec, an online security company, India is also the target of cyberattacks.

“India is the second most favoured destination for ransomware in Asia,” says Tarun Kaura, director of solution product management for Asia Pacific and Japan at Symantec.

According to Symantec’s Internet Security Threat Report, Every hour 15 India-targeted ransomeware attacks are happening on internet . The report, which summarises global cybersecurity trends in 2015, also notes that India is not only the third-top source of malicious activity, it is also a prime target for these acts. Even though Symantec now ranks India at No. 18 for spam attacks,India still stays high on the rankings for overall malicious activities like phishing, spreading malware and spamming other users, and stands at No. 3. Symantec also adds that India has the third highest financial Trojan infection rate as well. Financial Trojans are Trojan horse viruses that pretend to be a legitimate piece of software, but secretly steam users’ financial information.

Indian enterprises are also the sixth most targeted in Asia, being at the receiving end of about two attacks a year on an average. Apart from large organisations, small and medium scale are also a major targets for cyber attacks. It is worth mentioning that most of the medium and small scale companies in India do not have a protocol against cyber attacks and have no idea what to do when they are attacked.

According to Kaura, instances of ransomware attacks have grown 114 percent in India, translating to roughly 15 attacks an hour. Almost 10 percent of these attacks were crypto-ransomware, which pose a threat to consumers and enterprises alike.

Thursday, 28 April 2016

Home security App using Camera


Want to know what is happening at your home after you left,if you have old phone lying around you can make it a home monitoring device.

Setting up a simple home security camera is a great way to keep tabs on your house while you’re away. A dedicated system is great, but in a pinch, you can use an old, spare smartphone that you have lying around.

You could, of course, buy an indoor security camera that’s ready to set up and actually made for such a purpose. Something like the Nest Cam is a good option, but $200 can be a little steep. Instead, if you upgrade to a new smartphone every year, it’s likely that you have an old, spare smartphone just collecting dust in a drawer somewhere. You can put it to good use by turning it into a home security camera.

This process relies on an app called Manything, which you install both on your old phone (the camera) and on your current phone (which allows you to view the camera). The app is available on iOS and Android, although the Android version is still in beta. Thankfully, it’s rather complete for being just a beta, and it should work just fine on most Android devices. Try it out first to ensure the camera functionality works on your device.

Manything is free to use for 1 camera and no cloud recording. But Manything also has paid tiers that you might be interested in. When you first sign up, you’ll get a free month of Manything’s best plan, but after that, you can either use their free plan or go with a cheaper paid plan. Here’s what Manything offers:






The $2.99/month plan isn’t a bad way to go. It provides one camera and stores your recordings for up to two days, which is plenty of time for you to view and save them.

Once you download and install the app on your spare smartphone, tap on “Register” at the bottom to get started.









Enter in your email address and create a password to use with Manything. Tap on “Register” when done.






Next, tap on “Camera”.









You might get pop-ups of the app asking permission to access your phone’s camera and microphone. Tap “OK” on these.

After that, the camera interface will pop up. You can begin right away by pressing the red record button to begin monitoring your home. From here, you can prop up your smartphone against a ledge of some sort, or get a small tripod and phone holder. Something like the Joby GripTight Micro Stand would be perfect. You’ll also want to make sure that the phone is plugged into a power source so that its battery doesn’t die during the day.








With that set up, download and install the Manything app on your main smartphone. The app works cross-platform, meaning that you can have an Android device set up as a camera and an iPhone as the viewer, or vice versa. When you open the app, tap “Log in” at the bottom and enter in the email address and password you signed up with.








Tap on “Viewer”.











The spare smartphone that you set up should show up in the list.







Tapping on it will bring up the viewer where you’ll get a real-time view of what’s going on. You’ll also see a list of recordings below that if motion was detected. These recordings are uploaded to the cloud (a.k.a. Manything’s servers).








Tap on the gear icon in the top-right corner to view settings.







Most of the settings are self-explanatory, but there are some that deserve some explanation.
For instance, “Stills Mode” will have the camera take continuous pictures instead of recording video, which can help on bandwidth if your Wi-Fi isn’t up to snuff.













Under “Video Quality”, you can determine the quality of the video that gets streamed. If your Wi-Fi is kind of slow, it may be best to keep this on a low setting, but if you have a faster Wi-Fi connection, feel free to crank up the quality as you see fit.






Manything can stream and record over a cellular connection, but it’s generally a good idea to keep “Allow Cellular Data” disabled so you don’t bust through your monthly data allowance. However, you can still view the live stream and recordings from your viewer phone over a cellular connection







Lastly, tap on “Screen Dimmer” and make sure that “Bright On Movement” is disabled. This makes sure that the screen of the phone doing the recording and monitoring doesn’t come on when it detects motion. It’s not a huge deal, but it’s a quick way to save energy.

After you have the settings the way you want, you can sit back and wait for notifications to roll in whenever the camera detects motion. It will automatically begin recording when this happens (if you have a paid subscription) and save the recordings so that you can view them later.








Wednesday, 27 April 2016

C++ program to print a heart


Today I am going to demonstrate how to print a heart in c++ using predefined spacing methods.

So here is the program to print heart shape with happy friendship day message inside it. You can give this as a gift to your programmer friend. If you like it, don’t forget to share it!


OUTPUT
































//Code in Dev C in Windows

#include "iostream"
#include "cmath"


using namespace std;


int main()
{
    double x, y, size=10;
    char ch=3;
    string message(” Happy Friendship Day “);
    int print_line = 4;


    if (message.length() % 2 != 0) message += ” “;


    for (x=0;x&lt;size;x++)
    {
        for (y=0;y&lt;=4*size;y++)
        {
            double dist1 = sqrt( pow(x-size,2) + pow(y-size,2) );
            double dist2 = sqrt( pow(x-size,2) + pow(y-3*size,2) );


            if (dist1 &lt; size + 0.5 || dist2 &lt; size + 0.5 ) {
                cout &lt;&lt; ch;
            }
            else cout &lt;&lt; ” “;
        }
        cout&lt;&lt;“n”;
    }


    for (x=1;x&lt;2*size;x++)
    {
        for(y=0;y&lt;x;y++) cout &lt;&lt; ” “;


        for (y=0; y&lt;4*size + 1 – 2*x; y++) { if (x &gt;= print_line – 1 &amp;&amp; x &lt;= print_line + 1) {
                int idx = y – (4*size – 2*x – message.length()) / 2;
                if (idx &lt; message.length() &amp;&amp; idx &gt;= 0) {
                    if (x == print_line) cout&lt;&lt;message[idx];
                    else cout &lt;&lt; ” “;
                }
                else cout &lt;&lt; ch;
            }
            else cout &lt;&lt; ch;
        }
        cout&lt;&lt;endl;
    }
    return 0;
}





The default program prints the Message Happy Friendship day even though it is not today. 
well you can use it to impress your girl.


How to put text on the image using PHP


In this article I am going to demonstrate you how to put text on the image using php.

Easily create an image with text written on it using PHP imagettfbbox. This function requires both the GD library and the FreeType library.

Replace variables with your own, PHP script will take care of rest..

<?php
$image_width        =   500; //image width
$image_height       =   150; //image height
$font_color         =   array(0, 0, 0); //RGB color
$background_color   =   array(152, 183, 236); //RGB Color
$font_size          =   10; //size of font
$text_rotation      =   0; //text rotation value
$margin_left        =   10; //margin left
$margin_top         =   20; //margin top
$font               =   ‘verdana.ttf’; //font path
$string             =   “This is the string\nwritten on the image.”;

//create 300×300 pixel image
$new_image  = imagecreatetruecolor($image_width, $image_height);

$font_color             = imagecolorallocate($new_image, $font_color[0],$font_color[1],$font_color[2]);
$background_color       = imagecolorallocate($new_image, $background_color[0],$background_color[1],$background_color[2]);

// Set background color
imagefilledrectangle($new_image, 0, 0, ($image_width–1), ($image_height–1),$background_color);

$Text = imagettfbbox(0, 0, $font, $string);
imagettftext($new_image, $font_size, $text_rotation, $margin_left, $margin_top, $font_color, $font, $string);

//output image
header(‘Content-Type: image/jpeg’);
imagepng($new_image);
imagedestroy($new_image);
?>

First up we need to specify the dimensions of the image hence we declare them in the variables later we specify the RGB color and assign it to a variable now we get to the font size of the text to be displayed on the image and we also declare the size, margins ,font and Finally the message to be displayed

Now we create an image using the method in PHP and we set it with a background color Finally we redirect it with a header redirect.

The First Official Bitcoin Exchange Ever called Bitstamp


Bitcoins have been around for some time but are not widely accepted. Yesterday, one of the centers of European financial world, Luxembourg grants licence to Bitstamp  to operate through out the Europe. This makes Bitstamp operate widely as a public currency for the first time ever.

The  licence goes official from July 1st, 2016 and can be used in all the 27 European countries due to the Union’s inter-state agreements.

Bitstamp was founded by Nejc Kodric and Damian Merlak in August 2011 in Slovenia. They later moved their operations to the UK in April 2013. Since it’s  inception, the service has suffered many DDoS attacks and even a cyber-heist in the winter of 2015, when a phishing incident led to attackers stealing over 19,000 Bitcoin from users.

Despite the heavy attacks on them, the company recovered fast and in 2014, they requested an official permit from Luxembourg authorities, a center of the international financial world.  The company recovered and passed all security tests from Luxembourg’s CSSF and even an external financial audit from Ernst & Young, a reputable global company that provides advisory, assurance, tax, and corporate transaction services. The Luxembourg license Bitstamp has received today allows the company to legally trade Bitcoin in and to any of the fiat (de-facto) currencies in the EU’s 28 states. Until now, most Bitcoin exchanges have operated through intermediaries such as credit unions and banks.

Untill yesterday, we only have a Bitcoin-US Dollar exchange system. Along with today’s news, the company has also announced an immediate Bitcoin-Euro trading option.

So far, Bitcoin has raised over $10 million (€9 million) in investments. Based on its transactions volume, Bitstamp was considered the third-largest Bitcoin exchange. After today’s announcement, it an be easily said that Bitstamp will see a growth in popularity and numbers.

Forgot to tell you, while Bitcurrency was becoming official in Europe, usage of any such currency is still a big crime and leads to many years sentence to jail in Germany.

Top 10 vulnerabilities in 2015 are due to Flash


The annual report of software exploits of 2015 is out and it gives some shocking results. Usually attacks were more focused on Java security flaws but in the past year, exploit kit makers have switched from targeting Java security flaws to exclusively exploiting weaknesses in the Adobe’s Product, a recent report from the NTT group shows.

According to the security firm, all of the top 10 vulnerabilities targeted by exploit kits during 2015 were Flash flaws. According to historical records kept by the NTT Group, 2015 was the first year when exploit kits used more Flash flaws compared to Java, which almost disappeared from exploit kits altogether. This change in trends comes after Java was 2012, 2013, and 2014’s most targeted technology via exploit kit vulnerabilities.

Besides this Adobe product, in 2015, the second and third most targeted technologies were Internet Explorer and Microsoft Windows.

The main reason behind this trend is because of the massive security updates Java received in 2014 which made exploitation much difficult. Hackers turned their focus on Flash, which saw four zero-days in 2015 only from the Hacking Team data breach alone.

A similar report released by Symantec two weeks ago also confirms this trend. Symantec says that Flash vulnerabilities accounted for 17 percent of all zero-days in 2015, with four of the top five most used zero-days in 2015 belonging to Flash.

With so much material to work with and with Java’s extremely hard-to-bypass security features and dwindling market share, it is to no surprise that Flash usage in exploit kits has grown so much. The security upgrades that contributed to Java’s downfall from exploit kit arsenals are the click-to-play feature and Oracle’s decision to block unsigned applets by default.

In order, the top 10 Flash vulnerabilities used in exploit kits last year are as follows: CVE-2015-0311, CVE-2015-5119, CVE-2015-5122, CVE-2015-0359, CVE-2015-0313, CVE-2015-2419, CVE-2015-3090, CVE-2015-3113, CVE-2015-0336, CVE-2015-7645, and CVE-2015-3105.