Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Can I build a script that'll generate me a list?

So basically...

I want to input like

v1zion:a1

Then generate a1 to a256, then do it again for b1-b256 and so on... I really can't be bothered to type them out and then change the a to b etc...

so i'd have a notepad output of like 1000 lines like:

v1zion:a1
v1zion:a2
v1zion:a3

all the way up to 256, then I could change the A to a B.
(Jan 24, 2018 02:23 PM)v1zion Wrote:  So basically...

I want to input like

v1zion:a1

Then generate a1 to a256, then do it again for b1-b256 and so on... I really can't be bothered to type them out and then change the a to b etc...

so i'd have a notepad output of like 1000 lines like:

v1zion:a1
v1zion:a2
v1zion:a3

all the way up to 256, then I could change the A to a B.

Kinda confused.

Could you give a example input and desired output?

EDIT Are you looking for something like this? https://gist.github.com/Fudster/2c1fbd0d...841f73a832

I did this in python

Code
chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
for i in range(0, 5):
...     for number in range (1, 256):
...         print(char[number] + str(i))
This should work if it's what you mean; it's JavaScript, by the way.

The codes there if you want to change it, here is the result: (https://hastebin.com/raw/uxuxidurib)

Code
var chars = ['a', 'b', 'c', 'd'] // Which ever letters you want.
var numbers = Array.from(Array(257).keys())

for (var i = 0; i < chars.length; i++)
  for (var x = 1; x < numbers.length; x++)
    console.log("v1zion:" + chars[i] + numbers[x])
Quite easy. Cleaner JS:

Code
const a = 'A'.charCodeAt(0);

for (let i = a; i < a + 26; i++)
 for (let j = 1; j < 5; j++)
   console.log(`v1zion:${String.fromCharCode(i)}${j}`);

It runs to 5 so as not to flood the console if you test.
Really any language can do this.

Web based would be easy to type up. PHP can generate a .txt file for you quickly.

Je t'aime
[Image: fpZ5a5g.png]

(Apr 22, 2022 04:39 PM)-Scrub Wrote:  Jokes on you, I'm not smart enough to know what he's talking about.
(Jan 24, 2018 03:54 PM)Owl Wrote:  Quite easy. Cleaner JS:

Code
const a = 'A'.charCodeAt(0);

for (let i = a; i < a + 26; i++)
 for (let j = 1; j < 5; j++)
   console.log(`v1zion:${String.fromCharCode(i)}${j}`);

It runs to 5 so as not to flood the console if you test.

Yeah, this is much better than mine. Still learning JS :)
Since someone has already done it in javascript, here it is in python with adding to an existing file.

Code
file = open('filename.txt', 'a')

for char in 'abcdefghijklmnopqrstuvwxyz':
  for i in range(256):
     file.write('v1zion:' + str(char) + str(i+1) + '\n')

file.close()


Here is the code in java, haven't had a chance to check it because I am currently at college so might have some missing imports:

Code
import java.io.FileWriter;  
import java.io.BufferedWriter;
import java.io.PrintWriter;
import java.lang.Object;

for (char ch: "abcdefghijklmnopqrstuvwxyz".toCharArray()) {
for (int i: i < 256; i++) {
 try (FileWriter fw = new FileWrite('filename.txt', true); BufferedWriter bw = new BufferedWriter(fw); PrintWriter out = new PrintWriter(bw)); {
  out.println("v1zion:" + ch + (i + 1).toString());
 } catch (IOException e) {
  return print(e)
 }
}
}
I turn coffee in to code. PM me if you need work done!


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Perl] by Fr0st_ByteJul 14, 2011 11:58 PM 16 431 Jul 14, 2011 11:58 PM
Last Post: creepycreeper
[Perl] by poh-pcpMar 17, 2010 07:26 AM 3 142 Mar 17, 2010 07:26 AM
Last Post: z3r0c0re