Showing posts with label file. Show all posts
Showing posts with label file. Show all posts

Wednesday, September 21, 2016

Play movies in RAR file without extracting

Play movies in RAR file without extracting.
Most people like downloading movies or video files from internet, and those large files are split in several parts before being uploaded to the net. If you have downloaded movies from Rapidshare then you must have known that how troublesome is downloading those RAR video files and extract them later.

Just use this tool called “Dziobas Rar Player” that can play various internet downloaded movies with codecs like Divx or Xvid even without extracting the RAR files. The player is capable of playing files in formats AVI, MPGE, RMVB, OGG, MP3, RAR, MKV, MKA and some others.

Just download this tool and extract and run the DziobasPlayer.exe, You can then drag and drop the RAR files in the window and see the videos even without extracting.
Advantages of Dziobas RAR Player:
  1. Small and free.
  2. Play videos without the need to install codecs in the system.
  3. Play the movie RAR files even without extracting them.
  4. Also plays the corrupted RAR archive.
  5. Requires no installation.
The only disadvantage is that you won’t be able to seek videos.
Download Dziobas RAR Player
[Link 1] [Link 2]
Read More..

Tuesday, September 6, 2016

How to Copy or Hide a File inside an Image

Have a secret file and want to hide it on your system from other users? Here is a simple but cool trick that will enable you to hide a file in an image. The trick is so cool that you won’t be able to find out if the image is hiding a file behind it or not.

The jpeg image will not only look like usual image file but also work like one. The image will not only hide the document but also open in the Picture Viewer as usual. Great isn’t it?

Steps to hide files behind an Image:
  1. Create a new folder (I created in drive C: named “a”).
  2. Place all the documents/files in it that you want to hide (I stored z.txt in it).
  3. Copy any image of yours in it (I stored x.jpg in it).
  4. Make a rar archive of all the files that you need to hide (I created one named z.rar).
  5. Now open cmd (Start->Run->cmd)
  6. Go to the folder’s location by typing cd location like for me it was cd C:a
  7. Now just type the following command with name that corresponds to your file

Hide a File inside an Image

copy /b x.jpg + z.rar x.jpg

 Hide a File inside an Image

The screen will look like as shown above.

Steps to see/recover file back:

Just rename the final image to rar that is x.jpg to x.rar

The archive will be having your file
Read More..

Sunday, July 24, 2016

How to recover any file from corrupted or broken HDs SSDs or SD cards


A couple weeks ago, I lost a Raspberry Pi SD card to corruption that didnt even have backup superblocks to restore. There seemed to be nothing to do about it since I couldnt mount it. Restoring the system wasnt a big deal. However, I really wanted some of the cpp, h, js, php, sh, and other files that I had changed a good bit but hadnt yet backed up or committed. Sure we all back up and/or use git/svn but we have to remember Murphys Law.

This is a guide on how to easily recover those files that you really want but hadnt backed up.

Needed packages

To do this, we are going to use scalpel, xxd, diff, and grep (So we are most definitely using Linux)

You will already most likely have xxd, diff, and grep on your system. To install scalpel, run:
sudo apt-get install scalpel
or yum or pacman or whatever package manager you use.

**Note: It is probably a good idea to make an image of the drive and use scalpel on that if you are able.

Editing Scalpel configuration

The default scalpel configuration file is located at /etc/scalpel.conf
All you need to do is comment out the file types you dont care about and add the filetypes you do care about that arent in there.
To create custom scalpel configurations, we will use a little bit of common sense and xxd as a hex dumper.
Find a different file with the same file type or an older copy of the file you want and run the following command:
xxd -l 0x04 filename.type; xxd -s -0x04 filename.type

This will get the first 4 and last 4 bytes of the file. Which should be enough to make the filetype unique, though you can change this as needed. You should see a pattern with a lot of files.
For instance, my sh files (the ones I wrote) often start with #!/b and end with sac. or fi..
and my cpp files often start with #inc or // and end with }.
Now we will take these hex patterns, reformat them as x?? and put them into the scalpel.conf.
You should use REVERSE whenever the file may continue multiple instances of the end statement. You may also need to increase the file size from 50000 to something much bigger for larger files.

Here are some of my custom scalpel configurations:

php         y        50000    x3cx3fx70x68x70        x3fx3e REVERSE
js y 50000 x3cx73x63x72x69x70x74x20x74x79x70x65x3dx22x74x65x78x74x2fx6ax61x76x61x73x63x72x69x70x74x22x3e x3cx2fx73x63x72x69x70x74x3e 
cpp        y        50000   x23x69x6ex63              x7dx2e  REVERSE      
cpp        y        50000   x2fx2fx20                      x7dx2e             REVERSE
h            y        50000   x23x69x66x6e              x64x69x66 REVERSE
sh           y        50000   x23x21x2fx62              x73x61x63 REVERSE


Running Scalpel

Once your scalpel configuration is finished, you need to start extracting the files. This will probably take a while and will get a lot of files (multiple copies of each that match on your system). It wont know the filename or newest version but we will look at that later. You can run scalpel with the following command:
scalpel -c /etc/scalpel.conf yourcopy.img -o output
or the following if you didnt make a copy of your HDD (you will have to specify the appropriate drive and partition number).
scalpel -c /etc/scalpel.conf /dev/sdx# -o output

Once everything is finished it will be in the output folder and we can look for the newest version of your file.

Finding your files

cd into the output directory and you can see all the different filetypes organized.
cd output; ls
For all your graphical file types, i.e. videos and pictures, they should all be listed there and you will have to rename them. 
For your other files, we can use grep recursively to find our newest version. This unfortunately requires you to remember things. It is a good idea to use a function or variable name that you used in order to find your files. Ex:
grep -R "playing()" ./
Searches for the function playing in all your files, this could give you matches in js, php, cpp, c, or h files.
grep -R "::CurlWriter" ./cpp*
Searches for the definition of CurlWriter in all of the cpp files
grep -R "VoiceCommand" ./h*
Searches for the variable or function VoiceCommand in all of your header (h files)

These will probably give you a couple of different results. In my case, these were all different versions of my file. This is a really good chance to use diff. All you have to do is select two of the files and diff to see the differences. Ex:
diff ./sh-5-1/00135386.sh ./sh-5-1/00135393.sh

Once you start getting used to this, you will be better about searching for the newest function or variable name you remember. Once you narrow it down to the newest copy of your file, you can move it elsewhere.
Ex:
mv ./sh-5-1/00135393.sh ~/ImportantFile.sh


There it is, this should allow you to recover almost any file you have created from a corrupted or bad HD, SSD, or SD card.

Places you can find me
Read More..

Tuesday, May 17, 2016

Cannot delete a file

Many of the windows users may have encountered this problem. Sometimes we cannot delete a file and is suspicious of being a virus or it consumes a lots of disc space. There is a small software available for this. The software deletes the file on the next boot. But before using this software check with the following ways.
  • The simplest reason for this is that the file is open. Close the program using the file and then try deleting. Sometimes, though you’ve shut down the application running the file, the program may still be lurking in the background. Press [Ctrl] + [Alt] + [Del] to bring up the task manager and locate and end the application.
  • Another way is rename the file extension and then delete. To do this first you need to view the file extension.
    • To do this, go to “Tools >> Folder Options” in any Explorer window.
    • In the “Folder Options” window, select the “View” tab
    • Uncheck the box labeled “Hide extensions for known file types” and click “OK”.
    • Now that you can view the extensions, change the extension of the file you want to delete and then try deleting.

  • Another easy way is restart your PC in safe mode. Locate the file and then delete it.
  • If all the above efforts doesnt work you can use this software. Simply drag-drop the file into the window of this software, it will be deleted on the next boot. Click to download the software (1.95 MB)
Read More..

Friday, March 11, 2016

Voicecommand image file and controlling electronics with your voice

With the introduction of the Raspberry Pi B+, a lot of people are finding image files arent working unless updated first. Because of this, I went ahead and made a fresh image file for voicecommand on Raspbian that is A/B/B+ compatible.

You can download it at:
https://mega.co.nz/#!MM8W1JxR!4PlZ_1-dumasDUCYRI4LuiBwEJgtqhfoin0R8ls90NQ

Ive also taken the liberty of putting wiringPi and pilight on it. This means its easier than ever to control electronics with your voice (Ill post more on that later).
You can read more about it at the hackaday projects page here.

And here is a quick video demo:

Consider donating to further my tinkering since I do all this and help people out for free.



Places you can find me
Read More..

Tuesday, July 15, 2014

How to Create a Header File in C

Although a C++ programmer can use a header file to include any type of code in another file prior to compilation, they mainly use them to define a class. Typically programmers define a class interface in a header file and then write all of the class internal code in a separate source code file. In this way other programmers making use of the class directly or as part of a library need only the header file to inform themselves and the compiler how to use it. A simple class interface defined in a C++ header file can serve as both an example and a template for much larger more complex classes later.

Instructions

Things Youll Need:

  • Text or Code Editor

    Creating a Header File

  1. Step 1

    Create a new file named "MyClass.h." Enter the following three lines at the top of the file:

    #ifndef _MYCLASS
    #define _MYCLASS
    #endif

    The class will be defined between the line beginning with #define and the one beginning with #endif. These are preprocessor directives which tell the compiler to skip inclusion of this files contents if _MYCLASS has already been defined. If _MYCLASS is undefined, the compiler will define it and proceed to include the rest of the file. This prevents you from accidentally including a header file more than once, which can lead to conflicts and errors.

  2. Step 2

    Enter the following two lines after the line beginning with #define:

    #include
    using std::string;

    This example class requires a string data type. The first directive includes the header file for the string class; the second statement simplifies its use by telling the compiler which namespace to make available. Rather than typing "std::string" everywhere, you use a string you can just type "string."

  3. Step 3

    Enter the following before the line with the #endif directive:

    class MyClass
    {
    };

    This defines an empty class.

  4. Step 4

    Fill the empty class by inserting the following lines within the opening and closing brackets:

    public:
    MyClass(string val);
    void setVal(string val);
    string getVal();
    private:
    string _myDataMember;

    You have added one private class data member of type string and three public class method declarations: a constructor and two methods for accessing the data member. Task complete; class interface defined; C++ header file created. Most header files you will create or encounter will simply be more complex variations of this example

Read More..
 
Copyright 2009 Information Blog
Powered By Blogger