Tag Archives: generator

anagram and multi: Are you game?

I’ve got a second word tool today — in fact, two tools from the same package. I discovered both of them purely by chance, while picking through an apparently unrelated list of software. Here’s anagram and multi.

2015-03-05-6m47421-anagram-multi

These two wunderkinder are hiding inside the yawl package (don’t ask how I got there; I don’t remember), which is advertised more as a word list than anything. The makefile in that package will allow you to build both anagram and multi, and on my Arch system neither needed any coaxing.

As you might imagine — and as you can see above — anagram splits apart words or letter sequences to find legitimate smaller words within. Which makes anagram a lot like an, which you might remember from a very long time ago. Of course, “legitimate” leaves some room for interpretation; dict couldn’t find anything under “xu,” but it’s listed there. 😕

multi, on the other hand, finds combinations of legitimate words that use all the letters in the sequence or word you provide. In other words, you’ll use all the letters to make several words at once. As a warning, multi has the potential to really bog down your system, if you give it a long word and ask for a lot of combinations, for example.

Both have an interactive mode or can take targets at the command line, for brevity of use. They also don’t require that you use the bundled word.list, but they will look for it at /usr/share/dict, and halt the interactive mode if they don’t find it. If you’d rather use another word list, you’ll have to stick with the command flag style. Or play dirty pool and rename your dictionary to /usr/share/dict/word.list. 😈

As best I can tell, neither anagram nor multi — nor yawl, for that matter — is in Debian or Arch. So I give you something new today.

I’m tempted not to tag these two as games, since there’s little about them that is amusing or entertaining. On the other hand, if you’re a scribble player or if you enjoy working with pen-and-paper anagrams, there’s a definite niche for these two programs. Games or not, take them as they are. 😉

siggen: Much to see, much to hear

Another brief tool this morning, and not so much because I don’t know how to use it, but more because I’m not sure what I’d use it for. This is siggen:

2015-01-18-l3-b7175-siggen

siggen is, as you might have already deduced, a signal generator, and in layman’s terms that means a sound creator. siggen lets you pick the quality, audio shape, gain, mono or stereo and so forth, and will produce a sound of those dimensions.

Using siggen is very easy; the tab key will cycle you through the fields, arrows increment the values or you can edit them directly. This means you can call on very specific shapes and sound forms, provided of course that your speakers can generate them.

siggen has some command-line flags, but they appear to be mostly settings that are available to you through the interface. So you can use them to set “default” values, if you like.

A few caveats: First, siggen is slightly old, and so it still seeks out /dev/dsp as your sound device. The easiest way I found to corral siggen was through the alsa-oss tool, and simply start both as aoss siggen. Perfectly usable and hearable.

Next, be aware that the settings are applied as soon as you change them. There’s no “apply” button or any sort of delay. So be careful with the gain value, if you’re tinkering with siggen at 6 a.m. on a Sunday. 😯

And like I mentioned, the real bottleneck in using siggen — or any other sound generation tool — is the quality of your speakers. It’s easy to see where hardware is the real limiting factor here, since crappy speakers probably won’t do much to make siggen enjoyable.

Having said all that, and knowing what little I know about signal generation, I’m still searching for a reason to need this tool, aside from oscilloscope calibration. 🙄 It’s none of my business I suppose, since everyone uses a tool in their own way.

One last thing: I usually give points to programs for using color, but this time I’m on the fence. siggen’s color scheme is a bit of an encumbrance to me, but I’ll let it stand as proof that I don’t just hand out gold stars to any colorful interface. 😐

P.S.: In Debian, but apparently not in Arch/AUR.

pwgen: Making it up as you go

I like password generators. I don’t know why. I think they’re fun to watch in action, and they’re good to keep around even if there’s not much I really do with them.

Here’s pwgen, which I find amusing at the least.

2014-03-21-lv-r1fz6-pwgen

pwgen might remind you of otp, which was mentioned last month. It has similar output and does much the same thing.

On the other hand, pwgen can wrangle passwords in a way that satisfies some constraints. For example, if a site requires you use a symbol (which I find incredibly annoying), pwgen can inject them. Same for capitalized letters or numbers.

It can also yank out certain characters, like vowels, thereby reducing the risk of accidentally creating a password that sounds “naughty” in English. 😳 Of course, for all you know, whatever is left could be a majestically foul utterance in another language. 🙄

I’ve noticed (because I played with pwgen so much 🙄 ) that the sequence of flags is important. For example:

kmandla@lv-r1fz6: ~$ pwgen -A -B -s -1

is different from

kmandla@lv-r1fz6: ~$ pwgen -s -A -B -1

and if you try you’ll see that the first one, in spite of the -A flag, will produce passwords with capital letters, probably because the -s came after. The second on the other hand, will pull them out before they hit the screen.

I have pass installed, so pwgen came along for free. You can use pwgen independently of pass though, which is only to be expected. 😉

primes: Ready for primes time!

Just when you thought the masterminds of the ages, the brainiacs behind bsd-games, couldn’t come up with anything more ingenious, along comes primes to blow your mind.

2014-03-09-lv-r1fz6-primes

Delightful! Innovative! A product like this hasn’t been seen since Photoshop 1.8a! 🙄

Prime number generation is probably not a huge mathematical drag on your machine, but it is interesting that, according to the man page, primes can only work up to 4,294,967,295.

Beyond that, and you’re back to pencil and paper. 😈

Oh, one more thing I like about primes: It has only one bug. And you can check the man page to see what it is. 😉

otp: Not as simple as it looks

At first glance otp seems like a rather straightforward password generator.

2014-02-18-lv-r1fz6-otp

And there are at least a half-dozen ways to generate random passwords at the Linux console, so why is otp special?

Well, aside from being more flexible in its output than jamming /dev/urandom through tr, or chopping off the output of mcookie, otp has a couple of other cool gimmicks.

For one, it can follow English language conventions, meaning the passwords you get look like chopped up English words.

Not cool enough? How about controlling otp’s seed to pitch the random number generator in a predictable fashion.

“That’s dumb, K.Mandla,” you say. “Why in the world would anyone want predictable passwords?”

Well it does suggest that two people using otp could share passwords without saying them outright to each other, just by knowing the seed and which output to choose. Seed is 33, password is 15, or something James Bond-ish like that.

otp does other stuff too, like uppercase and lowercase passwords, passwords only in numbers, and producing md5 signatures for keys. And you can format its output to your screen dimensions, which would be important if you have long passwords breaking across lines.

otp is one of those programs that’s easy to overlook, and yet is strikingly effective. And oddly enough, this too is in Debian, but not in Arch or AUR. 😕 Archers don’t like the letter O, I guess. …

mcookie: Mmm, cookies!

No, not really. mcookie will not spit a cookie out of your CD tray. Nice thought though.

2014-01-06-lv-r1fz6-mcookie

mcookie does, however, spit out a random hex string of a predetermined length — which in and of itself might not enthuse you.

But we’ve seen some script-fu in the past that has had clever and practical application, and mcookie could conceivably substitute for that.

And considering that it’s part of the venerable util-linux array, it’s 99 and 44/100 percent likely to be present in your distro by default, predictable in its behavior, and maintained by people in the know.

So let’s review: Ubiquitous, reliable, up-to-date. That has all the makings for a good program.

Want to put it to use, beyond “generating a 128-bit random hexadecimal number for use with the X authority system?” Here’s a weak little idea:

let value=$(echo 0x$(mcookie | head -c2)) && echo $value

It’s a thumbsucker, but it spits out a random decimal value converted from the first two hex digits of mcookie‘s output. Nothing earth-shattering there, but hopefully shows a little of mcookie’s versatility. Mmm, cookies. :mrgreen:

an: You’re a cheat, admit it

Cheater. You’re a cheat. Admit it. If you’re digging around looking for an anagram solver, you’re probably a cheat.

And wouldn’t you know it, those Linux hackers have come up with one, and tried to hide it with a clever name: an.

2013-08-21-v5-122p-an

Inconceivable. Give it a word, it runs through all its possible variations, and lists them for you on screen.

You can set it to look for certain patterns, phrases within words, minimum lengths, even test words for their combination in a phrase.

It makes games like Scrabble or Lexulous or maybe even Boggle just too easy. And the fact that it runs in Linux … well, that just shows the character of the people who use Linux.

And you? If you’re looking at this page, you’re probably a cheat too. Shame on you, you hacker. 👿

apg: Pronounced, “ay-pee-jee”

A couple of weeks ago I pointed out a site that could check password strength, and calculate the maximum time it would take to crack it in a brute-force attack.

I hope you took the time to look at that page. It’s very enlightening. 😯

Since then I have wanted to take a look at apg, an automatic password generator.

2013-08-12-v5-122p-apg

On the surface, apg doesn’t do a whole lot that a dozen dozen websites don’t do as well.

apg’s strength, if you ask me, is in it’s flexibility and control. The average online utility that will scramble a few letters for you doesn’t have the same capacity for detail as apg.

Consider: These days, a lot of websites demand you use a capital letter in your password. Personally I find that annoying, but this isn’t about me.

apg lets you slant the generator to produce a password that does have, somewhere in it, a capital letter.

And you can do the same for numbers, symbols, lowercase letters, and so forth.

apg will also give up pronounceable passwords, which I suppose could be less secure, but are probably a lot easier to remember.

Even better, apg will translate passwords into speakable fragments, like you see above. I’m not sure why that would be necessary, but it’s pretty cool.

apg is worth looking into, particularly if you’re an administrator who has to keep resetting passwords for forgetful staffers.

I mentioned one way to do it a few months ago; but really apg is probably better. 😐