- Prison Code Breaker Diary -

=> aka: Nhật Kí Code Tù

Categories

Showing posts with label Hacks. Show all posts

#!/bin/bash
#Valentin Heinitz, www.heinitz-it.de, 2008-11-13
#Reader for MS Windows 3.1 Ini-files
#Usage: inireader.sh
# e.g.: inireader.sh win.ini ERRORS DISABLE
# would return value "no" from the section of win.ini
#[ERRORS]
#DISABLE=no
INIFILE=$1
SECTION=$2
ITEM=$3
cat $INIFILE | sed -n /^\[$SECTION\]/,/^\[.*\]/p | grep "^[:space:]*$ITEM[:space:]*=" | sed s/.*=[:space:]*//

I got it from here.

Linux bash shell provides 2 types of test:
+ ( -ot ) : is other than
+ ( -nt ) : is newer than


#!/bin/sh

if [ "$file1" -nt "$file2" ]
then
    echo -e "$file1 is newer than $file2"
else
    echo -e "$file1 is older than $file2"
fi

It's possible. Yes, it is!

NOTE: this guide is for education purposes only, not promoting for illegal actions

Requirements:
1. Crossover Linux Professional 7.0: get it here: Download

2. Installation package for Ms Office 2007.

How-to:

1. From menu, choose CrossOver -> Install Windows Software. Pick Microsoft Office 2007, locate the setup.exe file, then install it as in Windows.

2. After all installation done, we need to crack it though.
a. Get this file: Proof.XML
b. Replace the old one located under:

/home/[YOUR_USER_NAME]/.cxoffice/MSOffice/drive_c/Program Files/Common Files/Microsoft Shared/OFFICE12/Office Setup Controller/Proof.en
c. From CrossOver menu -> Run a Windows Command, type: regedit
d. Find the key: HKLM\Software\Microsoft\Office\12.0\Registration\DigitalProductID, and delete it.
e. Close all CrossOver-related program.
d. Under main menu: Applications, you can see Windows Application menu, and enjoy !


Enjoy !

Here's the trick, using the -o, and L option we can search for what we need to print out

ps -opid -A

The End!

Oh yes, it took me time to search for this.
Here's the trick:


ps -o"%C" -p #PID

or simplified version

ps -opcpu -p #PID

The End :D

This is my new shot of command prompt.

Right click then select "Properties".

$ Option -> Command History -> Buffer Size -> 500
$ Option -> Command History -> Discard Old Duplicates -> True
$ Option -> Edit Options -> QuickEdit Mode -> True
$ Layout -> Screen Background -> Height -> 999
$ Layout -> Window Size -> Height -> 50
$ Color -> Screen Text -> RGB: 0 255 0
$ Color -> Screen Background -> RGB: 0 55 0

Change the title using TITLE utility


C:/> title "[JaPh] - Shell"

Have fun!

Use xrandr utility to change the screen resolution.
Example, if I want to change my screen resolution into 1280x800 (60 Hz) I will type


terminal> xrandr -s 1280x800

Have fun!

This is my little video guide through the wargame of SmashTheStack.Org

Wargame: SmashTheStack.Org | IO | Level 5
Creator: [JaPh]
Video: [ OGV | Length: 18.08 min | 72.1 MB | Super High Quality ]
Download: Rapidshare
Password: [japh]

Have fun!@

This is my little video guide through the wargame of SmashTheStack.Org

Wargame: SmashTheStack.Org | IO | Level 4
Creator: [JaPh]
Video: [ OGV | Length: 10.50 min | 31.8 MB | Super High Quality ]
Download: Rapidshare
Password: [japh]

Have fun!@

This is my little video guide through the wargame of SmashTheStack.Org

Wargame: SmashTheStack.Org | IO | Level 3
Creator: [JaPh]
Video: [ OGV | Length: 13.38 min | 30.5 MB | Super High Quality ]
Download: Rapidshare
Password: [japh]

Have fun!@

This is my little video guide through the wargame of SmashTheStack.Org

Wargame: SmashTheStack.Org | IO | Level 2
Creator: [JaPh]
Video: [ OGV | Length: 12.26 min | 36 MB | Super High Quality ]
Download: Rapidshare
Password: [japh]


Have fun!@

SmashTheStack Wargame Video Guide Series
Creator: [JaPh]


Have you ever heard of SmashTheStack.Org ?
Yeah, they provide really nice wargames for practicing computer skills.
If you have any troubles, I provide this series as a little guide for you.

The IO Wargame

Level 1 - Guide
Level 2 - Guide
Level 3 - Guide
Level 4 - Guide
Level 5 - Guide

[ to be continued ... ]

Have fun!@

This is my little video guide through the wargame of SmashTheStack.Org

Wargame: SmashTheStack.Org | IO | Level 1
Creator: [JaPh]
Video: [ OGV | 24.1 MB | Super High Quality ]
Download: Rapidshare
Password: [japh]

Have fun!@

There are various ways to delete files in Linux like:

+ rm
+ unlink
+ rename

Personally, I always use [rm] since it's short and supports cool options for file-deleting.

1. Delete one single file


$ rm file_name

2. Delete all files start w/ letter 'x'

$ rm x*

3. Delete all files end w/ string 'conf'

$ rm *conf

4. Delete all files in the current directory

$ rm *.*

5. Prompt before delete file

$ rm -i file_name

6. Delete all files w/o prompting

$ rm -f *.*

7. Delete recursively from files to directories w/o prompting

$ rm -f -r *.*

8. Get help for deleting

$ rm --help


Have fun!@

1. First you need to register your key here


Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows]
"AppInit_DLLs"="AppInitDLL.dll"
"LoadAppInit_DLLs"=dword:00000001

2. Open VC++ create a Win32 DLL Project

Source below just to test if it works

#include

BOOL APIENTRY DllMain( HINSTANCE hInstance, DWORD reason, LPVOID reserved )
{
switch( reason )
{
case DLL_PROCESS_ATTACH:
MessageBoxA( NULL, "Hey! It works!", "Calling", 0 );
break;
default:
break;
}

return TRUE;
}

3. Build project in Release mode then put the DLL file into C:\Windows\

4. Try to run any application


[*] Evaluation:
- It's very incovenient since the DLL will be called by every single process which imported from user32.dll

Have fun!@

This is the most simple version of DLL Injection

1. VC++ 2k5 (any version is ok), New Project -> Win32 Project
- Empty Project DLL

2. Add new C source file:


#include <windows.h>

BOOL APIENTRY DllMain( HINSTANCE hIns, DWORD reason, LPVOID reserved )
{
switch( reason )
{
case DLL_PROCESS_ATTACH:
MessageBoxA( NULL, "Process Attach", "MsgBox", 0 );
break;
case DLL_PROCESS_DETACH:
MessageBoxA( NULL, "Process Detach", "MsgBox", 0 );
break;
case DLL_THREAD_ATTACH:
MessageBoxA( NULL, "Thread Attack", "MsgBox", 0 );
break;
case DLL_THREAD_DETACH:
MessageBoxA( NULL, "Thread Detach", "MsgBox", 0 );
break;
}

return TRUE;
}

3. Build project in Release mode.

4. Use a DLL Injector to inject this DLL into any process.
- You can use this Injector: Winject (by mcMike)

[*] I will mention about writing injector later on.

Have fun!@

The game: http://apps.facebook.com/bejeweledblitz/

In order to hack this game, you need to prepare these:

1. Firefox browser

2. Get add-ons: GreaseMonkey (Google, ok?)

3. Install the script made by CyberShadow: Click here

Visit the game then just find the rest yourself :D

Have fun!@