Publications
Error Handling in PHP Part-I
Introduction
If you’re a developer, I’m sure you’ve experienced an error message in PHP. In fact, you should be quite familiar with the standard error message format such as this one caused by a call to the header() function after output as started:
Warning: Cannot add header information – headers already sent by (output started at /home/zend.com/proc.inc:6) in /home/zend.com/www/modify_account.php on line 41
This is a fairly typical error message — but did you know that this error message could be changed? In fact, not only can the format of the error message be changed, new features and logic (such as sending an e-mail when an error occurs) can also be developed. Today, we’ll explore custom error handling in PHP, and how you can use it to standardize and simplify error handling from within your scripts.
How to Hide a Process
Processes can be hidden in both Windows (from the Ctrl+alt+delete menu) and Linux (from ps and top).
In windows:
Programs listed as services are not shown up.
Example Borland c code:
//--------------HiddenApp.cpp--------------
#include
#pragma hdrstop
USERES("HiddenApp.res");
USEFORM("Unit1.cpp",Form1);
typedef DWORD (WINAPI *TRegisterServiceProcess)(DWORD,DWORD);
bool registered=false;
//-----------------------------------------------------------------------
void __fastcall reg(bool which) //true=register, false=unregister
{
HMODULE hmod;
TRegisterServiceProcess pReg;
hmod = LoadLibrary("kernel32.dll");
if (!hmod) return;
(FARPROC)pReg = (FARPROC)::GetProcAddress(hmod,"RegisterServiceProcess");
if (!pReg) {FreeLibrary(hmod); return;}
else
{
if (which)
pReg(0,1); //unregister our process
else
pReg(0,0);
}
registered = true;
FreeLibrary(hmod);
}
//-----------------------------------------------------------------------
WINAPI WinMain(HINSTANCE,HINSTANCE,LPSTR,int)
{
try
{
reg(true);
Application->Initialize();
Application->CreateForm(__classid(TForm1), &Form1;);
Application->Run();
}
catch (Exception &exception;)
{
Application->ShowException(&exception;);
}
if (registered) reg(false);
return 0;
}
//--------------eof--------------------------------------------------------
Example delphi code:
Net Use Complete Command Reference How to Tutorial
NET Command Syntax Chart The following chart can be used as a quick reference to the options available from the NET command. The NET Command Syntax Chart itself is available on-line using the NET KEY command.
The NET Command
The NET Command Program
NET Command Syntax Chart
NET ASCII
NET BOOT
NET CLOSE
NET CLIENTS
NET COMBINE
NET CONTINUE
NET DEBUG
NET DELAY
NET GHOST
NET FLUSH
NET HELP
NET KEY
NET LOAD
NET LOGOFF
NET LOGON
NET MENU
NET MODEM
NET PAUSE
NET PASSWORD
NET PEERS
NET PING
NET PORTS
NET PRINT
NET PRNSETUP
NET RC / Remote Control
NET RECEIVE
NET RING
NET SEND
NET SEPARATE
NET SERVERS
NET SHARE
NET TIME / DATE
NET USE / CONNECT
NET VERSION
NET VIEW
Symbols Purpose { } Braces indicate a parameter you must use [ ] Brackets indicate an optional parameter | Bar indicates a choice of parameters * Used in place of password, prompts for password /D Indicates that you wish to cancel a NET SHARE or NET USE /L Locks a NET USE command, the NET USE cannot be cancelled /RWC Specifies network access rights /R /W /RW /WC /RWC d: Indicates a drive letter from A: to Z: (LASTDRIVE= parameter must be set in your CONFIG.SYS file if you wish to use drives F: thru Z:) path Indicates a drive and directory (e.g. C:ACCOUNTS) password 1-8 Character password (case insensitive) computername 1-15 Characters identifying a CLIENT or SERVER computer name device A DOS device name:- PRN, LPT1,2,3,4, COM1,2,3,4, AUX1,2,3,4 number 1-25 digit telephone number (may include Hayes dial syntax) servername 1-15 characters identifying a SERVER computer name sharename 1-16 character name that represents a DOS path or DOS device name syspass 1-16 character password (System Administration Password) username 1-8 character username (for use with the NET LOGON command) You must include all punctuation (except braces, brackets and bars) such as periods, equal signs, forward slashes and backslashes, where illustrated in the syntax.
How Face Recognition Works
And possible uses (Biometrics)
How it works:
THe first bit in the process is recoginising a face a in a photo and seperating it from a background. The program recognises the shape of a face, and the increases lighting and then sets to work on it
Face recognition works by looking at the distances apart points on the face are. Key points include:
Distance between eyes
Width of nose
Depth of eye sockets
How to Hide Files in Windows
Note: this will not keep fbi/police/anyone who knows computers really good from finding your files, only computer illiterate people and people who aren’t really looking for incriminating files on your computer.
Hiding The Files/Directories:
1) hide directories
2) encrypted directories
3) CDs and floppies
Hiding The Evidence:
1) browser history
2) cookies
3) temp files
4) windows history (Start->documents)
Ok, let me first start off with why you would want to do this. You live at home with your parents and your brothers and sisters. They all use the computer every once and a while, but you use it all day. You do a few things on it that you would rather keep any of them from knowing about. ex. hacking. I’ll try to share some knowledge I’ve gained on keeping things secret from people on windows, I don’t know if this will work with any other versions of windows (most likely they will). I will keep this very short and to the point, there are tons of little details that I could get into, but it would be a waste of everyone’s time. Just think to yourself how to keep them more secret and you’ll be more productive than reading 40 pages by me telling you not to write down the location of your files on a post-it by the monitor.
I’ve decided to break this tutorial down into 2 main categories. Hiding Files And Directories is the first, and Hiding The Evidence is the second.