Mattia Campagnano

Mattia Campagnano

Tuesday, January 26, 2016

Mattia’s Dummie’s Corner- Variable initialization

I'm trying to learn numerous programming languages, after studying Visual Basic last semester, and this concept suddenly hit my mind yesterday, while I was watching a Python tutorial.

What's a variable?

It's something that may vary, i.e. can get different values.

It's nothing but a placeholder for something you want to store, a sorta box where you want to store something for you to use later.

If you grab a programming textbook, you'll find several data types, i.e. numerous types of variables you can use (strings, floats, integers, booleans, date/time, etc.).
    We don't need them now, so let's forget about them for a second. I love Python programming language for many reasons.

    One of the most important is its ease of use, as there's no need to state what data type your variable is, when coding in Python.

    We create a variable by simply giving it a value (assignment).

    For example, if we want to define a grade variable in Python, we'd have something like:

    grade="A"

    The use of quotes informs Python that's a string variable (text).

    In case of numbers (e.g. In Italy we use numbers 18 through 30 for grades, where 30 is A), you'd have, for example:

    grade=26

    Loops and variable initialization

    Thursday, January 21, 2016

    Windows 10 - Remove the evil clone

    After the last Windows 10 update (and after not using it for a while), I've gone through a weird issue.

    I plugged in my external hard drive to work with some files and I got a pop-up saying that drive had problems, asking me whether I wanted to fix them.

    I chose Fix & scan; OK- I think - it'll fix some errors and then I can use this darn disk, right?

    Dead wrong.

    Two identical hard drives, both having the same letter, were suddenly showing up in Windows Explorer.



    Then, you might think, no big deal. Due to the error, one disk remained in the RAM.
    You eject one of them and you're good.

    Not so fast. The second disk can't be removed, Windows sees the two drives as  fixed hard drives.

    If I eject my hard disk, they both disappear, but they come back, when I plug it back.

    I tried a couple of times to reboot the system, but no avail.

    After several web searches, I found out the update had introduced a new Registry key, causing Windows to detect external hard drives as removable ones, so that they're displayed twice in the Navigation pane.


    For you to solve the issue, you need to navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Current Version\Explorer\Desktop\NameSpace\DelegateFolders and remove the sub-key you'll find there.

    That done, the clone immediately disappeared.

    Friday, January 15, 2016

    Force App Store to re-download OS X.

    When Apple releases a massive update, I always re-download the latest OS X installer from App Store, which I use to create an up-to-date USB recovery installer.

    For you to re-download El Capitan (and, in general, any OS X version you have already installed), you need to open up App Store and go to Purchased.

    Afterward, you click Download and, after answering Yes to a confirmation pop-up, the download will start.

    That's how I've always done so far.

    However, you might at times experience some issues while doing that.

    This time around, in fact, El Capitan installer was grayed out and displayed as Downloaded

    On a forum thread I found out the problem was caused by the older installer, which still was in the Applications folder.

    After removing it, quitting and re-opening App Store, I was able to successfully start the download.


    Hope it helps you solve similar issues.

    Tuesday, January 12, 2016

    Location services? I don't think so. Big Brother’s out there for you.

    Location, location, location.
    No, I'm not talking about a hotel, I'm talking about location services.
    Nowadays, an overwhelming number of auto-starting location services are installed in computers and a bunch of other devices (mobile phones, "smart" devices connected to the Internet, etc.).


    Unless you disable these services, they can track every minute of your day.

    Thursday, January 7, 2016

    How to create a Kali Linux Virtual Machine with VirtualBox - Walkthrough

    Today we're gonna create a Kali Linux virtual machine with VirtualBox.

    As I'm in information security and I'm studying pentesting, I've been asked this question so many times that I decided to create a tutorial for it, hoping it will help.


    Why Kali Linux?

    Kali Linux is a very popular Linux distro, used for hacking, pentesting and forensics.

    Its current version, as of today, is the rolling version 2 2016, based on Debian.

    Kali is not the only pentesting distro around, but it's become popular because it gathers thousands of tools ready to go in the same place.

    Related Posts Plugin for WordPress, Blogger...

    Contact Form

    Name

    Email *

    Message *