Showing posts with label windows 7. Show all posts
Showing posts with label windows 7. Show all posts

Tutorial: Compile Python to EXE

Posted: Monday, 15 September 2014

Click here to skip to the decompiling py2exe section
Click here to skip to the compiling Python to EXE section
Questions? Comment Section Link Here

Introduction

So we all know Python. Its a fun extension to the C language (Read: a language built on top of C). But one question, is, why can't we compile Python into an exe file, just like with C?

Now Python is an interesting language, in that it is both compiled and interpreted. In fact, there are many different implementations of the language. We have PyPy, on one hand, which does both, IronPython, which is basically a .NET compiler for Python, but the main focus is on CPython - Or what we all know as "Python". CPython is the "main reference implementation" of Python, and is the "Python" that is downloaded at https://www.python.org/.

It's weird to think that "Python" is not just Python, but makes sense considering the fact that Python is open source. A similar comparison between PyPy/IronPython and CPython can be made with JavaScript (js), where js is implemented not as "JavaScript", but as V8, spidermonkey, rhino and much more. We've come a long way from the monopoly that Microsoft has from their own programming languages, C#, VB.net and VBScript.

Hiding Drives in Windows

Posted: Thursday, 4 September 2014




If you're finding a way to hide hard drives on windows xp, 7, 8, 8.1 or any other windows devices, then there's a simple solution that doesn't involve installing or running third party programs.
In fact, if you've looked around, then the only feasible option is to use the windows registry to set flags on which hard drive to hide inside of explorer.

Disclaimer: Using the registry is dangerous, however its the lesser of evils between the choices of hacking about with the group policy (which you can't actually do without Windows 7 basic, starter and home premium, e.t.c., using command prompt to fiddle around with an even more volatile environment.
Make sure you backup your registry before continuing (for when something goes wrong now, or in the future).
So, with registry hacking, what about the big wall of text with all of those fancy numbers and what not?
A list of numbers without any immediate use. Source: ghacks.net
Well, lets skip the big wall of numbers and have a nice clickable online site that deals with this: http://extramaster.net/tools/windowsDriveCalculator/
The steps showing how the steps works is as follows.

#0 Start with an empty registry with everything remaining untouched.

Note: You don't have to navigate here, or perform this step AT ALL while using the tool - there may as well be already something here... It doesn't really matter...

#1 Find and identify the drives that you want to remove


Being a triple-quadruple boot install, no drives other then the C:\ drive is actually needed to be visible...

#2 Visit the page

You'll be greeted with something like this...

#3 Select the drives that you want to hide

#4.5 Click on the "Download" link/button to download

"Keep" the file, and then open it...

I wasn't able to screenshot the following dialogue box in Windows 7, but here's what you have to do in Windows 8.1...

#4.5.1 Run the file when the security warning pops up

#4.5.2 Accept the dialogue boxes that follow

#5 Restart Windows or log off and log back in

#6 Enjoy less hard drives cluttering explorer!

Advanced Query Syntax (AQS) is not powerful enough!

Posted: Tuesday, 19 August 2014

Windows 7 came with a nifty feature called AQS which allowed users to search files and folders based upon rules and expressions.
This functionality was extended to Windows 8 and Windows 8.1, where the syntax and concept have remained intact.
Compared to regular expressions, AQS have yet to realise its "Advanced" claim, and should really fashion itself as the "Basic Query Syntax (BQS)".
Consider this scenario. I have a list of archives that I want to search through on my computer. These archives have a specific naming structure, 01-01-01 Archive.rar, 02-01-01 Archive.rar, 03-01-01 Archive.rar... Basically following the pattern of "DD-MM-YY Name.rar"
With "AQS", you're allowed to use the AND and OR operators, where to achieve searching the said files, you could hypothetically do something like: (0 or 1 or 2 or 3 or 4 or 5 or 6 or 7 or 8 or 9) and (0 or 1 or 2 or 3 or 4 or 5 or 6 or 7 or 8 or 9) * type:.rar

Well.. This worked in Windows 7. But, since Windows 8.1 is the trend now, I updated my computer and found out that it no longer worked.

The question to be asked. Is why is it so complicated to search numbers in the first place?
  • (0-9) and (0-9) * type:.rar
  • [0-9] and [0-9] * type:.rar
  • title:(0-9) and (0-9) * type:.rar
  • title:[0-9] and [0-9] * type:.rar
  • (0-9)(0-9) * type:.rar
  • [0-9][0-9] * type:.rar
  • (0-100) * type:.rar
  • [0-100] * type:.rar
  • title:(0-100) * type:.rar
  • title:[0-100] * type:.rar
All do not work...

With regular expressions, the following works fine:

However, the same regular expression fails completely in Windows 8.1...

The best solution that I could come up to solve my problem was to use the following AQS query: ("00" OR "01" OR "02" OR "03" OR "04" OR "05" OR "06" OR "07" OR "08" OR "09" OR "10" OR "11" OR "12" OR "13" OR "14" OR "15" OR "16" OR "17" OR "18" OR "19" OR "20" OR "21" OR "22" OR "23" OR "24" OR "25" OR "26" OR "27" OR "28" OR "29" OR "30" OR "31")

Though, I guess when it comes down to it, this is just proof that the "Advanced Query Syntax" format is simply not powerful enough.

Shutdown Timer

Posted: Saturday, 22 March 2014


Application to shutdown your Windows XP, Vista, 7, 8, 8.1 computer after a predefined amount of time. So that you can allow your computer to upload files, leave and have it shutdown automatically.
It's better then using CMD to blindly time a shutdown time.
There's no ads, virus, malicious software, and the program is both lightweight and portable, being a simple program.
So here it is:
Download:
http://static.extramaster.net/ShutdownTimer.exe

MD5: 60AA856E6BB18E15FC4DF667881AC76B
SHA-256: B221ABD9537BBD79CE31C79F38F48E3163BE0462E3D9FBB4E9C32A20E1D47E82

VirusTotal Scan:
https://www.virustotal.com/en/file/b221abd9537bbd79ce31c79f38f48e3163be0462e3d9fbb4e9c32a20e1d47e82/analysis/1395407755/

Convert image to BMP

Posted: Wednesday, 19 March 2014

Recently, I got sick and tired of having to go through the process of downloading programs full of bloat and "full version" ad messages, along with other things - just to have a simple program that converts image files into BMPs.
But I also didn't just want any regular program, I didn't want to see a fully featured, super cooked "additional features" program, I wanted simple a drag and drop program that gets the job done on thousands of images.
So instead of downloading freeware programs loaded with toolbars, adware and all the other junk, and instead of loading the images one-by-one into Microsoft Paint and converting them all manually, I created a simple program that you can just drag, drop and have a bitmap image from common image formats.
I don't claim to have created a program that can convert millions of image formats to bitmap, just common formats: .jpg, .png and .gif* all seem to work fine.
There's no ads, virus, malicious software, and the program is both lightweight and portable, being a simple program.
So here it is:
Download:
http://static.extramaster.net/imagetobmp.html (2018 edit: looks like what was once detected as a perfectly clean file is now suddenly detected as a false positive malware, aw well, I should've open sourced the software on day-one, but then it would compile to the same binary and still be considered malware)

MD5: 9EEE1A103D38B1085F0CFB0B74317B6A
SHA-256: 1B5B3D233393D76493B1C0519CEF92492C3C0F0279D9755619A348A5F7B0FD2A

VirusTotal Scan:
https://www.virustotal.com/en/file/1b5b3d233393d76493b1c0519cef92492c3c0f0279d9755619a348a5f7b0fd2a/analysis/1395217684/
Note:
This .net program requires .net v4 or higher.
The program is not malicious and does not contain any toolbars, adware, or malware. It's only 33,280 bytes (~33kb if you're uncertain of the notation), so it's extremely lightweight and easy to download. And it gets the job done.
I do not keep track of anything that happens to that program (it does not auto-update, no data gets sent to any website, etc.), so as a simple disclaimer, I am not responsible for what "image to bitmap" does to your dog, cat, goldfish or horse. Or everything else asides from that...
This program overrides bitmaps that share the same appended name (file name+appended file extension) by default, which shouldn't be a big deal since the file extension is being appended, however if it does become an issue, just uncheck "Override File?"
* With animated .gif files, you only get the first frame as a bitmap, with normal .gif files, you get what you'd expect as a bitmap.