Solved

floppy lock

Posted on 2004-04-27
4
236 Views
Last Modified: 2010-04-15
please give me a windows based floppy drive and cd drive authentiction using 'c' but without using assembler
0
Comment
Question by:mdamjad
  • 2
4 Comments
 
LVL 12

Expert Comment

by:stefan73
ID: 10936764
Hi mdamjad,
Be more specific. What do you want to achieve?

Cheers,
Stefan
0
 
LVL 9

Expert Comment

by:ankuratvb
ID: 10937698
Hi mdamjad,

You already have an open thread on the same question.
http://oldlook.experts-exchange.com:8080/Programming/Programming_Languages/C/Q_20969167.html

You shouldve specified this clarification in that thread itself.

0
 
LVL 8

Accepted Solution

by:
manish_regmi earned 125 total points
ID: 11013745
hi,
 You need to hook int 13 dl=0.
It can be done using turbo c 2.0 without assembly language but not withhout  the concept of assembly or pc architecture.

#include <dos.h>
#include <stdio.h>

void interrupt (*int13)();

void interrupt hooked()
{
   if(_DL == 0)
   {
   /* You are accessing floppy */
    printf("Floppy is locked by mdamjad\n");
   }
   /* if harddisk is accessed. let him go. */
    else
      int13();
}
void main()
{
       int13 = getvect(0x13);
       setvect(0x13, &hooked);
 }

Use for educational purpose only.

regards manish
0
 
LVL 8

Expert Comment

by:manish_regmi
ID: 11013839
oh,
 I forgot to tell. It will only work on DOS. Maybe on win95 and win98.
It will NOT work on Windows nt/2000/xp.

happy hacking.
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Preface I don't like visual development tools that are supposed to write a program for me. Even if it is Xcode and I can use Interface Builder. Yes, it is a perfect tool and has helped me a lot, mainly, in the beginning, when my programs were small…
Examines three attack vectors, specifically, the different types of malware used in malicious attacks, web application attacks, and finally, network based attacks.  Concludes by examining the means of securing and protecting critical systems and inf…
The goal of this video is to provide viewers with basic examples to understand how to create, access, and change arrays in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use switch statements in the C programming language.

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question