327days until
December 21, 2012

Sponsors

As the song says, I want to be a billionaire so fucking bad... please help me get there, and I'll return the Karma some day! 
I have not yet received any checks from google from the Ads on my site... (I'm at 20$ give or take and I need at least 100$ to get a check...) 
So... Will you help me? Find an ad you like and see what product they have to offer... Thanks a lot folks!
-Madlogik

[Latest HeadLines]

Support Wikipedia
Welcome to madlogik.com
    This is my personal website where I post about technology and or life issues that matters to me.
I hope you will find handy tools, cool tricks and power tips to get your computing life generally elevated.
The only thing we have to fear is fear itself. - Franklin D. Roosevelt

2012

posted Jan 1, 2012 1:21 AM by Mad Logik

The time has come! 2012 is here!
I wish you all well, good health and inner peace for 2012 and the years to come. 

I made a quick photoshop about what 2012 will look like to me. 
ttyl ;) #2012YearOfTheHashTag ...
(click to enlarge) 

2012, as I see it!

So I'll be back later in 2012... until then... live long and prosper!

News about me

posted Oct 29, 2011 2:15 PM by Mad Logik


Hi there!
I'm not dead, or retired yet. Although I needed a break from the technology circus. 
I've pretty much stopped playing counter-strike source.... and at the same time stopped posting on my website. 

I got myself an Xbox (finally!) a friend convinced me to switch... so I sold the ps3!
(honestly, I couldn't stand Sony anymore... after being lied to and lost all confidence in that company.) 
I'm into some Forza 4 and Battlefield 3 now!

I've always been a computer gamer. But costs of upgrades and constant problems just to get things working really put me off. In the end, I also hated how easy it is to cheat on a pc without getting detected... 
I love closed environments now like Xbox Live and Apple products... I love that little "protective cage" around their products... almost as much as I used to like to break them up. 

I've become a consumer. No longer trying to be "evil" or "too curious" I enjoy the ride and have every right to complain when things go FUBAR... 
I've found myself tired of being paranoid about my own doings and decided it would be better to settle down a bit. 



I'm sure this passion will light up again in the future... It's my nature... but I needed a break from all this madness. Heck... I don't even fit the "mad" logik mold anymore... 
I'm rather finding myself akin to abide by the rules and just roll on with the punches. 

Talking about punches... Life has thrown it's fair share my way in the past year or so... 
I fought so much for things I believed in... and found myself in a position of being feared upon and kinda lost respect from my "ex" bosses and fellow teammates... 
When you always bark that things ain't right... people get afraid of the bad dog you've become... 



There are things you can change... but people are not easy to deal with. When you say things out loud, people step back... 

I started to realize things were not worth fighting for... and at the same time, lost motivation into making them right again... 

Obviously, I have made some mistakes, I'm almost unmanageable and I seem to have a passion for self-destruction... But I still believe I'm the good guy trying to fight for the right things in life... 
I've became : 


So I'll take some more time to get back on my feet, I'll get a non-technology related job where I can use my computer skills as an asset and not as my lifeline... 
And if boredom doesn't kill me, I might learn a thing or two about people, the way they act, and how to react appropriately. When I feel I've gain confidence back in me, my skills and my knowledge, I'll go out to tackle some more tasks. 

If you think you can help me, in any ways, feel free to contact me and tell me about your way of seeing things. 
Thanks for your understanding, and see you in a bit. 
-MadLogik

ps: my xbox gamertag is m4dl0g1k since someone else got madlogik :( If you're that person...please contact me, I'm sure we can make a deal if you're willing to let go of madlogik ;) I like to keep all my nicknames on all platforms the same. 

Oh and a few words from God himself:

God, grant me the serenity to accept the things I cannot change,
Courage to change the things I can,
And wisdom to know the difference.

 

Want to get in YOUR router, lost the password, can't reset it?

posted Sep 6, 2011 5:20 AM by Mad Logik   [ updated Sep 6, 2011 12:08 PM ]



Well my friend, today is your lucky day. 
I took a brute-force approach to the problem. 
Some old tools I used in the past are no longer working properly... (remember Brutus?!!)
And I had in the past tried my luck at this, but aimed too high and got lost into recursive functions...

So there you have it. 
MadLogik's very own:  
PassSpitter v1.0

v1.0 Screenshot: 


Usage: (really? just start it up and you should be gold!) Obviously what you will need is TIME and not SKILLS!

1: Double click on the cute PassSpitter icon, a console like window will open (see screenshot above)
2: Enter the minimum length to start with... I suggest 0, but if you know it's 8 characters long, then you would save quite some time starting at 8 right away!
3: Enter the ip... now this tool is meant to be used with your OWN router over your LAN for TESTING PURPOSES.... but it will work with any remote http auth request... ;)
4: Enter the username, admin for most routers... but I found out my linksys wrt610n will take ANY usernames! :$
5: let it do it's magic.. you will get updates when you get to the next letter... and live password display ... it's not slowing down the software enough for me to take it off... 
6: get the resolved password when you hear the beep! 

ps: should something go wrong (that means, if the software gets anything else than a "401 unauthorized" message) then you will be asked if you want to continue or not... simply enter "n" to stop
... close the window and start it back up ... choice is yours!

Good to know: Currently, it's only going to try lowercase letters and numbers ... otherwise it becomes too much of a task... and you should have access to the reset switch on your router after all ;) 
private static char[] charactersToTest = { 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '1','2','3','4','5', '6','7','8','9','0'};
 In other versions I will allow you to choose... if I ever make other versions ;) Afterall, you can download the source below, a free version of visual c# 2010 and run this the way YOU want... ;) 
//private static char[] charactersToTest = { 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '!', '$', '#', '@', '-' }; //... who knows ? !! :P 

Download Links: 

I found the debug version to run faster but it's also more prone to receiving errors or simply crashing...
I found the speed to be between 50 and 150 passwords per seconds. Not bad! at all!

BY THE WAY: 
I must give credits to Janosh Woschitz for most of the code in the bruteforce engine! Thanks Mate.
I just hacked in some web auth testing code and setup a loop for my needs... looks dirty but it all works quite good! 

If you have comments, hit me up on twitter
See ya!

Ohhh yeah... the code... Well Here's the project files... and below the code..

Code: 

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net;
using System.Web;
using System.IO;

namespace
PassSpitter
{

    class Program

    {

        #region Private variables

        // the secret password which we will try to find via brute force

        private static string result;

        private static bool isMatched = false;

        private static bool isFailing = false;

        /* The length of the charactersToTest Array is stored in a

        * additional variable to increase performance  */

        private static int charactersToTestLength = 0;

        private static long computedKeys = 0;

        /* An array containing the characters which will be used to create the brute force keys,

        * if less characters are used (e.g. only lower case chars) the faster the password is matched  */

 

        private static char[] charactersToTest = { 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '1','2','3','4','5', '6','7','8','9','0'};

 

        //private static char[] charactersToTest = { '1', '2', '3', '4', '5', '6', '7', '8', '9', '0' };

        //private static char[] charactersToTest = { 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z' };

        //private static char[] charactersToTest = { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z' };

        //private static char[] charactersToTest = { 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0' };

        //private static char[] charactersToTest = { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0' };

        //private static char[] charactersToTest = { 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0' };

        //private static char[] charactersToTest = { 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '!', '$', '#', '@', '-' };

       

        #endregion

 

        static void Main(string[] args)

        {

        starthere:

            Console.Clear();

            Console.WriteLine("**********************************************************************");

            Console.WriteLine("****** MadLogik's PassSpitter v1.0 (c) 2011  madlogik@gmail.com ******");

            Console.WriteLine("**********************************************************************");

 

            // The length of the array is stored permanently during runtime

            charactersToTestLength = charactersToTest.Length;

            // The length of the password is unknown, so we have to run trough the full search space

            Console.WriteLine("\nEnter the minimum password length");

            var estimatedPasswordLength = (int.Parse(Console.ReadLine()) - 1);

            //if people enter 0 .. it will be -1... so lets fix that.. :P

            if (estimatedPasswordLength < 0) { estimatedPasswordLength = 0; }

 

            Console.WriteLine("Enter the URL like http://192.168.1.1 or just the ip:");

            string mytargetip = Console.ReadLine();

 

            if (!mytargetip.Contains("http"))

            {

                mytargetip = "http://" + mytargetip;

            }

 

            Console.WriteLine("Enter the Username like admin:");

            string myusername = Console.ReadLine();

 

            var timeStarted = DateTime.Now;

            Console.WriteLine("Start BruteForce - {0}", timeStarted.ToString());

 

            while (!isMatched)

            {

 

                /* The estimated length of the password will be increased and every possible key for this

                * key length will be created and compared against the password */

                estimatedPasswordLength++;

                startBruteForce(estimatedPasswordLength, myusername, mytargetip);

                Console.WriteLine("\nTime elapsed: {0}s, Passwords tested: {1}, Pass/sec: {2}", DateTime.Now.Subtract(timeStarted).TotalSeconds, computedKeys, (computedKeys / DateTime.Now.Subtract(timeStarted).TotalSeconds));

            }

 

            Console.WriteLine("\n**********************************************************************");

            Console.Beep(500, 500);

            Console.Beep(300, 250);

            Console.Beep(500, 500);

            Console.WriteLine("Password matched. - {0}", DateTime.Now.ToString());

            Console.WriteLine("Time passed: {0}s", DateTime.Now.Subtract(timeStarted).TotalSeconds);

            Console.WriteLine("Resolved password: {0}", result);

            Console.WriteLine("Computed keys: {0}", computedKeys);

 

            //end

            Console.ReadLine();

            Console.WriteLine("Do you want to try again?");

            string wannarideagain = Console.ReadLine();

            if (wannarideagain == "y")

            {

                isMatched = false;

                isFailing = false;

                computedKeys = 0;

                charactersToTestLength = 0;

                goto starthere;

            }

        }

 

        #region Private methods

 

        /// <summary>

        /// Starts the recursive method which will create the keys via brute force

        /// </summary>

        /// <param name="keyLength">The length of the key</param>

        private static void startBruteForce(int keyLength, string myusername, string mytargetip)

        {

            if (!isMatched)

            {

 

                Console.WriteLine("\nTesting passwords with {0} letters or numbers", keyLength);

                var keyChars = createCharArray(keyLength, charactersToTest[0]);

                // The index of the last character will be stored for slight perfomance improvement

                var indexOfLastChar = keyLength - 1;

                createNewKey(0, keyChars, keyLength, indexOfLastChar, myusername, mytargetip);

            }

            else

            { return; }

        }

 

        /// <summary>

        /// Creates a new char array of a specific length filled with the defaultChar

        /// </summary>

        /// <param name="length">The length of the array</param>

        /// <param name="defaultChar">The char with whom the array will be filled</param>

        /// <returns></returns>

        private static char[] createCharArray(int length, char defaultChar)

        {

            return (from c in new char[length] select defaultChar).ToArray();

        }

 

        /// <summary>

        /// This is the main workhorse, it creates new keys and compares them to the password until the password

        /// is matched or all keys of the current key length have been checked

        /// </summary>

        /// <param name="currentCharPosition">The position of the char which is replaced by new characters currently</param>

        /// <param name="keyChars">The current key represented as char array</param>

        /// <param name="keyLength">The length of the key</param>

        /// <param name="indexOfLastChar">The index of the last character of the key</param>

        private static void createNewKey(int currentCharPosition, char[] keyChars, int keyLength, int indexOfLastChar, string myusername, string mytargetip)

        {

            if (!isMatched)

            {

                var nextCharPosition = currentCharPosition + 1;

                // We are looping trough the full length of our charactersToTest array

                for (int i = 0; i < charactersToTestLength; i++)

                {

                    /* The character at the currentCharPosition will be replaced by a

                    * new character from the charactersToTest array => a new key combination will be created */

                    keyChars[currentCharPosition] = charactersToTest[i];

                    // The method calls itself recursively until all positions of the key char array have been replaced

                    if (currentCharPosition < indexOfLastChar)

                    {

                        createNewKey(nextCharPosition, keyChars, keyLength, indexOfLastChar, myusername, mytargetip);

                    }

                    else

                    {

                        // A new key has been created, remove this counter to improve performance

                        computedKeys++;

 

                        /* The char array will be converted to a string and compared to the password. If the password

                        * is matched the loop breaks and the password is stored as result. */

 

 

                        string mypassword = new String(keyChars);

                        string mycontent = "";

                        if (isFailing)

                        {

                            Console.WriteLine("\nWarning! You are not getting the expected 401 unauth message... Continue y/n ?");

                            string failcontinue = Console.ReadLine();

                            if (failcontinue == "n")

                            {

                                isMatched = true;

                                result = "Operation Failed!";

                                return;

                            }

                        }

 

                        try

                        {

                            WebRequest myReq = WebRequest.Create(mytargetip);

                            string usernamePassword = myusername + ":" + mypassword;

                            CredentialCache mycache = new CredentialCache();

                            mycache.Add(new Uri(mytargetip), "Basic", new NetworkCredential(myusername, mypassword));

                            myReq.Credentials = mycache;

                            myReq.Headers.Add("Authorization", "Basic " + Convert.ToBase64String(new ASCIIEncoding().GetBytes(usernamePassword)));

                            // if it breaks... it's here. 401 unauth

                            WebResponse wr = myReq.GetResponse();

                            Stream receiveStream = wr.GetResponseStream();

                            StreamReader reader = new StreamReader(receiveStream, Encoding.UTF8);

                            mycontent += reader.ReadLine();

                            mycontent += System.Environment.NewLine;

                            string currline = mycontent;

                            while (currline != null)

                            {

                                currline = reader.ReadLine();

                                mycontent += currline + System.Environment.NewLine;

                            }

                            reader.Close();

 

                            //Console.Write(mycontent); //source code!!!

 

                            //MessageBox.Show("The Password is: " + password, "Password Found!");

                            isMatched = true;

                            result = new String(keyChars);

                            return;

 

                        }

                        catch (Exception exx)

                        {

                            Console.Write("\rTesting Password: {0}", new String(keyChars));

                            if (!exx.Message.ToString().Contains("401"))

                            {

                                isFailing = true;

                                Console.WriteLine("\n\r{0}", exx.Message.ToString());

                                return;

                            }

                        } 

                    }

                }

            }

            else

            { return; }

        }

        #endregion

    }

}



WARNING: Don't you dare trying this tool to hack into a server that isn't your's ! Be a gentleman about it. 


Tim Cook is our new God!

posted Aug 24, 2011 5:26 PM by Mad Logik   [ updated Aug 25, 2011 6:32 AM ]

Steve Jobs resigned. So, Tim Cook is our new God! 
Here's the man in Question:

You may want to know more about your new lord?
Here's info from Forbes

Worth about 60,000,000$ 
Born November 1st 1960 (update your birthday reminders) (He's 50)
He's Steve's man... 

More goodies straight from Apple's website: 

And a NICE picture:

(You may want to make a wall size poster of him in your new Apple branded and furnished prayer room)

We learn he's from Compaq... (Good move leaving the boat while it floated Tim!) 
12 years at IBM also! 

And you might wonder ... 

What education prepares you to lead the world's best company? 
Quote:
"
Cook earned an M.B.A. from Duke University, where he was a Fuqua Scholar, and a Bachelor of Science degree in Industrial Engineering from Auburn University.
"
Oh, In case your're an Ignorant Fuck like me and don't know what a "Fuqua Scholar" is... Let me save you a trip to google or wikipedia ... 


 
 
 


"
The Fuqua School of Business is the business school of Duke University in Durham, North CarolinaUnited States. It currently enrolls 1,340 students in degree-seeking programs. These programs include the Daytime Master of Business Administration (MBA), the Global Executive MBA, the Cross Continent MBA, the Weekend Executive MBA, Master of Management Studies: Foundations of Business, Master of Management: Clinical Informatics, Master of ManagementStudies (in partnership with the Seoul National University), joint degree programs (including joint degrees in medicine, law, environmental management, forestry, public policy, and nursing), and a Ph.D. program. Additionally, Duke Executive Education and Duke Corporate Education offer non-degree business education and professional development programs.
"

Nice Place Indeed!

And my best section of the wiki article:

Personal

Cook is a fitness enthusiast and enjoys hiking, cycling, and going to the gym. He regularly begins sending emails at 4:30 a.m. and used to hold Sunday night staff meetings by telephone to prepare for the next week.In 2011 he was named to the top spot on Out Magazine's Fifth Annual Top 50 list. 

While giving the 2010 commencement speech at Auburn University, Cook emphasized the importance of intuition in guiding his life's biggest choices, and followed by stating that preparation and hard work are also necessary to execute on that intuition.

I hope Steve will recover, but if he's no longer able to run the boat... I simply want to wish him the best of luck fighting his cancer. 

Tim, please make the "macbook touch" (an apple branded axiotron modbook) or an ipad thin macbook with a wacom cintiq built-in... and we will follow your lead!

Yeah the rumor mill is back for a possible 2012 "macbook touch" ... 
... and I believe Tim Cook is the man for the job... 
Steve can rest in peace knowing he paved the way for the tactile computing era. 
If Tim is the man needed to make friends with bill and balmer and produce the next generation of gaming / computing devices... I'm all in! 
Imagine your pc looking as beautiful as a mac... or your ipad / kinect hybrid... nintendo and sony would cry! 

Long live the King, Tim Cook! 
May the emperor Jobs live on. 
For now the time has come,
Apple shall dominate,
Over us all.

... can't wait for Apple to design pre-built houses... 
or simply Apple branded coffee machines... 

hummm... "Beautifuly Amazingly Marvelously Flavored" Coffee...
 
Stalk me on twitter to know about new posts on madlogik.com, or simply  when I go and take a dump... ;`) gotta love technology!


The problem with the computer industry wars.

posted Aug 19, 2011 3:56 PM by Mad Logik   [ updated Aug 19, 2011 6:53 PM ]


When you buy a car, there is no question asked, it is made to get you from point A to point B. 
You might question it's ability to do so fast enough, securely enough, or with good enough seats and suspension, or loud enough speakers... 
but YOUR goal is to get from A to B ... and a car will do just that

The single biggest issue we face with computer, either that be an Apple driven or Microsoft Driven computer... is that you are never quite sure it will truly help you achieve YOUR GOAL...
There can be software conflicts or incomplete suite of tools...

Take for example, you want to transfer, edit, and then burn to a DVD a video you recorded with your phone... or camcorder...
SO MANY THINGS, AT EACH AND EVERY STEP CAN PREVENT YOU FROM ACHIEVING YOUR GOAL!
(some but not all!)
-device not recognized
-missing drivers
-faulty cable
-missing video codec
-video format incompatible with your editing software
-long converting times if you have an analog video source! 
-you often need the mpeg2 license to burn to DVD! 
-your DVD media might be incompatible with the target DVD reader (DVD +/- R .. DVD+RW ... or whatever equipment is at the other end) 

and ... that's just achieving ONE GOAL with your computer .... next, sending an email, or updating your Facebook status... GOD KNOWS WHAT! 

... it's about time to decide upon a single platform, that's open, and providing complete, full access to all of it's innards (hardware) and supports for add-on's! 

Then, give immediate access to hardcore programmers to the hardware... and slowly update a complete SDK, complete with lessons to get people up and going. 
This formation must be universal, open, easy to understand. I love the Apple way of building the architecture, but at the same time, HATE how they restrict people from incorporating add-on products or apps that would change the end user experience... 
Shame on them for that... but this is Microsoft's single and biggest problem... it supports so much, but provides nothing to users... 
---> HEY MICROSOFT : WAKE THE FUCK UP .... Microsoft Store has to open... no bullshit ... call it the M$tore and people will find it funny... but it's about FUCKING TIME you provide pc users with a platform to download apps from... 
GET PEOPLE OUT OF THE BROWSER... it's Google's land anyways! 
GET PEOPLE OUT OF THEIR PHONES... it's Apple's turf anyways!
---> when most people sit at their computers for long, extended periods of time... you are currently the leader... but Apple will kick your ass for the simple fact that I can download all the apps I need (but your office for mac software!) straight from the Mac App Strore... 
BRILLIANT Steve, ... wake up Bill.. 


Ah, also while we're at it... I don't believe in localisation for apps... 
My first language is French, but I have seen times and times over French versions of software being pledged with bugs that the English versions didn't suffer from! 
The simple fact that french words are often longer than english words create buffer overflows and other memory problems if programmers are not thoughtful about future conversions to other languages!
IMHO: English has always been THE main language on the Internet, and with computers in general, and it should be universally adopted as the only language for us all.. but that's another topic all together ! lol! 

Software has reached it's limits anyways... Now we have the building blocks to help us materialize what we think about or what we dream of. 
We can then tell a machine to crave, build, put together this idea and replicate it many times over for anyone who would desire this item... and implement a way to recycle ANY AND ALL production leftovers. 
Time has come to standardize basics in our world.... so that any products I buy will work with my computer, allowing me to take their raw content, unedited source, get them out on my big screen, and in a mater of hours realize what I had in mind when I shot the said pictures, movies, or recorded sounds, and transform them into the visions I had in mind... to create a window for others to peek inside my brain a bit... sometimes, it does feel lonely in there. 

I hope someone can help me realize the way things could get changed, worldwide... I'm available to any ideas you people might think about. 

Until the revolution, live long and prosper. 




edit: windows 8 will have an app store... way to go Bill & Co! 

IS THIS THE PS4 TEST PHASE TRAILER?

posted Jul 29, 2011 7:01 AM by Mad Logik

Looks too "sony" to be fake... 
The ps4 will force you to eat 3d, and will probably steal the kinect's technology after stealing the wii's remote idea... ;)
I don't know... it's like putting a bunch of expensive ingredients in the same bowl... without having a proper recipe... This could be an expensive mess!

Well check out the video, it's really cool!


Guide: Ubuntu: From Seedbox to VPS and more!

posted Jun 30, 2011 8:08 AM by Mad Logik


About a month ago, I won a FREE SEEDBOX from seedboxhosting.com via a twitter contest... (see my previous post)

They provided me with a Ubuntu server, root access, 300 gig of hard drive and 5 gig for the os partition alone. 
All of this with 768 megs of ram, a decent cpu and 100 megabits of un-metered upload/download bandwidth to play with!

So for a while I was like cool! free seedbox! (I had one before... ) but then, I needed to download faster... 
see, servers are optimized for massive data storage over a cluster of discs. Not for speed... so a single file will go at about 1 megabit at best through ftp... 
but, 10 files at a time, I can max the speed of my home connection (30 megabits) no problems! 

Now, I have some scripting / bash / powershell experience under my belt... 
The idea was to create a script (bash) that would get the file size of any given file, and split it into .rar files. 
I wanted to specify the number of rar files... because I don't get the speed to be equally distributed for all 10 transfer slots..
some will go at 1 megabit (1000 kbps... ) but others will be at 200 kbps... so for a 300 meg avi file, 10 parts ... 30 megs each, it's fast enough to send those small files that even if
I get caught in a slow transfer, I can still get all the files in a short amount of time. but if I create too many files, it takes time to make the archives... and to decompress it .... 
you will find it part of this guide as "madsplit.sh" ... enjoy it. 

So... in order to get this done, I needed root access, install applications and I got the party going fine that way for a while... 
But .. you know me, got bored... or wanted to know what else this box could do... 
 ... Ubuntu server (just a console, no GUI (or interface) .. no desktop ... just plain ubuntu 10.04 LTS server... 
(a black screen ... a console... ssh/pure-ftpd/rutorrent 3.2/and apache ... that's pretty much it) ... 

If I did a sudo reboot, I was losing the partitions, and ubuntu would'nt boot... I got help from Jeremiah over at seedboxhosting.com and he got me the script needed to play with the fstab files (partitions...) 
And that was a scary thing!  (I required manual reboots 2 or 3 times from him after the fact because I didn't know enough about those files and I was adding multiple entries to the fstab file without knowing... 

... VI is a fine text editor for linux... but I knew I could get a gnome desktop running... a vnc server ... and little by little.. line by line... reboot after reboot... it took form... 

I present to you this guide. Step by Step. On how to go from a simple remote ubuntu seedbox server ... (that you have root access on!) ... and make it a remote desktop VPS with google chrome installed for local (full speed) browsing and downloading. All in all (mostly copy/paste) and including my download times.. it takes about 30-40 minutes to set it all up!



This is the result of many hours of trial and error, google searches and many joy and frustrations... 

Actually Here's everything I cover in the guide :

-1: Setting partitions in the fstab and mdadm files so that when you reboot, they get mapped properly!
(This step seems now obsolete, I believe seedboxhosting.com is now doing it by default! GREAT!!!)

-2: We update the barebones system, and install ubuntu-desktop, the full gnome desktop! WOAHHH!!! 
(At 100 megabits, this doesnt take very long!, ubuntu-restricted-extras add's flash and java and mono and the like))

-3: We setup a vnc server using vnc4server, we have it start up on boot and make sure it's running smoothly!

(at this point, we already have basically what we want... but I go further and propose app and desktop configurations!) 

-4: We remove firefox and install chrome instead, along with filezilla

-5: I give you the madsplit.sh script to paste into a file.
(usage: let's say your're in your /data/admin/rutorrent folder ... ./madsplit.sh file.avi 10)
(This will create a subfolder called file, in there will be 10 .rar files with no compression (store) for faster compression/decompression) + you won't gain much from compressing a divx or mp3 file!) 

-6: Customize the desktop, add proper shortcuts to your panel, and edit some to add the sudo command!

-7: Setup chrome to show your rutorrent view properly. 

-8: Install ubuntu tweak, and clean up the cache of aptitude) 

-9: I give you a link to a website that will propose a way for you to get putty to start an ssh tunnel for the vnc server and starts your vnc client to your local port tunnel in putty... if it sounds complicated, don't worry, the website is complete, this is why I linked it. 

10: We install a simple pptpd vpn server! YEAH! VPN! so you can browse safely and anonymously from your computer, iphone ipad or whatever supports vpn servers!!! (When you surf the net while connected to a vpn, all your data packets will go through that vpn adapter and gets encrypted (actually, re-encapsulated within encrypted packets) and sent over your internet, up to your seedbox (well... donno what to call it anymore) server and from there it will go out on the internet! 

I also propose the way to fix a vnc session lock and also changing the MTU size in windows 7 / vista for the vpn adapter! 

so let's get started. 
You will find my comments with lines starting in #
You will find commands to type in bold red
You will find block of text to copy / paste in bold black

If you have ANY comments, please email me, or hit me on twitter ! @madlogik =)




#From seedbox to Ubuntu VPS server in about 30 minutes. 
#Start Fresh: https://www.seedboxhosting.com/dashboard
#From the seedbox control pannel, make sure you enable root, then hit reset, destroy my data, and reboot!  
#wait until it's over!
#########################################################################################################
#Initial setup
#(note: as of 6/30/2011, this is now done automatically, but might be useful 
#so only do this if you loose your /data/admin partition when you sudo reboot, otherwise skip to setup desktop!

#setup vps drives to reconnect on reboot
sudo su root
#step already done: mdadm --assemble /dev/md0 /dev/vdb /dev/vdc
mdadm -Dsv | grep md0 >> /etc/mdadm/mdadm.conf
vi /etc/fstab
##use the insert key to go into insert mode in vi and use shift+insert to paste
#add at the end of the lines: /dev/md0 /data ext3 defaults 0 0
#press (esc) followed by :wq
#optional: reboot if you want to test it out... no need to sudo you shoud be root already... 

#########################################################################################################
#setup desktop
sudo apt-get -y update
sudo apt-get -y upgrade
sudo apt-get -y install ubuntu-desktop ubuntu-restricted-extras
sudo apt-get -y update

#########################################################################################################
#setup vnc
sudo apt-get -y install vnc4server
vncserver
#set a password
vncserver -kill :1
sudo vi ~/.vnc/xstartup
########### paste start ###################################################################################
#!/bin/sh

# Uncomment the following two lines for normal desktop:
 unset SESSION_MANAGER
 exec gnome-session &

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
x-terminal-emulator -geometry 1024x768+10+10 -ls -title "$VNCDESKTOP Desktop" &
gnome-manager &
########### paste end   ###################################################################################
#:wq

sudo vi /etc/init.d/vncserver
########### paste start ###################################################################################
#!/bin/sh -e
### BEGIN INIT INFO
# Provides:          vncserver
# Required-Start:    networking
# Default-Start:     3 4 5
# Default-Stop:      0 6
### END INIT INFO
PATH="$PATH:/usr/X11R6/bin/"

# The Username:Group that will run VNC
export USER="admin"
#${RUNAS}

# The display that VNC will use
DISPLAY="1"

# Color depth (between 8 and 32)
DEPTH="16"

# The Desktop geometry to use.
#GEOMETRY="<WIDTH>x<HEIGHT>"
#GEOMETRY="800x600"
GEOMETRY="1024x768"
#GEOMETRY="1280x1024"

# The name that the VNC Desktop will have.
NAME="my-vnc-server"

OPTIONS="-name ${NAME} -depth ${DEPTH} -geometry ${GEOMETRY} :${DISPLAY}"

. /lib/lsb/init-functions

case "$1" in
start)
log_action_begin_msg "Starting vncserver for user '${USER}' on localhost:${DISPLAY}"
su ${USER} -c "/usr/bin/vncserver ${OPTIONS}"
;;

stop)
log_action_begin_msg "Stoping vncserver for user '${USER}' on localhost:${DISPLAY}"
su ${USER} -c "/usr/bin/vncserver -kill :${DISPLAY}"
;;

restart)
$0 stop
$0 start
;;
esac

exit 0
########### paste end   ###################################################################################
#:wq

sudo chmod +x /etc/init.d/vncserver
sudo update-rc.d vncserver defaults
sudo /etc/init.d/vncserver start
#you might be asked to put the password again... 
sudo reboot

#########################################################################################################
# wait 10-15 seconds and start vnc client and make sure it works... 
# I Use TightVNC Viewer version 1.5.2 currently on windows 7 x64. works fine!
# I setup my vnc session through ssh, (read later) but you can try it unencrypted if you trust your local network!
# I set it to use 8 bit colors and custom compression set to 1 (fast) ... I DON'T CARE AT ALL IF IT LOOKS BAD! 
# I hate to wait for a refresh! + over a ssh tunnel .. it's even slower but thanks to 8bit.. 
#I don't suffer much from the added layer of security I get! Thank god! 

# Basic setup done. 
# Congrats!
#########################################################################################################
#setup apps

#remove firefox...
sudo apt-get -y remove firefox
#manually delete shortcut from panel via vnc

#... install chrome instead
wget https://dl-ssl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
chmod a+x google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome-stable_current_amd64.deb
#and add yourself the panel shortcut ;) (applications/internet/googlechrome/rightclick/add to panel)

#install latest filezilla
sudo add-apt-repository ppa:n-muench/programs-ppa 
sudo apt-get -y update 
sudo apt-get -y install filezilla
#and add yourself the panel shortcut ;) (applications/internet/filezilla)
#setup your fav servers and set max connections to 10 in edit/settings/transfer

#install transmission 2.31 (or latest)
#then setup web server and use this instead of rutorrent... some prive trackers banned rutorrent 3.2 but not transmission...
#I add transmission to my startup applications too... I kept rutorrent, it doesnt consume much cpu when it's doing nothing
#+ seedboxhosting is relying on the fact that it's up and running to tell if your server is having issues... whatever

sudo add-apt-repository ppa:transmissionbt/ppa
sudo apt-get update
sudo apt-get install transmission

#create the script madsplit.sh in /rutorrent or /data/admin up to you..  or any other folders... 
#madsplit.sh is a little bash script I created to rar files into equal parts into a subfolder of the file name, without the extension
#usage: ./madsplit.sh file.avi 10 (this example would split file.avi into 10 equal rar parts into a subfolder called file)
#note: I added a 1000 byte surplus to the files to make sure I'm not ending with an extra, really small rar file. 
#...practical to split files for faster ftp uploading! 

cd /data/admin/
vi madsplit.sh
########### paste start ###################################################################################
if [ $# -ne 2 ]; then 
echo "Usage: ./madsplit filetosplit numberofiles"
else

numofsplits=$2
filename=$1
foldername=${filename%\.*}
mkdir $foldername
rarname="${foldername}/${filename}.rar"
filesize=($(stat -c%s $filename))
splitsize=$(($filesize / $numofsplits))
splitsize=$(($splitsize + 1000))
splitsize="${splitsize}B"
rar a $rarname -m0 -v$splitsize $filename
fi
########### paste end   ###################################################################################
#:wq

#set it's executable flag!
sudo chmod +x madsplit.sh

#########################################################################################################
#customize desktop

#add shortcut to terminal in panel
#add shortcuts to ubuntu software center, update manager and system monitor...
#but edit the link's properties and add sudo (space) in front of the commands... 

#start chrome setup home page to google and also http://127.0.0.1 for rutorrent display and preferences...
#I add the remote-torrent-adder extension in chrome.. set it up for rutorrent 127.0.0.1 and your user/password!
#if you set it up remotely change 127.0.0.1 to your seedbox ip... 

#install the nice to have ubuntu tweak
sudo add-apt-repository ppa:tualatrix/ppa
sudo apt-get update
sudo apt-get -y install ubuntu-tweak


#and clean a little...
sudo apt-get clean
#... and set the time & date properly... double check the graphical update manager...
#ps: this still leaves 1.2 gigs in the root partition... (75% used) ;)
#ps2: you can check in ubuntu-tweak, many options in there + a nicer cleanup tool

#########################################################################################################
#Security Tip: Connect your vnc session via an ssh tunnel using putty on windows.

#########################################################################################################
#pptpd vpn setup
# In the following files, you will have to change the localip to your own server's ip, and change the passwords in here!
# otherwise, you can keep the rest!

sudo apt-get -y install pptpd
sudo vi /etc/pptpd.conf
########### paste start ###################################################################################
option /etc/ppp/pptpd-options
logwtmp
localip 91.121.238.30 #change it to your external server ip!
remoteip 192.168.0.10-255 #vpn clients ip range allocation
########### paste end   ###################################################################################
#:wq

sudo vi /etc/ppp/pptpd-options
########### paste start ###################################################################################
name pptpd
refuse-pap
refuse-chap
refuse-mschap
require-mschap-v2
require-mppe-128
ms-dns 8.8.8.8
ms-dns 8.8.4.4
proxyarp
nodefaultroute
lock
nobsdcomp
########### paste end   ###################################################################################
#:wq

sudo vi /etc/ppp/chap-secrets
########### paste start ###################################################################################
# Secrets for authentication using CHAP
# client        server  secret                  IP addresses
admin           pptpd  yourpassword    *
########### paste end   ###################################################################################
#:wq
# make sure you changed the password (yourpassword

sudo vi /etc/rc.local
########### paste start ###################################################################################
#before exit 0
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
########### paste end   ###################################################################################
#:wq

sudo vi /etc/sysctl.conf
#remove comment: net.ipv4.ip_forward=1
#:wq

#DONE!
sudo reboot

#You can try to connect a pptp vpn session there using your server ip, and your admin user and password !

#########################################################################################################
#further setup kernel / apps
#########################################################################################################
#do any updates that the update manager has to do prior to updating the kernel... ;) needs a reboot. go ahead!

#update kernel:
#check latest stable: http://www.kernel.org/ 
#now: 2.6.39-1

#add the repository 
sudo add-apt-repository ppa:kernel-ppa/ppa
sudo apt-get -y update

#do a search..to make sure it's available... turns out only 2.6.38-8 is in the ppa now....
# aptitude search linux-headers
#I found: linux-headers-2.6.38-8-server
# aptitude search linux-image
#I found: linux-image-2.6.38-8-server

sudo apt-get -y install linux-headers-2.6.38-8-server linux-image-2.6.38-8-server
sudo reboot
#check kernel uppon reboot:
sudo apt-get -y update
uname -a

#########################################################################################################
# Other Tips ##############################################################################################
#########################################################################################################

#########################################################################################################
#fix vnc session lock: 
#If you ever try to get into vnc, and it's a nogo, your session is most likely locked. Ssh into it with putty and do: 
sudo rm /tmp/* -r -f
sudo rm /tmp/.X1-lock -f
#try reconnecting, you might need to sudo reboot!

#########################################################################################################
# While on vpn in windows 7:
# start putty, edit your vnc already existing session or create a new one... 
# under tunnels add: dynamic tunnel and remote port 8080
# in msn messenger, it wont connect unless I set it's sock proxy to 127.0.0.1 port 8080 using the tunnel... 
# it's weird! everything else works without the proxy! Oh well... fixed it... 

#########################################################################################################
# in windows vista/7: fix vpn mtu for page loading issue:
# If you browse the net and some pages wont display.. but you get them to load with the vpn... do this. 
#---> netsh interface ipv4 set subinterface "VPN" mtu=1384 store=persistent
#replace "VPN" with the name of your vpn connection.. 

#########################################################################################################

#########################################################################################################
# The End ################################################################################################
#########################################################################################################


That's it folks! You now have a ubuntu 10.04 server ... unless you were adventurous enough to try 11.04... (tip: don't !) 
You have an ftp server along with a webserver... (used for rutorrent only now..the rest is up to you)

2 torrent clients.. rutorrent ... it's fast on public torrent sites...
and transmission .. I just happen to need it for private sites.. 

you have a vpn server that you can use to protect your privacy both at home.. or on the go if your phone / device supports vpn! 

you have a little script to help you in your day!

and most importantly, you have a full desktop environment to play with and a vnc server to access it! 
I had to do all the google searching to get all the configs working so you don't have to! Enjoy!


 

Fun in Linux Wonderland

posted Jun 17, 2011 7:52 AM by Mad Logik

A few days ago, I saw a contest to win a free seedbox server for a month... one word got my attention ..."with root access"... 
http://www.seedboxhosting.com/free-seedbox-giveaway/
So... I came up with a good tweet: 

MadLogik
MadLogik

I should get a #FreeSeedboxbecause I want to help penguins in cyberspace. A lot of penguins die hitting Windows™!http://bit.ly/freeseedbox
 via web

To Sum it all up, I won! 
But then I never imagined the journey I would get myself into... 
See I used it as a seedbox... and that was fine.. but then I enabled root access and to be honnest I had a plan in mind: make the best out of this free gift! 

On my way: I installed the complete ubuntu-desktop, an ssh and vnc .. filezilla... and I was scripting away in bash... 

Then I needed to reboot that server.. and ... vlam .. lost everything. 
I learned the hard way that this "seedbox server" was setup to re-initialize itself uppon reboot! 

I got in touch with their tech support and explained my situation... I knew I was going in unsupported territories, but OH MY GOD! 
I received the best service, friendly help and always a supporting hand! 

so now I can reboot it, partitions mount back up automatically (learned about the fstab a lot!)  and vnc starts too! 
it's still a rutorrent seedbox that I access through the front end. 
I installed chrome both on the server and at home, and I use the "remote torrent adder" extension to push torrents directly on the seedbox. 
I then created myself a little bash scripts that splits files into rar's because upload is A LOT faster 10 files at a time than 1 by one... the way their disk arrays and / or server are setup I don't know... but at 10 transfers at the same time I can max out my 30 mbps cable connection here!
LOVE IT! 

+ seeding is a pleasure when it's not your bandwidth! 

I would recommend ANYONE wishing to get a NICE RELIABLE AND FAST seedbox to do business with them! 
Especially if you thinker with the server like I did, you are going to LOVE it. 

now the only problem I have is that I will have to PAY for next month because I'm not letting go of this toy so quickly! I'm hooked! 

Otherwise... Terraria rules and Duke Nukem Forever sucks... 
Minecraft 1.7 is about to come out ... PISTONS!!!! and already it's seems amazing (look @ 2:35 for the automatic door system!) 

Back @ server now! I'm pondering about setting it up as a vpn server too! hehehehe
Geek 4 life

VoIP on the cheap, works great!

posted May 24, 2011 1:26 AM by Mad Logik


1st: YOU CAN HELP ME! (by getting me free credits so I can make more free calls)
Signup from this refferal link with localphone.com, read on my article to find out more about my setup and how you could benefit:




2nd: You might be asking about the price of the setup compared to a cellphone.... 
I'll get down to details now. 

-->I don't have a cellphone anymore, however I have an IPad with a 3G data only plan. 
So 35$ +tx a month for 5 Gigs of bandwidth.. (plenty enough even for serious data usage!)

Now the voip service....
All in all, it's expensive to get DID numbers in Canada, or downright impossible through some providers like Skype!

I tried magicjack in the past and they were able to provide numbers for a one time 10$ fee! That's pretty much the best deal there is, but the magicjack service is sometimes
unreliable (you get what you pay for)... and I have a friend that simply stopped using his magicjack even if he had time left on for using it! 
And.. MagicJack is not compatible with the ipad. 
Oh, you can dump the magicjack process memory when you start the program from your pc, to get your sip login details and then use a regular sip client to connect ... but it's against magicjack's TOS and
as I said, the service itself is not that reliable... so read along if interested (http://www.digitaloffensive.com/2010/06/mjsip-automating-the-magic-jack-sip-retrieval/)  

localphone.com offers numbers for 5$ initial setup fee and 3$ a month after. 
I then pay set rates for calling and receiving calls (0.09 cents a minute!) That's cheap enough! (18 cents for 200 minutes of talk time) !
I bet your voice plan of your cellphone is closer to 30-60$ a month alone (not counting your dataplan if you have an iphone!) ... not +/- 5$ a month! 

I was able to get a number in the 514, a voice mail, call forwarding when needed... 
I can use the line at the same time on my computer (using x-lite 4 free edition)
and on the ipad (using Acrobits softphone). (will ring on both, but read on network issues later on)

BTW: Acrobits is a GREAT APP!

It's the BEST SIP CLIENT on the iphone! There is no actual ipad version avail yet, it's in the works at acrobits.cz but not out yet. so I use it at 2x zoom on the pad.. :( 
ps: they also have the android app for you Apple Haters!
Great thing about it on apple devices: They support PUSH technology, so you don't waste your battery keeping a connection with them, they simply push your calls in to you when you get them! GREAT!!!!
(it's the only sip client I know of on the IOS that supports push).
I leave the app running, they coded it well so it relies on the push when the app is in the background! I barely noticed it's effect on the battery! If I use a direct link instead of push in acrobits, I lose about 4 hours out of 10 on the pad!
The app is 7$ + I bought a better sounding codec in app (better sound, and more compression) ideal for 3G calling, called: G.729 at 9.99$ (worth it) 

I have found out that VoIP (the sip protocol) and NAT networking (your basic home wireless router) are not good friends at all! 
see:

NAT (network address translation) is a technology that allows you to split your internet connection among your computers at home. 
instead of your internet going directly from your end to the other (123.123.123.123 --> 222.222.222.222) 
it's actually manipulating each packets to get in the form of (  computerA@123.123.123.123 ---> 222.222.222.222) .
The problem is when the end point (222.222.222.222) replies back to us... 123.123.123.123 ... and not... computerA@123.123.123.123 .. therefore we don't get inbound connections! 
VoIP already has a built-in kind of NAT going on... called extensions... you're an extension on a sip server... it relies on open inbound UDP connections witch your router blocks!

This is partially fixed by using the SIP ALG as I said before... but I found out Even then, weird things happens. 
Good thing is : My ipad has an ip for itself! so in acrobits, there's even a preference to have 3G used all the time for SIP calls! (even if you have wifi enabled for everything else) !
Great!
I'm leaving it like that and I have no more problems, and disabled the SIP ALG gate on the router too! with the G.729 codec, even low 3G coverage is enough to use it properly!
(you can read more about the issue I had by reading the ticket I had with acrobits : http://www.acrobits.cz/hesk/ticket.php?track=N5V816T47S&Refresh=40312 ) with the note about the ipad version.

know that solutions have been explored.. mediaproxies ... stun servers and whatnot...
If you want to get "callcenter" hardcore: read about: http://www.asterisk.org/


so ... back to my setup, and price: 

35$/mt for a data plan
3$/mt for a number in the region of your choice... 
+ 0.09c a minute afterwards... ! pretty darn cheap for both voice and data service!

So if you want to give it a try, please use my referral link, this way I can benefit from the help I provided you with here. 

Thanks!

NSA TIPS: How to secure your computer!

posted May 19, 2011 5:25 PM by Mad Logik


Windows, Mac, Linux, hell even SOLARIS! 
Read it, you never know, you might understand something! lol


Can't say I'm impressed with the windows 7 section.. but have a look at the mac os x guide!
this is a mac/unix bible! 


Enjoy
ps: As always, inspired from gizmodo

1-10 of 96

Sign in  |  Recent Site Activity  |  Terms  |  Report Abuse  |  Print page  |  Powered by Google Sites