Hackerszone
Welcome Guest,
learn to hack easily with tutorials, python, notepad hacks and more!
Join today, fast and free!

Are you new to hacking? Learn the basics in computer configuration, hacking tools, and hacker terminology all found here on this forum!

Join today!!

Join the forum, it's quick and easy

Hackerszone
Welcome Guest,
learn to hack easily with tutorials, python, notepad hacks and more!
Join today, fast and free!

Are you new to hacking? Learn the basics in computer configuration, hacking tools, and hacker terminology all found here on this forum!

Join today!!
Hackerszone
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Search
 
 

Display results as :
 

 


Rechercher Advanced Search

HZ Tracker
Hacking Widget Visitor Details
Latest topics
»  How to study to understand and apply RPA?
[Python] Infinite / Definite File Generator EmptyTue Feb 02, 2021 7:12 am by manas41

» SQL injection and Quote escaping
[Python] Infinite / Definite File Generator EmptySun Jun 28, 2015 11:42 am by ADS1

» [TUT] Chmod: Files & Permissions [TUT]
[Python] Infinite / Definite File Generator EmptyThu Jun 04, 2015 12:45 pm by Guest

» Reaver pixiewps
[Python] Infinite / Definite File Generator EmptyThu Jun 04, 2015 12:23 pm by voidfletcher

» How To Crash Someone's Skype in 10 SECONDS
[Python] Infinite / Definite File Generator EmptyThu Jun 04, 2015 12:20 pm by voidfletcher

» Internet Security & IP Security (IPSec)
[Python] Infinite / Definite File Generator EmptyMon May 18, 2015 9:00 pm by voidfletcher

» [Python] Infinite / Definite File Generator
[Python] Infinite / Definite File Generator EmptyMon May 18, 2015 8:58 pm by ADS1

» [C#] String Case-Inversion
[Python] Infinite / Definite File Generator EmptyMon May 18, 2015 8:57 pm by ADS1

» Rekall Memory Forensic Framework
[Python] Infinite / Definite File Generator EmptySat May 16, 2015 8:55 pm by ADS1

Who is online?
In total there are 6 users online :: 0 Registered, 0 Hidden and 6 Guests

None

[ View the whole list ]


Most users ever online was 38 on Sun Mar 19, 2023 10:07 pm

[Python] Infinite / Definite File Generator

Go down

[Python] Infinite / Definite File Generator Empty [Python] Infinite / Definite File Generator

Post by ADS1 Mon May 18, 2015 8:58 pm

Here's a super simple Python script to generate an infinite or set amount of files on a computer. Not sure of its use or practicality but it was fun to make. Very Happy I know there's a lot of flaws in it so please give me some advice if you have it.

Code:
# File Generator
# Written by rabbit

import string
import random
import os


# Clear the current screen
os.system('clear')
print "[+] Generating Files..."

def name_generator(size=6, chars=string.ascii_uppercase + string.digits):
  return ''.join(random.choice(chars) for _ in range(size))


# Generates a definite amount of random files in a loop
def FileGenerate():
  for x in range(10):
      file = open(name_generator(), "w")
  print '[+] Successfully generated %s files.' % str(x)
 
# Generates an infinite amount of random files in a loop
def infiniteGenerate():
  while True:
      file = open(name_generator(), "w")


# Uncomment FileGenerate() for definite amount of random files
#FileGenerate()

# Uncomment infiniteGenerate() for infinite amounts of random files
#infiniteGenerate()

ADS1
Script Kiddie
Script Kiddie

Posts : 17
Join date : 2014-05-31

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum