Didier Stevens

Monday 30 December 2013

UltraEdit Scripts

Filed under: My Software,UltraEdit — Didier Stevens @ 20:10

UltraEdit is my text editor on Windows. I developed a couple of simple scripts that I’m going to release.

The first one is SubstituteEachLine.js.

I run this script when I need to transform each line into another form. Take this example where I want to create a Python dictionary with these words:

20131230-200759

I start my script and type this template (%% is the placeholder for each original line in the document):

20131230-200853

The script replaces each line in the document like this:

20131230-200941

I also often use this in a command-line environment with a limited shell. For example, to rename a bunch of files in “DOS”, I put the list of filenames in a text document and then run my script: “ren %% %%.old”. As shown in this example, you can use the placeholder (%%) more than once in the template. But you can’t escape the placeholder string.

PS: you can also use regex search and replace to do this, but there are cases were I prefer my script.

ultraedit_scripts_v0_0_1.zip (https)
MD5: C218BF518291499600B7B769AD3D14EE
SHA256: CE8FAFF9F7708B6CF596EE455735656F902C5DC99A47EB8AA35F217E6E03656C

4 Comments »

  1. Hi Didier,

    I’m just curious what it is that makes you prefer UltraEdit over 010 Editor on Windows?

    Comment by Anonymous — Wednesday 8 January 2014 @ 22:14

  2. I don’t prefer one over the other, because I use them for different goals.
    010 Editor to work on all type of binary files, UltraEdit over all types of text documents.

    A programmer’s editor is quite different from a hex editor.

    With UltraEdit, I can do things that 010 doesn’t do, some examples:
    – syntax highlighting
    – command completion
    – FTP/SFTP open/save
    – commenting a block
    – ident lines

    While 010 has a lot of features for binary files that UltraEdit doesn’t have.
    – templates
    – data types
    – binary operations
    – …

    Comment by Didier Stevens — Wednesday 8 January 2014 @ 22:18

  3. Thanks for your article.
    Just wanted to add from my experience with these editors Im absolutely addicted to Notepad++ for my string manipulations. Specifically for what you’ve mentioned ill write a regex with a combination with “replace” option. Because of the well established nature of regex ive found that this give the most flexabilty before writing a python script. In regex, I use “grouping” to mark different text parts and in the rest of the replace ill use my groups to create a new string.

    Comment by Anonymous — Thursday 9 January 2014 @ 0:01

  4. Unfortunately, not everything can be solved with re. For example, one of the next scripts I’m to release is a counter.

    Comment by Didier Stevens — Saturday 11 January 2014 @ 22:11


RSS feed for comments on this post. TrackBack URI

Leave a Reply (comments are moderated)

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

The Rubric Theme. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.

Join 227 other followers

%d bloggers like this: