Using C/C++, write something on a sector of CD, and marking as Bad sector. Possible??

Optical Storage Technical Discussions Discuss, Using C/C++, write something on a sector of CD, and marking as Bad sector. Possible?? at Computer Hardware forum; Hi, I am working on a crucial application (eg, APP.EXE) and this I will distribute to my client(s). But it is possible that he may generate duplicate CD's and sale-out. I am trying for a programming-based solution in C/C++, so that I can write some information (may be a KEY)

Old Posted: 16-01-2005
default_avatar
Sharad (New on Forum)
Posts: 13
  • Find More Posts by Sharad
Hi,

I am working on a crucial application (eg, APP.EXE) and this I will distribute to my client(s). But it is possible that he may generate duplicate CD's and sale-out.

I am trying for a programming-based solution in C/C++, so that I can write some information (may be a KEY) on a specific Sector of that CD. Then copying APP.EXE on CD and then marking that particular sector BAD (Somehow). This Bad sector will be searched by APP.EXE during execution at client system and verify the same key there.

I think on making duplicate copies of that CD, the information will not be copied.

But my first task is to "Write data on a sector of CD and mark it as bad"

Looking for any guy who can help me in this.

Take care.
Bye

Sharad
default_avatar
Today (MyCE Staff)
Posts: 15,596
Old Posted: 16-01-2005
default_avatar
docdocdoc9 (CD Freaks Member)
Posts: 246
  • Find More Posts by docdocdoc9
A bad sector can't be read at all : you can't place a key there. But you can, for example, fill a file on the with bad sectors except in some places where there will be actual data (the data which will be checked). The resulting file will not be readable by normal users, but still you can access the data hidden in it by opening it in binary mode and seeking to these locations (that's how safedisc 1 and the old laserlok worked btw)

However this kind of protection is easyly copyable with any program capable of writing in raw mode and ignoring bad sectors...
Old Posted: 16-01-2005
spath (Moderator)
Posts: 993
  • Find More Posts by spath
You can find Truman's C++ code to write raw sectors (SPTI method)
in the "Home made tools" thread at the top of the forum. To make the
sector "bad", you can corrupt a few control fields of the sector you're writing.
Old Posted: 16-01-2005
default_avatar
Sharad (New on Forum)
Posts: 13
  • Find More Posts by Sharad
Quote:
Originally Posted by docdocdoc9
A bad sector can't be read at all : you can't place a key there. But you can, for example, fill a file on the with bad sectors except in some places where there will be actual data (the data which will be checked). The resulting file will not be readable by normal users, but still you can access the data hidden in it by opening it in binary mode and seeking to these locations (that's how safedisc 1 and the old laserlok worked btw)

However this kind of protection is easyly copyable with any program capable of writing in raw mode and ignoring bad sectors...
I am new in this Field of R&D.

Can you send me a simple code so that I can write something on a Sector od CD (in VB / C / C++ / C+ / VB.NET / MFC / API ...)

Any help is appreciated.

bye.
Sharad Kapil Sharma
Old Posted: 16-01-2005
default_avatar
Sharad (New on Forum)
Posts: 13
  • Find More Posts by Sharad
Hellp spath,

I am new in this field and I am working on such assignment for the first time.
I will be greatful if you can send me a small smaple program, so that i can store some data in a sector of CD-ROM.

Thanks in advance.
Sharad Kapil Sharma
Old Posted: 16-01-2005
default_avatar
Sharad (New on Forum)
Posts: 13
  • Find More Posts by Sharad
can anybody try this file which is related with CD protection.

Because I am unable to expllore it.

URL is:

http://www.codeguru.com/forum/showth...26145#poststop

Bye and look
Sharad Kapil Sharma
Old Posted: 16-01-2005
spath (Moderator)
Posts: 993
  • Find More Posts by spath
Err, I already pointed you to C++ source code to do what
you want. To be more clear, get http://upload.cdfreaks.com/tools/writecd_v1_00.zip
Old Posted: 16-01-2005
default_avatar
Matth (CDFreaks Resident)
Posts: 1,554
  • Find More Posts by Matth
If the numbers are small enough to handle manual registration, I'd forget fiddling with the CD (though any anti-copying there may be a further distraction), and go for a random or systematic "challenge" key generation, which must be validated by you providing a a matching answer.

Basic requirements of a CD protection system for software:
1. Minimize false negatives, a system which has too meny problems, will be a USE prevention system, not a copy prevention system.
2. Difficult to copy accurately, and detectable by the software if not.

One fairly simple suggestion, if YOU have a "multi-sheep" writer, is to write some difficult "sheep test" patterns , and read segments of that file - of course, beaten by any copy drive that is equal in sheep!

I'd doubt that you could write anything, that cannot be copied by a writer of the same calibre.
Old Posted: 18-01-2005
default_avatar
Sharad (New on Forum)
Posts: 13
  • Find More Posts by Sharad
Hi Matth,

Thanks for reply.

While exploring you 2nd point, I searched deeply in this forum (and other too) and found some possible tricks for Cd-Protection solution.

One of the URL i am giving below...
URL: http://www.cdmediaworld.com/hardware...otect_cd.shtml

I tried with Create a Copy Protected CD #1, for this i downloaded cdr36b-e.exe, and it's key. but unfortunately key was not working on this.

The second way is, Create a Copy Protected CD #2, According to this trick, we can copy-protect a Data CD by adding a dummy Data track so that the backup disc will have 2 Data tracks.

If the second track has a different CD "mode" than the first track then the CD WON'T BE COPIED AT ALL.

Use the following CDRWin CUE-Sheet to write the CD.

FILE "HMM3.BIN" BINARY
TRACK 01 MODE1/2352
INDEX 01 00:00:00
TRACK 02 MODE2/2352
INDEX 01 73:30:45

For this I downloaded CDRWin CUE-Sheet (CUE.EXE) and started working with this.

I explored this utility as much as I can but could not get the solution, the reason may be, I am new in this field of CD - R&D. Can you help me to overcome from this problem.

Thanks for any suggestion and help.

Regards,
Sharad
Old Posted: 18-01-2005
default_avatar
Sharad (New on Forum)
Posts: 13
  • Find More Posts by Sharad
Hi Spath

Thanks for your support.

Today, I have downloaded this source code and started trying with this to find solution.

I will inform you whatever I explore in this code.

Regards,
Sharad (Kapil)
Old Posted: 19-01-2005
default_avatar
kamuixtv (CD Freaks Rookie)
Posts: 38
  • Find More Posts by kamuixtv
I'm not sure what are you trying to do but CDmage and FB has an option to correct errors.
__________________
My devices: Date Acquired:
Lite-On 24x 24102b 1/2002
Asus 104 (Pioneer 104) 11/2002
Liteon-On 415s (mod VS0E firmware) 1/2005

My media:
DVD:
Ritek
ProdiscG02
Old Posted: 21-01-2005
default_avatar
Sharad (New on Forum)
Posts: 13
  • Find More Posts by Sharad
Hi Friends,

We have windup our project for CD protection using software tools.
Now we are planning for purchasing Dingle locks for that.

Thanks for all your supports and helps you provided to me.

Any body please feel free to discuss his/her problems in VB6/VB.NET/C#.NET/ASP.NET/SQL SERVER.

Welcome.

Regards.
Sharad
Old Posted: 21-01-2005
default_avatar
Matth (CDFreaks Resident)
Posts: 1,554
  • Find More Posts by Matth
Dongles are often not well liked, with the old parallel port dongles, users moving to a "legacy free" system, or using certain hardware had problems. If you use a USB dongle, and the product price is worth it, I'd advise having some cheap USB hubs (get 'em branded as an advertising gimmick), to pacify those complaining about losing a USB port!

The alternative to dongling, is authentication - also not well liked, as if the challenge key is randomly generated on install, the response key (authentication) will need to be replaced at every re-install (Serif use this approach, even on their "free" software, and it is WELL irritating).

The other way of generating the "challenge" key, is similar to the Microsoft way, using parameters of the system that will not change on a reinstall - then the authentication can be stored, or repeated without being adversely queried.
Old Posted: 22-01-2005
default_avatar
Sharad (New on Forum)
Posts: 13
  • Find More Posts by Sharad
Hello Matth,

Thanks for your suggestions

Bye.
Old Posted: 05-04-2007
default_avatar
quasarchangel (New on Forum)
Posts: 2
  • Find More Posts by quasarchangel
I know this is a very old thread, but Spath, if you are still here, you said that one could make a bad sector by corrupting a few control fields of the sector I am writing. Can you be a bit more specific? I am quite new to this. I downloaded the ImgtoCd tool in the "Home made tools" thread, and would like to use it to write a bad sector somewhere on a cd. I have been trying to do it with other stuff like using an ASPI Dll from here, but now have the Imgtocd program that uses SPTI from Truman.

Could someone please give me some ideas or help with this?
Old Posted: 06-04-2007
default_avatar
[fusion] (New on Forum)
Posts: 10
  • Find More Posts by [fusion]
you just need to edit the sectors from your image in an hex editor, i.e EDC/ECC fields ect. Then you would just need to write it back raw, you could use any commercial writting software like clonecd
Old Posted: 18-05-2008
default_avatar
snallaka (New on Forum)
Posts: 2
  • Find More Posts by snallaka
Hi,

I am nivas.I generated one software,which avoids exe files piracy in c.ds.I completed it in few months back.but i dont no how to promote it.
Old Posted: 19-05-2008
TM (CDFreaks Resident)
Posts: 582
  • Find More Posts by TM
Quote:
Originally Posted by snallaka View Post
Hi,

I am nivas.I generated one software,which avoids exe files piracy in c.ds.I completed it in few months back.but i dont no how to promote it.
Hello

It is not very difficuilt to "promote" your "product". But you need a little time. I'd guess ~6-12 month and you'll find your product using Google. Maybe it will be found faster by Google. This depends on the cross links posted in forums, websites, ....

You should give your product a unique name. This is a good idea to be sure only your product will be found by Searchengines. It does not make sence to name your product only "copy protection". Maybe "Exe Copyprotection Superduper 200 XXL" would be an option
You should also have a homepage for your product with a description of features, screenshots, all information for the user to make the decision to download your tool.
It is also a good idea to list your tool on download sites. There are very much of this sites.
If your product is good and useful, users will talk about your cool tool in chats, forums, netnews,.... this will make your tool atractive for search engines....

Try it and you'll see in a few weeks you'll find your tool using i.e. Google.

Have luck

Greets TM


It will take a little bit of time to make and if your product is useful the user will promote the product for you with positive message

First you should gi
__________________
Currently in use, build in
Samsung SH-S182M build in Shuttle SD32G2 Barebone (SH-S182x LeadIn problem with DVD-R)
Pioneer DVR-215D build in MSI Hetis 965 (my internet PC)
TEAC DV-W24ES build in Samsung P35 XVM1800 Notebook
TSST TS-L633L (SATA) build in Samsung Q210 Aura - P8400 Notebook

Currently in use, external housing (All enclosures are Mapower/Fantec H51)
Panasonic SW-9574-C and Panasonic SW-9576-C (USB/FW)
Pioneer DVR-115L V1.18 (crossflashed DVR-115D) (USB)
Samsung SH-S202N SB01 (USB/FW)
BenQ DW1650 BCIC (USB/FW)
Plextor PX-716A V1.11 (USB/FW)
Plextor PX-760A V1.06 (USB/FW)
Plextor Premium V1.07 (USB/FW)
Plextor Premium II V1.03 (USB/FW)
Yamaha CRW-F1 V1.0g (USB)

Still sometimes in use
Panasonic UJ-835 (Slimline)(Mapower KC51S USB/FW)
Plextor PX-40TS V1.14 and PX-W1210TSi V1.06 in one SCSI case

Currently only in "stock" (and not for sale!) (List of true Plextor drives) (How to find out the total burn time)
6x Plextor PX-760SA (new in the box), one is for my upcoming Shuttle SP35P2 Pro Barebone
4x Plextor PX-760A (new in the box)
2x Plextor PX-716A (new in the box)
2x Plextor Premium II (new in the box)
1x Plextor Premium (new in the box)
1x Plextor PX-W2410TA V1.04 (My only IDE drive "Made in Japan", since it works perfect I will not throw it away )
Old Posted: 04-12-2008
default_avatar
gpic (New on Forum)
Posts: 3
  • Find More Posts by gpic
Hi!
Can anybody re-upload the file from post №7 (writecd_v1_00.zip) ,please?

p.s.Sorry for bad English.
Old Posted: 04-12-2008
Truman (Moderator)
Posts: 670
  • Find More Posts by Truman
Quote:
Originally Posted by gpic View Post
Hi!
Can anybody re-upload the file from post №7 (writecd_v1_00.zip) ,please?

p.s.Sorry for bad English.
It was removed because quite a few people complained it hanged their machine..

It was just a basic program to select raw write type (DAO) 2448 bytes per sector and send a file stream to the drive, and there is no secondary buffer, no error handling, leadin or leadout generation, etc. I thought people could modify the code and not just use it as is, ouch.

Anyway I wrote a more complete working source that uses TAO write mode called ImgToCD. You can get from here:
http://www.cdtool.pwp.blueyonder.co.uk/workshop.htm
__________________
Truong Hy-Xpert tools -PerfectRip
Old Posted: 04-12-2008
default_avatar
gpic (New on Forum)
Posts: 3
  • Find More Posts by gpic
Hello Truman.Thank you for reply.
Quote:
It was just a basic program to select raw write type (DAO) 2448 bytes
probably not just basic program=)
Spath wrote:
Quote:
You can find Truman's C++ code to write raw sectors (SPTI method) in the "Home made tools" thread at the top of the forum. To make the sector "bad", you can corrupt a few control fields of the sector you're writing.
then wrote:
Quote:
Err, I already pointed you to C++ source code to do what
you want. To be more clear, get http://upload.cdfreaks.com/tools/writecd_v1_00.zip
I need in sources(delphi or c++)
Quote:
write something on a DVD-sector, and marking as Bad sector.
i'm go on your site=) Sorry for my terrible english..
Old Posted: 07-12-2008
default_avatar
gpic (New on Forum)
Posts: 3
  • Find More Posts by gpic
anyone have any ideas ? How write iso image on a DVD and marking as bad sector the first 10 mb ?
WIN your own LG N2B1 NAS with 2TB of Storage!*

To win, tell us why you want to win and tell ,or show us (graphic, video, etc.) why you think Life's Good with LG NAS.
*US only  Not registered yet? Register now!

Hello guest,
default
To benefit from all extra features you need to log in or sign up.

Search this Thread

New Posts

Posting Rules

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

People who found this also searched for

  • .exe file to create bad sectors
  • c cd reading bad sector
  • c disk write
  • c read sector
  • dvd read edc ecc c#
  • gpic usb
  • how to read sector 0 in vb.net
  • read sector c dvd
  • read sector dvd vb
  • read sector in c
  • read write sector api
  • sector using c program
  • spti.c
  • vb.net raw read
  • write cd c#
  • write sector usb
  • .net write to sector
  • access cd sectors
  • access certain cector on cdrom c#
  • access disk sector through c
  • access hard disc sectors with c#
  • access hard disk sector using c
  • access sectors cd delphi
  • access the disk sector in c programming
  • bad sector api
  • bad sector c
  • bad sector c#
  • bad sectors source code delphi
  • burn bad sector cdrom
  • burn bad sectors using vb
All times are GMT +2. The time now is 18:16.
Top