Web Images Videos Maps News Shopping Gmail more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Destructive Windows Script
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  Messages 1 - 25 of 28 - Collapse all  -  Translate all to Translated (View all originals)   Newer >
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
rbt  
View profile  
 More options Jun 5 2005, 8:38 pm
Newsgroups: comp.lang.python
From: rbt <r...@athop1.ath.vt.edu>
Date: Sun, 05 Jun 2005 20:38:43 -0400
Local: Sun, Jun 5 2005 8:38 pm
Subject: Destructive Windows Script
How easy or difficult would it be for a computer forensics expert to
recover data that is overwritten in this manner? This is a bit off-topic
for comp.lang.python, but I thought some here would have some insight
into this.

Warning: **This code is destructive**. Do not run it unless you fully
understand what you're doing!!!

os.chdir('/temp')
for root, dirs, files in os.walk('.'):
     for f in files:
         try:
             print f

             data = ['0', 'a', '1', 'b', '2', 'c',\
                     '3', 'd', '4', 'e', '5', 'f',\
                     '6', 'g', '7', 'h', '8', 'i',\
                     '9', 'j', '~', '!', '@', '#',\
                     '$', '%', '^', '&', '*', ';']

             fp = file(os.path.join(root,f), 'w')
             random.shuffle(data)
             garble = ''.join(data)
             fp.write(garble)
             fp.close()

             fs = os.popen("del /f /q /s *")
             fs.read()
             fs.close()

         except Exception, e:
             print e
             time.sleep(1)
             continue


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Roose  
View profile  
 More options Jun 5 2005, 8:53 pm
Newsgroups: comp.lang.python
From: "Roose" <b...@b.b>
Date: Mon, 06 Jun 2005 00:53:31 GMT
Local: Sun, Jun 5 2005 8:53 pm
Subject: Re: Destructive Windows Script
My guess would be: extremely, extremely easy.  Since you're only writing 30
bytes for each file, the vast majority of the data will still be present on
disk, just temporarily inaccessible because of the del command.  And more
than likely it will be possible to recover 100% if they are using a
journaling file system like NTFS, which Windows XP does.

If you are honestly trying to destroy your own data, go out and download a
free program that will do it right.  If you're trying to write some kind of
trojan, well you've got a lot of learning to do.  :)

R


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
rbt  
View profile  
 More options Jun 5 2005, 9:03 pm
Newsgroups: comp.lang.python
From: rbt <r...@athop1.ath.vt.edu>
Date: Sun, 05 Jun 2005 21:03:18 -0400
Local: Sun, Jun 5 2005 9:03 pm
Subject: Re: Destructive Windows Script

Roose wrote:
> My guess would be: extremely, extremely easy.  Since you're only writing 30
> bytes for each file, the vast majority of the data will still be present on
> disk, just temporarily inaccessible because of the del command.  And more
> than likely it will be possible to recover 100% if they are using a
> journaling file system like NTFS, which Windows XP does.

> If you are honestly trying to destroy your own data, go out and download a
> free program that will do it right.  If you're trying to write some kind of
> trojan, well you've got a lot of learning to do.  :)

Thanks for the opinion... I don't do malware. Just interested in
speeding up file wiping (if possible) for old computers that will be
auctioned. The boot programs that you allude to (killdisk, autoclave)
work well, but are slow and tedious. If this can be done *properly* in
Python, I'd like to have a go at it.

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Chris Lambacher  
View profile  
 More options Jun 5 2005, 9:12 pm
Newsgroups: comp.lang.python
From: Chris Lambacher <lamba...@gmail.com>
Date: Sun, 5 Jun 2005 21:12:57 -0400
Local: Sun, Jun 5 2005 9:12 pm
Subject: Re: Destructive Windows Script
The reason they are slow and tedious is that they need to write to
every byte on the disk.  Depending on the size of the disk, there may
be a lot of data that needs to be written, and if they are older
computers, write speed may not be particularly fast.

-Chris

On 6/5/05, rbt <r...@athop1.ath.vt.edu> wrote:

--
Christopher Lambacher
lamba...@computer.org

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
rbt  
View profile  
 More options Jun 5 2005, 9:16 pm
Newsgroups: comp.lang.python
From: rbt <r...@athop1.ath.vt.edu>
Date: Sun, 05 Jun 2005 21:16:34 -0400
Local: Sun, Jun 5 2005 9:16 pm
Subject: Re: Destructive Windows Script

Chris Lambacher wrote:
> The reason they are slow and tedious is that they need to write to
> every byte on the disk.  Depending on the size of the disk, there may
> be a lot of data that needs to be written, and if they are older
> computers, write speed may not be particularly fast.

OK, I accept that, but if you have a HDD that's 8GB total and it has 1GB
of files, why must every byte be written to? Why not just overwrite the
used portion?

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Robert Kern  
View profile  
 More options Jun 5 2005, 9:27 pm
Newsgroups: comp.lang.python
From: Robert Kern <rk...@ucsd.edu>
Date: Sun, 05 Jun 2005 18:27:25 -0700
Local: Sun, Jun 5 2005 9:27 pm
Subject: Re: Destructive Windows Script

rbt wrote:
> Chris Lambacher wrote:

>>The reason they are slow and tedious is that they need to write to
>>every byte on the disk.  Depending on the size of the disk, there may
>>be a lot of data that needs to be written, and if they are older
>>computers, write speed may not be particularly fast.

> OK, I accept that, but if you have a HDD that's 8GB total and it has 1GB
> of files, why must every byte be written to? Why not just overwrite the
> used portion?

Because sometime in the past, you may have had 8 GB of data on there.
There's no reliable way to know which bytes have been used and which
haven't.

This is a case where "doing it properly" means "slow."

--
Robert Kern
rk...@ucsd.edu

"In the fields of hell where the grass grows high
  Are the graves of dreams allowed to die."
   -- Richard Harter


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Peter Hansen  
View profile  
 More options Jun 5 2005, 9:33 pm
Newsgroups: comp.lang.python
From: Peter Hansen <pe...@engcorp.com>
Date: Sun, 05 Jun 2005 21:33:49 -0400
Local: Sun, Jun 5 2005 9:33 pm
Subject: Re: Destructive Windows Script

rbt wrote:
> Chris Lambacher wrote:

>> The reason they are slow and tedious is that they need to write to
>> every byte on the disk.  Depending on the size of the disk, there may
>> be a lot of data that needs to be written, and if they are older
>> computers, write speed may not be particularly fast.

> OK, I accept that, but if you have a HDD that's 8GB total and it has 1GB
> of files, why must every byte be written to? Why not just overwrite the
> used portion?

What do you think is in the "unused" space, given that much of it likely
had files at some time in the past, maybe even older copies of some of
the files that are currently "live"?  If you haven't wiped all those
files previously, their data is still quite accessible.

-Peter


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Terry Reedy  
View profile  
 More options Jun 5 2005, 11:27 pm
Newsgroups: comp.lang.python
From: "Terry Reedy" <tjre...@udel.edu>
Date: Sun, 5 Jun 2005 23:27:02 -0400
Local: Sun, Jun 5 2005 11:27 pm
Subject: Re: Destructive Windows Script

"Chris Lambacher" <lamba...@gmail.com> wrote in message

news:af37e9c5050605181211ac575b@mail.gmail.com...

> The reason they are slow and tedious is that they need to write to
> every byte on the disk.  Depending on the size of the disk, there may
> be a lot of data that needs to be written, and if they are older
> computers, write speed may not be particularly fast.

I would expect programs called killdisk, autoclave, etc to not only write
every byte multiple times, but to also work at the lowest level to try to
manipulate track alignment to wipe out any residual signals off the current
tracks.   That is *really* slow.

(Note: the ultimate security is to shread or incenerate the disk platters.
I believe this is now standard practice in super security areas.)

OP: if you merely want to wipe the data enough to protect against a casual
user, using casual access thru normal open and read, and not the FBI disk
forensics/recovery lab (;-), one write would be enough.

On *nix, one could open '/dev/rawdisk' (actual name depends on the *nix
build) and write a tracks worth of garbage for as many tracks as there are.
I don't how to programmaticly get the track size and number (if there is a
standard way at all).

For Windows, you would need the appropriate low-level system call, but I
have no idea what it is or if it is the same for different versions.  Same
for other non *nix systems.

Terry J. Reedy


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Paul Rubin  
View profile  
 More options Jun 6 2005, 12:14 am
Newsgroups: comp.lang.python
From: Paul Rubin <http://phr...@NOSPAM.invalid>
Date: 05 Jun 2005 21:14:37 -0700
Local: Mon, Jun 6 2005 12:14 am
Subject: Re: Destructive Windows Script

rbt <r...@athop1.ath.vt.edu> writes:
> Thanks for the opinion... I don't do malware. Just interested in
> speeding up file wiping (if possible) for old computers that will be
> auctioned. The boot programs that you allude to (killdisk, autoclave)
> work well, but are slow and tedious.

Yes, you have to overwrite all the bytes on the disk, which can be slow.

If the drive has ultra-sensitive data on it though, you should not
auction it no matter what wiping software you've used.  Think of bad
sector forwarding that might have happened while the drive was in
service.  The drive firmware might have copied some sector that had
recoverable errors to a new sector sometime in the past, and
transparently mapped the new sector to the old location, so that
normal I/O operations will never find the old sector to erase it.  But
suitable forensic methods might still be able to get it back.

The only way to be 100% sure the data is gone from a drive, is
basically to melt the drive.  However, if your data is that sensitive,
you shouldn't ever write it to a hard drive in the clear anyway.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Michele Simionato  
View profile  
 More options Jun 6 2005, 9:15 am
Newsgroups: comp.lang.python
From: "Michele Simionato" <michele.simion...@gmail.com>
Date: 6 Jun 2005 06:15:41 -0700
Local: Mon, Jun 6 2005 9:15 am
Subject: Re: Destructive Windows Script
BTW, since this is a bit off-topic anyway, how do I recover
files accidentally removed? Is there a free tool that works
on FAT/NTFS and ext2/ext3?
Thanks,

                 Michele Simionato


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Christos TZOTZIOY Georgiou  
View profile  
 More options Jun 6 2005, 9:24 am
Newsgroups: comp.lang.python
From: Christos "TZOTZIOY" Georgiou <t...@sil-tec.gr>
Date: Mon, 06 Jun 2005 16:24:21 +0300
Local: Mon, Jun 6 2005 9:24 am
Subject: Re: Destructive Windows Script
On 05 Jun 2005 21:14:37 -0700, rumours say that Paul Rubin
<http://phr...@NOSPAM.invalid> might have written:

>The only way to be 100% sure the data is gone from a drive, is
>basically to melt the drive.  However, if your data is that sensitive,
>you shouldn't ever write it to a hard drive in the clear anyway.

A little healthy insanity never hurt anyone in the security field :)
--
TZOTZIOY, I speak England very best.
"Be strict when sending and tolerant when receiving." (from RFC1958)
I really should keep that in mind when talking with people, actually...

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Robert Kern  
View profile  
 More options Jun 6 2005, 9:34 am
Newsgroups: comp.lang.python
From: Robert Kern <rk...@ucsd.edu>
Date: Mon, 06 Jun 2005 06:34:32 -0700
Local: Mon, Jun 6 2005 9:34 am
Subject: Re: Destructive Windows Script

Michele Simionato wrote:
> BTW, since this is a bit off-topic anyway, how do I recover
> files accidentally removed? Is there a free tool that works
> on FAT/NTFS and ext2/ext3?

On all of those filesystems at the same time? Probably not. But there
are tools for each. Google, and ye shall find.

--
Robert Kern
rk...@ucsd.edu

"In the fields of hell where the grass grows high
  Are the graves of dreams allowed to die."
   -- Richard Harter


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Michele Simionato  
View profile  
 More options Jun 6 2005, 10:04 am
Newsgroups: comp.lang.python
From: "Michele Simionato" <michele.simion...@gmail.com>
Date: 6 Jun 2005 07:04:26 -0700
Local: Mon, Jun 6 2005 10:04 am
Subject: Re: Destructive Windows Script
The problem is that Google gives me too many non-relevant hits.

I just would like something like this:

$ rm what-I-think-is-an-useless-file

ACK! It was not that useless!!

$ recover what-I-think-is-an-useless-file

               Michele Simionato


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Robert Kern  
View profile  
 More options Jun 6 2005, 10:10 am
Newsgroups: comp.lang.python
From: Robert Kern <rk...@ucsd.edu>
Date: Mon, 06 Jun 2005 07:10:56 -0700
Local: Mon, Jun 6 2005 10:10 am
Subject: Re: Destructive Windows Script

Michele Simionato wrote:
> The problem is that Google gives me too many non-relevant hits.

google("fat undelete")
google("ext2 undelete")

--
Robert Kern
rk...@ucsd.edu

"In the fields of hell where the grass grows high
  Are the graves of dreams allowed to die."
   -- Richard Harter


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Terry Reedy  
View profile  
 More options Jun 6 2005, 3:20 pm
Newsgroups: comp.lang.python
From: "Terry Reedy" <tjre...@udel.edu>
Date: Mon, 6 Jun 2005 15:20:33 -0400
Local: Mon, Jun 6 2005 3:20 pm
Subject: Re: Destructive Windows Script

"Dennis Lee Bieber" <wlfr...@ix.netcom.com> wrote in message
news:ioh7a1liqm1qpu0a1l0qmmb7n3gqehtl26@4ax.com...

> My previous facility didn't even accept mil-spec wipes -- all
> disk drives leaving the facility had to go through a demagnitizer,

OT but I am curious: does a metallic case act as a metallic shield, so that
the case needs to be opened to do this?  (Conversely, is a magnet near a
disk drive a danger to it?)

> wiped everything, including control tracks, and played <bleep> with the
> R/W head and positioning magnets.

I take this to mean the the drive is non-functional and might have well
been melted, except that demagnetising is cheaper.

TJR


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Grant Edwards  
View profile  
 More options Jun 6 2005, 3:45 pm
Newsgroups: comp.lang.python
From: Grant Edwards <gra...@visi.com>
Date: Mon, 06 Jun 2005 19:45:46 -0000
Local: Mon, Jun 6 2005 3:45 pm
Subject: Re: Destructive Windows Script
On 2005-06-06, Terry Reedy <tjre...@udel.edu> wrote:

> OT but I am curious: does a metallic case act as a metallic shield,

It depends on the metal and the case thickness.  Thin
sheet-aluminum provides virtually no magnetic shielding.  Some
good thick iron plate will provide shielding.

> so that the case needs to be opened to do this?

No.

> (Conversely, is a magnet near a disk drive a danger to it?)

Yes, if it's strong enough.

>> wiped everything, including control tracks, and played <bleep>
>> with the R/W head and positioning magnets.

> I take this to mean the the drive is non-functional and might
> have well been melted, except that demagnetising is cheaper.

Yup.

--
Grant Edwards                   grante             Yow!  Why are these
                                  at               athletic shoe salesmen
                               visi.com            following me??


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
rbt  
View profile  
 More options Jun 6 2005, 4:39 pm
Newsgroups: comp.lang.python
From: rbt <r...@athop1.ath.vt.edu>
Date: Mon, 06 Jun 2005 16:39:43 -0400
Local: Mon, Jun 6 2005 4:39 pm
Subject: Re: Destructive Windows Script

Terry Reedy wrote:
> "Dennis Lee Bieber" <wlfr...@ix.netcom.com> wrote in message
> news:ioh7a1liqm1qpu0a1l0qmmb7n3gqehtl26@4ax.com...

>>My previous facility didn't even accept mil-spec wipes -- all
>>disk drives leaving the facility had to go through a demagnitizer,

> OT but I am curious: does a metallic case act as a metallic shield, so that
> the case needs to be opened to do this?  (Conversely, is a magnet near a
> disk drive a danger to it?)

Absolutely. Small HDD's (like laptops) are especially vulnerable to
magnetic force.

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mike Meyer  
View profile  
 More options Jun 6 2005, 4:50 pm
Newsgroups: comp.lang.python
From: Mike Meyer <m...@mired.org>
Date: Mon, 06 Jun 2005 15:50:38 -0500
Local: Mon, Jun 6 2005 4:50 pm
Subject: Re: Destructive Windows Script

"Terry Reedy" <tjre...@udel.edu> writes:
> On *nix, one could open '/dev/rawdisk' (actual name depends on the *nix
> build) and write a tracks worth of garbage for as many tracks as there are.
> I don't how to programmaticly get the track size and number (if there is a
> standard way at all).

Modern Unix systems assume drives don't care much about geometry, what
with sector forwarding and variable track lengths and the like.

Just open the raw disk device (assuming your Unix has such), and start
writing data to it. Keep going until the write fails at the end of the
media.

        <mike
--
Mike Meyer <m...@mired.org>                  http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
rbt  
View profile  
 More options Jun 6 2005, 4:55 pm
Newsgroups: comp.lang.python
From: rbt <r...@athop1.ath.vt.edu>
Date: Mon, 06 Jun 2005 16:55:52 -0400
Local: Mon, Jun 6 2005 4:55 pm
Subject: Re: Destructive Windows Script

Wouldn't /dev/urandom or /dev/random on Linux systems work better? It's
the kernel's built in random number generator. It'd fill the drive with
random bits of data. You could loop it too... in fact, I think many of
the pre-packaged *wipe* programs are mini Linux distros that do just this.

dd if=/dev/random of=/dev/your_hard_drive


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Grant Edwards  
View profile  
 More options Jun 6 2005, 5:17 pm
Newsgroups: comp.lang.python
From: Grant Edwards <gra...@visi.com>
Date: Mon, 06 Jun 2005 21:17:44 -0000
Local: Mon, Jun 6 2005 5:17 pm
Subject: Re: Destructive Windows Script
On 2005-06-06, rbt <r...@athop1.ath.vt.edu> wrote:

>> Just open the raw disk device (assuming your Unix has such),
>> and start writing data to it. Keep going until the write fails
>> at the end of the media.

> Wouldn't /dev/urandom or /dev/random on Linux systems work
> better?

Maybe.  Last time I found an article on the subject (should
have kept a copy), it suggested certain patterns for the
initial passes, and then random data for the last passes.  

The data is converted into one of several RLL encodings (which
encoding depends on the drive). The optimal erase patterns
depended on the encoding used, so you have to use a several
different patterns to cover all the bases.

Googling for "secure disk erase pattern rll encoding"...

Here's a good but somewhat old paper:

  http://www.cypherus.com/resources/docs/shred.htm

and here's a newer one that deals more with secure deletion of
individual files:

  http://www.usenix.org/events/sec01/full_papers/bauer/bauer_html/

and finally the US Navy's take on the issue:

  http://www.fas.org/irp/doddir/navy/5239_26.htm

> It's the kernel's built in random number generator. It'd fill
> the drive with random bits of data.

The "really random" device will block when it runs out of
entropy.  It will probably take the kernel a _long_ time to
generate a disk's worth of random data.  The pseudo-random
device won't block, but the results aren't quite as secure.

> You could loop it too... in fact, I think many of the
> pre-packaged *wipe* programs are mini Linux distros that do
> just this.

> dd if=/dev/random of=/dev/your_hard_drive

--
Grant Edwards                   grante             Yow!  I always liked FLAG
                                  at               DAY!!
                               visi.com            

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mike Meyer  
View profile  
 More options Jun 6 2005, 6:21 pm
Newsgroups: comp.lang.python
From: Mike Meyer <m...@mired.org>
Date: Mon, 06 Jun 2005 17:21:19 -0500
Local: Mon, Jun 6 2005 6:21 pm
Subject: Re: Destructive Windows Script

Well, that would certainly make a good source for the data you write.

> It's the kernel's built in random number generator. It'd fill the
> drive with random bits of data. You could loop it too... in fact, I
> think many of the pre-packaged *wipe* programs are mini Linux distros
> that do just this.

> dd if=/dev/random of=/dev/your_hard_drive

That works. You may want to set a block size for performance reasons.

      <mike
--
Mike Meyer <m...@mired.org>                  http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "reg php.ini equivalent file in python" by praba kar
praba kar  
View profile  
 More options Jun 7 2005, 3:11 am
Newsgroups: comp.lang.python
From: praba kar <prabapyt...@yahoo.co.in>
Date: Tue, 7 Jun 2005 08:11:23 +0100 (BST)
Local: Tues, Jun 7 2005 3:11 am
Subject: reg php.ini equivalent file in python
Dear All,

      I have one doubt. Is there python.ini
file like php.ini in Php?

      Actually php.ini file controls many aspects of
PHP's behavior. The following details of php.ini
will explain about it.

max_execution_time = 5000     ; Maximum execution time
of each script, in seconds (UNIX only)

memory_limit = 134217728        ; Maximum amount of
memory a script may consume (128MB)

post_max_size = 67108864        ; Maximum POST-Content
length (64MB)

If I want to update the above details in Python where
I need to change these things in Python

regards,
Prabahar

_______________________________________________________
Too much spam in your inbox? Yahoo! Mail gives you the best spam protection for FREE! http://in.mail.yahoo.com


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
flamesrock  
View profile  
 More options Jun 7 2005, 4:56 am
Newsgroups: comp.lang.python
From: "flamesrock" <flamesr...@gmail.com>
Date: 7 Jun 2005 01:56:29 -0700
Local: Tues, Jun 7 2005 4:56 am
Subject: Re: reg php.ini equivalent file in python
I think it depends on your os variables

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
bruno modulix  
View profile  
 More options Jun 7 2005, 6:05 am
Newsgroups: comp.lang.python
From: bruno modulix <on...@xiludom.gro>
Date: Tue, 07 Jun 2005 12:05:59 +0200
Local: Tues, Jun 7 2005 6:05 am
Subject: Re: reg php.ini equivalent file in python

praba kar wrote:
> Dear All,

>       I have one doubt. Is there python.ini
> file like php.ini in Php?

bruno@localhost ~ $ python -h
usage: python [option] ... [-c cmd | file | -] [arg] ...
(snip)
PYTHONSTARTUP: file executed on interactive startup (no default)
(snip)

I guess this is the closer thing.

>       Actually php.ini file controls many aspects of
> PHP's behavior. The following details of php.ini
> will explain about it.

> max_execution_time = 5000     ; Maximum execution time
> of each script, in seconds (UNIX only)

> memory_limit = 134217728        ; Maximum amount of
> memory a script may consume (128MB)

> post_max_size = 67108864        ; Maximum POST-Content
> length (64MB)

All those settings are somewhat web-specific, and would not have much
meaning in most Python usages.

> If I want to update the above details in Python where
> I need to change these things in Python

This (if possible) depends on the web developpement solution you use
(cgi, mod_python, CherryPy, Webware, Zope, other...).

--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in 'on...@xiludom.gro'.split('@')])"


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "Destructive Windows Script" by Magnus Lycka
Magnus Lycka  
View profile  
 More options Jun 8 2005, 7:50 am
Newsgroups: comp.lang.python
From: Magnus Lycka <ly...@carmen.se>
Date: Wed, 08 Jun 2005 13:50:21 +0200
Local: Wed, Jun 8 2005 7:50 am
Subject: Re: Destructive Windows Script

rbt wrote:
>             data = ['0', 'a', '1', 'b', '2', 'c',\
>                     '3', 'd', '4', 'e', '5', 'f',\
>                     '6', 'g', '7', 'h', '8', 'i',\
>                     '9', 'j', '~', '!', '@', '#',\
>                     '$', '%', '^', '&', '*', ';']

Note that the backslashes are redundant between pairs
of [ ], ( ) or { }. Just write:

             data = ['0', 'a', '1', 'b', '2', 'c',
                     '3', 'd', '4', 'e', '5', 'f',
                     '6', 'g', '7', 'h', '8', 'i',
                     '9', 'j', '~', '!', '@', '#',
                     '$', '%', '^', '&', '*', ';']

(Not that it solves your disk wiping issue.)


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Messages 1 - 25 of 28   Newer >
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google