Archive

Archive for the ‘File’ Category

Windows Script Host – Clean Virus (vbs)

November 5th, 2009 Austin 4 comments

CleanVirus.vbs

When ever i start my computer the first screen that pops out is small window displaying the below message:

—————————
Windows Script Host
—————————
Can not find script file “C:\WINDOWS\system32\CleanVirus.vbs”.

---------------------------
OK
---------------------------

I am not sure why i am getting this message on every start up.

My AVG Antivirus also cannot detect this. I am not sure whether this is a virus or a worm, or a bot or something.

I don't know what should i do, for now i click on the OK button and close the window.

Kindly suggest some ideas or solutions to get rid of this message!!!!

clean virus vbs

clean virus vbs

Clever Google Tricks

October 22nd, 2009 Austin 2 comments

If you are on the hunt for free desktop wallpaper, stock images, WordPress templates or the like, using Google to search your favorite social media sites is your best bet. The word “free” in any standard search query immediately attracts spam. Why wade through potential spam in standard search results when numerous social media sites have an active community of users who have already ranked and reviewed the specific free items that interest you. All you have to do is direct Google to search through each of these individual social media sites, and bingo… you find quality content ranked by hundreds of other people.
Examples:
site:digg.com free “desktop wallpaper”
site:reddit.com free “wordpress templates”
site:del.icio.us free “stock images”
site:netscape.com free “ringtones”
site:stumbleupon.com free icons

 Google for Music, Videos, and Ebooks - Google can be used to conduct a search for almost any file type, including Mp3s, PDFs, and videos. Open web directories are one of the easiest places to quickly find an endless quantity of freely downloadable files. This is an oldie, but it’s a goodie! Why thousands of webmasters incessantly fail to secure their web severs will continue to boggle our minds.
Examples:
Find Music: -inurl:(htm|html|php) intitle:”index of” +”last modified” +”parent directory” +description +size +(wma|mp3) “Counting Crows”
Find Videos: -inurl:(htm|html|php) intitle:”index of” +”last modified” +”parent directory” +description +size +(mpg|wmv) “chapelle”
Find Ebooks: -inurl:(htm|html|php) intitle:”index of” +”last modified” +”parent directory” +description +size +(pdf|doc) “george orwell 1984″

Bonus Material:
Here is a list of my favorite Google advanced search operators, operator combinations, and related uses:
link:URL = lists other pages that link to the URL.
related:URL = lists other pages that are related to the URL.
site:domain.com “search term = restricts search results to the given domain.
allinurl:WORDS = shows only pages with all search terms in the url.
inurl:WORD = like allinurl: but filters the URL based on the first term only.
allintitle:WORD = shows only results with terms in title.
intitle:WORD = similar to allintitle, but only for the next word.
cache:URL = will show the Google cached version of the URL.
info:URL = will show a page containing links to related searches, backlinks, and pages containing the url. This is the same as typing the url into the search box.
filetype:SOMEFILETYPE = will restrict searches to that filetype
-filetype:SOMEFILETYPE = will remove that file type from the search.
site:www.somesite.net “+www.somesite.net” = shows you how many pages of your site are indexed by google
allintext: = searches only within text of pages, but not in the links or page title
allinlinks: = searches only within links, not text or title
WordA OR WordB = search for either the word A or B
“Word” OR “Phrase” = search exact word or phrase
WordA -WordB = find word A but filter results that include word B
WordA +WordB = results much contain both Word A and Word B
~WORD = looks up the word and its synonyms
~WORD -WORD = looks up only the synonyms to the word

Compress Javascript and CSS Files Using PHP

September 25th, 2009 Austin Leave a comment

Enhance your Javascript and CSS resources:

I have been doing some web applications lately, and wanted to compress my Javascript and CSS files so that page loads are quicker and also the files are cached at all times.

So i thought to myself, that we could truncate the JS and CSS files by removing the unwanted spaces and characters.

So i began writing a script that does the following:

  1. Reads JS or CSS files(s) from a particular folder called either js or css.
  2. Removes all the unwanted characters and blank spaces.
  3. Creates a new file in a new directory called js_cache or css_cache.
  4. Wallla!! we have done it, you have successfully reduced the file file size.

The script will allow you to manage easily your Javascript and CSS resources and to reduce the amount of data transferred between the server and the client.

Performances:

We can say that the performance is better but not the best, but it works.

You would see a slight reduce in time between the server and the client.

Restrictions:

In CSS files there are no problems, but in case of Javascript there may some problems where single line comments are used like ‘// comment ‘.

Therefore always use multi line comments like /* comment */ if you want to use this script

Requirements:

  1. Create a folder for you project
  2. Dump all the js files in js folder and css files in css folder
  3. Then create two more folders js_cache and css_cache
  4. Copy and paste this script in the project directory
  5. Edit the script by changing the constant FILE_TYPE as js or css only
  6. Run the script
  7. New files will be created in js_cache and css_cache
  8. Wow, its done now use these file instead of the original one

ALL THE BEST…

HAPPY SCRIPTING…..

Do keep sharing!!!

Download file:

Compress Javascript and CSS Files Using PHP

Basic AJAX (Asynchronous JavaScript and XML)

September 12th, 2009 Austin Leave a comment

Ajax, sometimes written as AJAX (shorthand for asynchronous JavaScript and XML), is a group of interrelated web development techniques used on the client-side to create interactive web applications or rich Internet applications.

With Ajax, web applications can retrieve data from the server asynchronously in the background without interfering with the display and behavior of the existing page.


/**
* Declare global variable....
* @param string elementName this is to identify the elemnt in which the response should be dispalyed. like as div id (required)
*/
var elementName = "";

/**
* Open a connection to the specified URL, which is
* intended to provide an XML message. The specified data
* is sent to the server as parameters. This is the same as
* calling xmlOpen(“POST”, url, toSend, responseHandler).
*
* @param string url The URL to connect to.
* @param string toSend The data to send to the server; must be URL encoded.
* @param function responseHandler The Javascript function handling server response.
* @param function elementIdentify The elemnt in which the response should be dispalyed.
*/
function xmlPost(url, toSend, responseHandler, elementIdentify)
{
elementName = elementIdentify;
xmlOpen(“POST”, url, toSend, responseHandler);
}

/**
* Open a connection to the specified URL, which is
* intended to provide an XML message. No other data is
* sent to the server. This is the same as calling
* xmlOpen(“GET”, url, null, responseHandler).
*
* @param string url The URL to connect to.
* @param function responseHandler The Javascript function handling server response.
* @param function elementIdentify The elemnt in which the response should be dispalyed.
*/
function xmlGet(url, responseHandler, elementIdentify)
{
elementName = elementIdentify;
xmlOpen(“GET”, url, null, responseHandler);
/**
* This code can be used if you need to call the required function after every interval i.e seconds..
* setTimeout(“xmlGet(‘products.php’, notesResponseHandler)”,3000);
* setTimeout(“alert(‘products.php’)”,3000);
*/
}

/**
* Open a connection to the specified URL, which is
* intended to respond with an XML message.
*
* @param string method The connection method; either “GET” or “POST”.
* @param string url The URL to connect to.
* @param string toSend The data to send to the server; must be URL encoded.
* @param function responseHandler The Javascript function handling server response.
*/
function xmlOpen(method, url, toSend, responseHandler)
{
// alert(url);
if (window.XMLHttpRequest)
{
// browser has native support for XMLHttpRequest object
req = new XMLHttpRequest();
}
else if (window.ActiveXObject)
{
// try XMLHTTP ActiveX (Internet Explorer) version
req = new ActiveXObject(“Microsoft.XMLHTTP”);
}

if(req)
{
req.onreadystatechange = responseHandler;
req.open(method, url, true);
req.setRequestHeader(“content-type”,”application/x-www-form-urlencoded”);
req.send(toSend);
}
else
{
alert(‘Your browser does not seem to support XMLHttpRequest.’);
}
}

/**
* Handler for server’s response to notes.xml request.
* Notes are pulled from notes.xml and replace the
* contents of the DIV with id ‘notesSection’.
*/
function notesResponseHandler()
{
// Make sure the request is loaded (readyState = 4)
if (req.readyState == 4)
{
// Make sure the status is “OK”
if (req.status == 200)
{
var swappableSection = document.getElementById(elementName);
var str = req.responseText;
swappableSection.innerHTML = str;
}
else
{
alert(“There was a problem retrieving the XML data:\n” +
req.statusText);
}
}
}

/**
* When a file gets included in the page….
* Call the function on load or on click….
*/
//xmlGet(‘products.php’, notesResponseHandler);
//alert(‘called’);

Secure PHP Applications (PHP Security)

June 1st, 2009 Austin Leave a comment

To understand PHP security better let us first understand what is PHP and Security

Security is a process, not a product, and adopting a sound approach to security during the process of application development will allow you to produce tighter, more robust code.

(PHP Hypertext Preprocessor) A scripting language used to create dynamic Web pages. With syntax from C, Java and Perl, PHP code is embedded within HTML pages for server side execution. It is commonly used to extract data out of a database and present it on the Web page

PHP is a powerful scripting language for building web applications, and also one of the easiest ways for hackers to gain access to your web server. Developers need to understand how their scripts can be exploited in order to protect them.

PHP is widely used in many high-end applications that maybe a Web Based (Internet) or and Intranet Applications. We can say that from the total PHP in Web Based (Internet) Applications : 80% and Intranet Applications:20%.

As IBM as suggested few basic principles that we could follow to make our website secure and guard our application from any vulnerabilities:

Validate input
Guard your file system
Guard your database
Guard your session data
Guard against Cross-Site Scripting (XSS) vulnerabilities
Verify form posts
Protect against Cross-Site Request Forgeries (CSRF)
  1. Validate input
  2. Guard your file system
  3. Guard your database
  4. Guard your session data
  5. Guard against Cross-Site Scripting (XSS) vulnerabilities
  6. Verify form posts
  7. Protect against Cross-Site Request Forgeries (CSRF)

Windows XP DOS Commands And Tricks

May 28th, 2009 Austin Leave a comment

Very few of us know some trick of CMD of windows XP i have used many and also known some. So i have created a list of useful Win XP CMD tools that can be used.

Hope it helps you!!!!

ipconfig – Windows IP configuration

Useful for troubleshooting your internet connection. Displays the current IP address of your computer and the DNS server address. If you call your ISP for reporting a bad internet connection, he will probably ask you to run ipconfig.

fc – Free BeyondCompare in XP

FC is an advanced DOS Command that compares two files and displays the differences between them. Though the file comparison results are not as interactive as BeyondCompare or Altova DiffDog, fc is still very useful. You can even set fc to resynchronize the files after finding a mismatch.

type – open text files sans Notepad

Similar to Unix cat command, Type is my favorite DOS command for displaying the contents of a text files without modifying them. When used in combination with more switch, type splits the contents of lengthy text files into multiple pages. Avoid using the type command with binary files or you’ll hear alien PC beeps and see some greek characters on your PC.

ping – Say hello to another computer

Ping network command followed by the web-address or IP address tells you about the health of the connection and whether the other party is responding to your handshake request. Ping tool can also be used to convert the web address to a physical IP address.

tree – visual directory structure

You often need to take prints of your physical directory structure but XP has no simple “visual” commands for printing directory contents. Here, try the Tree DOS command and redirect the output to a text file.

tree > mydirectory.txt

print mydirectory.txt

attrib – make hidden files visible

Attrib lets you change attributes of System files and even hidden files. This is great for troubleshooting Windows XP. Say your XP doesn’t boot ever since you edited that startup boot.ini file (Hidden), use attrib to remove the Hidden attibute and edit the file using EDIT dos command.

assoc – which program will open that .xyz file

The assoc DOS command can be used to either isplay or even modify the file name extension associations. The command assoc .htm will quickly tell you the name of your default web browser (see picture)

move – more flexible than copy-paste

Say you got a lot of XLS and DOC files in you MyDocuments folder and want to move only those XLS files that have their name ending with 2006. In XP Explorer, you have to manually select each file and then cut-paste to another folder. However, the DOS move command make things much simpler. Just type the following at the command prompt:

move *2006.xls c:\2006Reports\

bootcfg

Configures, queries, or changes Boot.ini file settings.

defrag

Locates and consolidates fragmented boot files, data files, and folders on local volumes.

diskpart

Manages disks, partitions, or volumes.

driverquery

Queries for a list of drivers and driver properties.

eventcreate

Enables an administrator to create a custom event in a specified event log.

eventquery

Lists the events and event properties from one or more event logs.

eventtriggers

Displays and configures event triggers on local or remote machines.

fsutil

Manages reparse points, managing sparse files, dismounting a volume, or extending a volume.

getmac

Obtains the media access control (MAC) address and list of network protocols

helpctr

Starts Help and Support Center.

ipseccmd

Configures Internet Protocol Security (IPSec) policies in the directory service, or in a local or remote registry. Ipseccmd is a command-line version of the IP Security Policies Microsoft Management Console (MMC) snap-in.

logman

Manages and schedules performance counter and event trace log collections on local and remote systems.

openfiles

Queries, displays, or disconnects open files.

pagefileconfig

Displays and configures the paging file Virtual Memory settings of a system.

perfmon

Enables you to open a Performance console configured with settings files from Windows NT 4.0 version of Performance Monitor.

prncnfg

Configures or displays configuration information about a printer.

prndrvr

Adds, deletes, and lists printer drivers from local or remote print servers.

prnjobs

Pauses, resumes, cancels, and lists print jobs.

prnmngr

Adds, deletes, and lists printers or printer connections, in addition to setting and displaying the default printer.

prnport

Creates, deletes, and lists standard TCP/IP printer ports, in addition to displaying and changing port configuration.

prnqctl

Prints a test page, pauses or resumes a printer, and clears a printer queue.

relog

Extracts performance counters from performance counter logs into other formats, such as text-TSV (for tab-delimited text), text-CSV (for comma-delimited text), binary-BIN, or SQL.

sc

Retrieves and sets information about services. Tests and debugs service programs.

schtasks

Schedules commands and programs to run periodically or at a specific time. Adds and removes tasks from the schedule, starts and stops tasks on demand, and displays and changes scheduled tasks.

shutdown

Shuts down or restarts a local or remote computer.

systeminfo

Queries the system for basic system configuration information.

taskkill

Ends one or more tasks or processes.

tasklist

Displays a list of applications, services, and the Process ID (PID) currently running on either a local or a remote computer.

tracerpt

Processes event trace logs or real-time data from instrumented event trace providers and allows you to generate trace analysis reports and CSV (comma-delimited) files for the events generated.

typeperf

Writes performance counter data to the command window or to a supported log file format.

WMIC

Eases the use of Windows Management Insturmentation (WMI) and systems managed through WMI.

Exception Processing Message c00000a3 Parameters 75b6bf7c 4 75b6bf7c 75b6bf7c

May 28th, 2009 Austin 8 comments

—————————
Windows – Drive Not Ready
—————————
Exception Processing Message c00000a3 Parameters 75b6bf7c 4 75b6bf7c 75b6bf7c
—————————
Cancel Try Again Continue
—————————

Exception Processing Message c00000a3 Parameters 75b6bf7c 4 75b6bf7c 75b6bf7c

Exception Processing Message c00000a3 Parameters 75b6bf7c 4 75b6bf7c 75b6bf7c

I was getting this message when i inserted my pendrive (memory stick) in my machine, the when i was trying to remove the pen drive using the “Safely remove drive”, it was giving me some error so removed it manually without stopping it and after that when i restarted my machine it gave me this error.

There were many solutions that i found on the net using GOOGLE but only one worked for me.

Solution 1: Go to Control Panel -> System -> Hardware -> Device Manager -> Disable Floppy Disk
And your done the message will not pop any more

If you need to know more about the error message or the pop up then you can click on
1. Start -> Run -> and type eventvwr.msc
2. In that click on System and there would be a list of the pops ups or errors information.

MCA SEM 1, 2, 3, 4 , 5 and 6 Examination Dates

April 11th, 2009 Austin Leave a comment

PROGRAMME OF THE MASTER’S DEGREE IN COMPUTER APPLICATIONS (M.C.A.)

(SEM 1, 2, 3, 4 , 5 and 6 ) EXAMINATION DATES

Hello guys i have attached 5 PDF files for repective Semister, please download it and start preparing for the exams.

Very less time and so much to do.

All the best and please share anything to everyone.

Lets grow as one and share…….

Open a new window using Javascript

February 19th, 2009 Austin Leave a comment

JavaScript : window.open

There are few times we would like top open a pop window to show some data or also be user interactive bu showing a good form in a pop window, window.open can be used for this pupose

We can directly write window.open(url) in the anchor tag, but let be more innovative and give more flexibility to our code, so we write a wrapper function around it.

The below example provides a broader view:

/* Function : New Window
|
| Description : This parameter defines how you want the new window to appear.
| This parameter is ignored if an existing window is to be reused.
| The contents of this parameter is a comma separated list of sub-parameters.
|
| Arguments :-
|
| left : yes or no
| specifies the recommended distance from the left of the
| screen to the left of the new window.
| top : yes or no
| specifies the recommended distance from the top of the
| screen to the top of the new window.
| width : yes or no
| specifies the width of the content area for the new window
| (including any scrollbars etc). |
| Note. IE7 will not allow you to set width below 250px.
| height : specifies the height of the content area for the new window
| (including any scrollbars etc).
| Note. IE7 will not allow you to set height below 150px.
| menubar : can be set to yes or no to indicate whether or not the new window
| should display a menubar.
| toolbar : can be set to yes or no to indicate whether or not the new window
| should display a toolbar.
| location : can be set to yes or no to indicate whether or not the new window
| should display the location |
| status : can be set to yes or no to indicate whether or not the new window
| should display the status bar.
| resizable : can be set to yes or no to indicate whether or not the new window can be resized.
| scrollbars : can be set to yes or no to indicate whether or not the new window
| should display scrollbars if required.
|
| Optional :-
|
| replace : This parameter defines how an existing window is to be reused.
| If true then the new page replaces the current page in the browser history.
| If false the new page is added to the browser history.
|
| Example: window.open(“URL”,”width=350, height=400, toolbar=no, resize=yes, scrollbars=yes, status=no, menubar=yes”);
|
| @access public
| @param string
| @param int
| @param int
| @return void
*/
function new_window(url,swidth,sheight)
{

var width = (swidth) ? swidth: 600;
var height = (sheight) ? sheight: 500;

if(url != “”)
window.open(url,”new_window”,”toolbar=no, width=”+width+”, height=”+height+”, status=no,scrollbars=yes, resize=yes, menubar=no”);
}

How to Upload Images from a Directory & MySQL table

September 11th, 2008 Austin Leave a comment

Upload Images from a Directory & PHP & MySQL table:-

//This will automatically refresh the page so timeout wont be an issue.

function set_update_images()
{
$next = get_param(‘next’);
$next = ($next) ? $next:0;

$dir_images = “images folder path”;

$sql_query = “SELECT *
FROM table_name
ORDER BY id
LIMIT $next , 10
” ;
$next+=2;
$uqid = db_query($sql_query);
if(db_num_rows($uqid) > 0)
{
while($arr = db_fetch_array($uqid))
{
$file_info = $dir_images.$arr['pcode'].’.jpg’;
if(is_file($file_info))
{
echo ‘<hr>’;
echo $file_info .’<br>’;
$id = $arr['id'];
echo ‘<br>’.$arr['pcode'];
$_FILES['image']['name'] = $arr['pcode'].’.jpg’;
$_FILES['image']['tmp_name'] = $file_info;
$_FILES['image']['type'] = ‘image/jpeg’;
$_FILES['image']['error'] = 0;

echo ‘<hr>’;
echo $name = $_FILES["image"]["name"];
$name1 = explode(“.”,$name);
echo ‘<pre>’;
print_r($name1);
echo ‘</pre>’;

$file_name = remove_illegals($name1[0]);
echo ‘<hr>’;
echo $fname = $file_name .”_”.$id.”.”.$name1[1];
echo ‘<hr>’;

//Thumbnail image
$resizeImg->resize($_FILES,’image’,$CFG->thumb_w,$CFG->thumb_h);
if($resizeImg->saveTo($fname, $CFG->dirproducts.”thumb/”))
{
$flag_for_upload_t=1;
}

$updt_qry = “UPDATE table_name SET image= ‘”.$fname.”‘ WHERE id =’”.$id.”‘”;

$uqid1 = db_query($updt_qry);

}
}

?>
<script language=”javascript” type=”text/javascript”>
//alert(“Next batch of <?php //echo $next; ?> starting now!”);
window.location= “products/products.php?next=<?php echo $next; ?>”;
</script>
<?php
}
}