Friday, August 19, 2016

Malware Inside a Video

This afternoon today, I just downloaded a video from internet. This video is about 700 MB. When I wanted to play this video using VLC Media player, it gave me an error message as shown below :
So I switched to another video player, Media Player Classic, but my MPC couldn't play this video too. "Cannot render the file"
I thought that the video file wasn't fully downloaded, but I checked it again and it's full so there was no problem with uncompleted file. Then I checked the readme file downloaded along with the video :
So I needed to use latest DivX {I don't know what the heck is that divx} and tried to use windows media player. Then I opened the video using my WMP aaaaand.....
A minute later, I was told to download a new codec for my wmp,

Well because this wpm is originally from microsoft and my windows is an original windows, I thought there was no problem with that, so I just downloaded the new codec. The file name is "CodecFix.exe" : {Actually I downloded the file twice wkwkkwkw... B-)}
The nightmare came from this file. I don't really know if this file is fake or not, because I got the link from wmp which is actually through microsoft app, but my antivirus told me that it was a malware...but mmmmmm....Who cares...I disabled my antivirus and double clicked the file aaaand.... tadaaaaaaaaaaaaa....... =)) =))
My chrome suddently closed and seemed that my browser cookies were missing, all of them :v,,,, and my laptop memory became flooding and automatically downloaded some unknown files :3...When I opened my chrome, it redirected me to a new search engine, www.youndoo.com with some parameters that we can see from it's url,..{btw... I hope all people in youndo are good people, so please don't steal any private info from another people again or don't do any bad things in this life. We are all responsible for what we did right... :)} Because my cookies or cache or mm... something like that were missing so I needed to sign in again, but I saw that my chrome looked different and yaaaps... my Chrome seemed infected... So I enabled my antivirus again... :D :D :D  =)) ....Aaand my AV seemed confused :v, so I manually went to directory in C:\Users\Hisoka\AppData\Local, there was an infected folder here {Sorry, I forgot to print screen it :v and some app that I have downloaded}, I manually deleted some files, but some of them couldn't be deleted..... :3.....  After that, I thought my chrome was back to normal, but actually it wasn't, because the font was different wkwkwk... {YoU can't deceive Sharingan eyes..:D}... I checked chrome again and I found that not only my chrome but also firefox was infected to. I right clicked the chrome icon and went to the source directory aaand there you are :
Those 3 files were infected/source of youndoo and we need to delete it from our disk. Because even we move it to another directory, those files still run whenever we run chrome or firefox and start opening youndo.com.... mmm...Because the content of those files is same :D wkwkwk....












Sooo..... I restarted my laptop and scanned it's drives while windows was booting......After login again, I still saw an infected files, it's my beautifull app service.exe... :v :v :v

Hufffh.....I just left it like that, And then I created a new shortcut for chrome {It was taken from google directory in program files} and I saw that It's already using "https", so mmm... I tried to login and wrote this note... :D... and ooowh...  http://www.youndoo.com/ is like this :

Good luck Youndoo...
Please become a good search engine... :)

Sooo.... mmmm......mmmmmmmmmmmmmmm...... daaah aaaah.... :D

Saturday, August 13, 2016

Setting Up React Environment Using NPM, Babel, & Webpack in Windows 7

Okaay,,, In this series, we'll gonna play with react in windows 7. The first thing to do is preparing the windows 7 environment.... {I'm assuming that your windows already installed the node.js and I'm using sublime here}
1. Create a new folder for our react code, then open cmd promp there...
2. Type "npm init" and put some info if you want.. :) or you just can use default setting from npm by using "npm init --yes",
npm init is actually a basic configuration for our react environment, so our folder will contain a package.json as shown below :
3. Type "npm i react --save-dev ", this will gonna install/get react library : {i is an alias for "install"}
After finishing this command we will gonna see a node_modules in our directory with bunch of folder inside of it. this node_modules is the main directory for all of our react,babel, webpack package. And also we put --save-dev flag on our command above. That flag is a way to save our package devDependency to package.json.
4. Actually, we can install some packages in just one command like this :
"npm i webpack webpack-dev-server --save-dev". So we are going to install webpack and webpack-dev-server...

5. Okiee,, this is the last command that we need to execute, it's a long one.. :D, this is going to take a while because we are going to install many packages (react-dom, babel, babel-loader, etc)
"npm i react-dom babel babel-loader babel-core babel-preset-es2015 babel-preset-react --save-dev" :


btw... There is a flag called "-g", this flag is going make our package run globally. I actually avoid to use -g, because it might mess up with another project package in my windows 7 directory because of different package version. Soo ummm... all packages that we installed here are running locally just for our work directory. Aaand.... You don't have to worry if you install those packages not in order, just make sure that all packages are installed.. :)
6. Create some new files, webpack.config.js, App.js, main.js, & index.html..
7. Let's work on index.html first, put this code :
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title> Setup React in Windows 7 </title>
</head>
<body>
<div id="app"></div> <!-- our react target -->
<script src="bundle.js"></script> <!-- our bundled file -->
</body>
</html>
So our index.html is looked like this :
btw,,, index.html is our main view, so this page will gonna show up when we run our react project. In this file we put a div with id="app", this div will be used by react to put/show something, like text or another html elements. In the line 9, there is a bundle.js. This bundle.js is generated by react, and this is the power of webpack because every javascript, jquery, or ajax, or another scrypt will be available here. So we don't have to put something like <scrypt>bla bla</scrypt> inside of our html file, because everything already handled by webpack {or may be npm, I don't know :v}
8. Let's work on webpack.config.js, put this code :
var path = require ('path');
var webpack = require ('webpack');

module.exports = {
    entry: './main.js',
    output: {
        path: path.resolve(__dirname),
        filename: 'bundle.js'
    },
    devServer: {
        inline:true,
        port:3333
    },
    module: {
        loaders:[
        {
            test:/\.jsx?$/,
            exclude:/node_modules/,
            loader:'babel-loader',
            query: {
                presets: ['es2015', 'react']
            }
        }
         ]
    }

}
There are a lot of things here in webpack,...mmmm...... when we run "npm start", main.js file will be called {as shown in line 5}, then bundle.js will be generated {line 6}. As explained before, bundle.js is called in our index.html. Our localhost will gonna run on port 3333 {line 12}, aaand another config for modules eehehhe... :D

9. Let's move to App.js file, put this code :
import React from 'react';
import ReactDOM from 'react-dom';
class App extends React.Component {
    render()
    {
        return <div>Hellow Hisoka Poipo... ;)</div>
    }
}

export default App
App.js will be called in main.js. As we can see, this App.js will generate our hellow world that will be put to our index.html file. We are using react and react-dom here... :)

10. Let go to main.js, put this code :
import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
ReactDOM.render(<App />, document.getElementById('app'))
This main.js is actually connecting our App.js to index.html using element div with id="app" that we created before in index.html.... :)
So when program is running, webpack is calling main.js and generating bundle.js. main.js is conneting App.js and index.html. Aaand. bundle.js is used by index.html,,, so everything is seemed connected... :)

Last thing, let's put "start" command in package.json, so npm knows what "start" is ...

11. Put new scripts in package.json : "start": "webpack-dev-server",

Yuuupsss... DOneeee... Let's run our first reat project by typing "npm start" :

So let's open localhost:3333 as shown in cmd above...
Demo :

Source code is available here :
https://github.com/HyosokaPoipo/learnReactinWindows7

https://bitbucket.org/HyosokaPoipo/learnreactinw7


Go to Part II...