Article View: alt.privacy.anon-server
Article #255095Using Thunderbird to find hsub
From: Rooster
Date: Sun, 11 Mar 2012 21:40
Date: Sun, 11 Mar 2012 21:40
231 lines
14984 bytes
14984 bytes
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
As you may know, a few months ago I created a new batch file procedure for finding hsub
encoded messages, like those that get posted in the newsgroup "alt.anonymous.messages". It is
a command shell script written for the Windows OS. The original message ID of the thread with
my explanation of that procedure, including the script itself, can be found here:
Message-ID: <GE2BSOK140893.2355092593@reece.net.au>
I posted that message in this group on Dec. 15th. I also made a couple of important follow-
ups in that same thread in order to correct two errors that appeared in the first posting due
to some inadvertant word-wrap and to give some additional comments about the procedure itself.
If you want to look over the original message, be sure to look also at the two follow-ups I
made in that thread.
However, I have now made a considerable improvement in that procedure, and I am happy to share
the new version with you here. Although the original procedure performed adequately, this new
one is much better and faster. I have made this improvement as a result of two important
changes. Like the original procedure, this new one is tied in closely with the Thunderbird
mail & newsreader program, although the batch procedure is not entirely dependent on it.
Actually, this batch script will enable you to find the hsub messages in Windows without
having Thunderbird, but using it makes the first part of the procedure easier by Thunderbird's
use of an excellent add-on to obtain and format your messages.
As I stated originally, one excellent add-on for Thunderbird is named "ImportExportTools", and
it is available here: http://nic-nac-project.de/~kaosmos/mboximport-en.html. As its name
implies, it has a lot of functionality related to importing, exporting and converting messages
into different formats. It is well maintained and there has in fact been an update made to it
since my original posting in December. One of the several important changes to this extension
is in its facility for formatting of the exported messages and in the handling of default
export folders. Its procedure is faster now and more efficient. For example, when a newsgroup
folder is displaying a group of messages, either locally or online, you can select a large
group of messages, right-click for the context menu, and choose to create an index file that
includes a listing of the message subjects' names. This index can be made in an html or in a
CSV text file, and the options and locations of the export folders can be preconfigured to
default directories if you want it to do so. It is handy, efficient and fast, and it works
with email or news groups. It takes no time at all to create a large text file with all the
message subjects.
After simply connecting and opening the newsgroup folder, you can select a large group of
messages, right-click and save the record in a CSV text file. Text files are easy to
manipulate with scripts, especially CSV files because their format makes parsing them easier.
My script does just that. It parses the text and creates a clean listing of the subjects,
removing any of them with subject names that are obviously improperly formatted. The script
cleans the data, removes the commas and quotation marks, and it removes those subjects which
have problematic characters in their names that would otherwise cause difficulty in the
program routines. The second change affecting my method, in addition to the efficiency gained
by the improvement of the ImportExportTools extension, relates to the efficiency of technique
I used in the coding itself during the first part of it, as it pertains to the method of data
cleaning and manipulation. I have measured the results and reduced the amount of time needed
for processing data and finding the messages. I am pleased with the results.
As I did in the original script, I continue to make use of two supplementary programs in the
procedure, which you will need to get and install for it to work. Of course, they are both
free, open-source, small footprints, easy to use, first-rate and well maintained and
respected. Once installed on your system, they work independently and in this procedure there
is no need for interaction with them by the user. They are called in the script and they work
without any effort on your part. The first one is called "xxd.exe", and it is already familiar
to Linux users, where it was initially made. Even so, it has a Win32 port available for
downloading separately from here:
https://code.google.com/p/unix-cmd-win32/downloads/list
The download statistics on that page also indicate its usefulness. If you have cygwin
installed on your Windows OS, you probably already have xxd too because it has been made for
that environment as well. On that download page you will find many other useful programs
ported to Win32; one of them particularly you will find of benefit is called "coreutils-
win32", which actually consists of several outstanding utility programs for manipulating,
parsing and examining data and text. Anyway, the open-source "xxd" program requires no
intervention by the user to work with my procedure. You simply need to download it and copy
it to a place that will be accessible. It is made of only one file, and if it's on your path,
that will work, or you can put it in the Windows directory if you like. In my system it is on
the path in "c:\cygwin\bin", but I make explicit reference to it in the batch procedure so
that you can see plainly its whereabouts and its usage. This way, you may feel free to change
the directory referenced in the procedure if you see fit to install it in another location on
your system. So, on the one line in the procedure where I put it, you can change the path to
reflect your configuration if it is different. I use "xxd" in the procedure for the purpose of
converting hex data to binary in order to derive the hsub.
The second supplementary program, which again requires no interaction from the user once it
has been installed, is called "jacksum". It is available here:
http://www.jonelo.de/java/jacksum/
This program does require an initial installation, and it comes with a little installation
procedure to do it for you. You will find the simple instructions here:
http://www.jonelo.de/java/jacksum/#Installation. The documentation on this website is well
written and thorough. The website describes the purpose of this program in this way, "Jacksum
is a free and platform independent software for computing and verifying checksums, CRCs and
message digests (known as hash values and fingerprints)." In my procedure it is used to
create a sha256 hash, which is then used to validate with the hsubs. The program works
quickly, and one of the many benefits of it is that it has several other purposes. In fact I
began using it in connection with its use for "intrusion detection". Now I also use it as an
integrated component in the Windows GUI context menu when I want to verify a file's md5 sum or
multiple other hash values. I just right-click on a file and use the options available for
creating an immediate checksum for verification. If you check out the website thoroughly, you
will be impressed with its multiple functions. Anyway, in my procedure for the hsub script, I
have made explicity reference to its location in the directory so that you can see how I have
it configured. You can change that path to suit your system if it is different. There is only
one line in the script where this program is called, and it works without intervention by the
user.
In order to use this program, you just need to make a text file with with your hsub passwords and put it into the same folder where you save the CSV file created by the Thunderbird extension. If you have multiple passwords, you can put them all in one file with each one on a different line. You should name this file "hsubpw" and put it in the folder with the CSV file itself. That is all you will need for this to work. Then you just open the Windows command shell as the current directory in the same folder as these two files and run the script by typing its name at the prompt. Once the program has begun it requires absolutely no more interaction by the user until it has finished. At the end of its processing, it will delete any of the temporary files made in the procedure. In addition, it will overwrite the password file and one other file prior to deleting them for sake of obfuscation. However, I have made it to retain the original CSV file and the scrubbed version of it used for processing so that the user can make comparison if he want to see which file names were retained and which, those with incorrectly formatted subjects, were rejected. Feel free to delete these too if you do not need this data. Finally, the procedure creates a file called "result.log", in which it puts the exact name of any message subject that validates as one of your hsubs. This is the objective, and you can use this log to identify which of the subjects should be of interest to you. You will need to decipher the message, and you can do so manually using gpg or, if you like, you can use the other script procedure I have written for doing so, namely, "rooster1.bat", which I posted in this group previously. The most recent posting was made here: Message-ID: <20120302072121.f0GxMLW9Dega@mail2news.mixmin.net>.
In my testing this current procedure performed quite well, about 90 messages per minute for
processing time. You can get a good feel for it by creating a CSV file with about 100 message
subjects in it, including one of your hsubs, and then running the batch program against it.
Although the Thunderbird extension "ImportExportTools" can create such a file for you easily,
any other means you have for creating a standard CSV file would also suffice. If you want to
make one separately from the extension, what you would need to be sure of is saving it in the
correct format. The file itself MUST be named "index.csv". The data, that is, the message
subjects MUST be all in one column, the first column only. Other columns can be present with
other data, but that data would not be used. (The CSV file would not be altered by this
procedure.) The subjects MUST be surrounded by double quote marks and there MUST be a trailing
comma to separate values. Here is an example of what a standard CSV file might look like:
"1afc723efde290bcfb96caeeb9066408fa201f3e24a1cce8","Anonymous <nobody@mixmin.net>","alt.anonymous.messages",2/21/2012 2:30, ,
"1d3f2d72dd418681b9c014485c7ff00497348676a3b4434d","Anonymous <nobody@mixmin.net>","alt.anonymous.messages",2/21/2012 2:48, ,
"1daa636a28e1b88d877bcf607ec8cc25d205f86de019a9ca","Anonymous <nobody@mixmin.net>","alt.anonymous.messages",2/21/2012 3:58, ,
Here now is the revised script for Rooster's hsub finding procedure. Just copy and save it as
a text file and named "Rooster2.bat" Feel free to ask any questions you may have. muchas
gracias.
- -----------------------------Rooster(2.2).bat-------------------------------
@echo off
echo.
echo Beginning Rooster's hsub (2.2) searching procedure.
echo.
echo.
if not exist hsubpw (
echo: There is no password file named hsubpw. Aborting procedure.
goto EOF
)
echo.
echo Creating file names from index...
echo.
setlocal enabledelayedexpansion
for /F "delims=," %%I in (index.csv) do echo:%%I>>filenames
for /F "" %%J in (filenames) do (
set name=%%J
echo !name:~1,-1!>>noquotes
)
move /y noquotes filenames
for /f "tokens=*" %%M in (filenames) do (
(echo %%M|find " ">>spaces)||(echo %%M>>nospace)
)
move /y nospace filenames
for %%g in (^& ^< ^> ^| ^^ ^( ^)) do @echo:%%g>>badstuff
findstr /v /g:badstuff filenames >noprob
move /y noprob filenames
echo.
echo Removing bad file names...
echo.
FOR /F "" %%K in (filenames) do (
set z=%%K
echo !z:~0,16!>>hex16list
)
rem: creating temporary binary file from 8 bytes of hex
echo Generating binary data from hsubs...
echo.
setlocal
for /f "" %%X in (hex16list) do (
echo %%X|c:\cygwin\bin\xxd.exe -r -p - randnum-out
for /f "tokens=*" %%P in ('type hsubpw') do call:sub3 "%%P"
)
goto jump3
rem:concatenating passwords to end of ascii code in temp file; and making sha256 hash
:sub3
echo Creating hash digest. This can take a while depending on number of files...
echo.
copy randnum-out combined >nul
<nul set/p z2=%1>>combined
java -jar c:\progra~1\jacksum\jacksum.jar -a sha256 -g 16 -O outfile -F #CHECKSUM combined
for /f "" %%R in (outfile) do echo %%R>>hex32list
goto:eof
:jump3
for /f "" %%S in (hex32list) do (
find "%%S" < filenames >>result.log
)
echo.
echo Cleaning up...
erase /f/q hex16list randnum-out hex32list
erase /f/q outfile badstuff noprob spaces
type nul>hsubpw
type nul>combined
erase /f/q hsubpw combined
echo.
echo.
echo Finished processing. Check the result.log for any matches.
echo.
:EOF
- ------------------------------------------------------------------
- --
"Life assaults and offends our psyche with its apparent indifference to
the meaning we desperately seek in it."
rooster@thechickencoop.net
A happy member of Kingdom Animalia
-----BEGIN PGP SIGNATURE-----
Version: N/A
iQGcBAEBAgAGBQJPXRcwAAoJEOWcBAJ+953TDHgMALZ8If9YgolMZ+Jpg46ezKl8
StS0ti+ftDe6T5/FrpSCKd+hb2M/yN0LCtp/zkdv4XRl0cYSEtejht/ejcEGUxGx
hBFOPEi4UtAr+U3uarbejTPps7AG+vbDbhnIVQzjZumdM6uVC7lz45wtvr7jGT3h
3COd18sxKalq/Az4eDsFgemXt5jN55TJBXQC0zMeSL0blW8ZQC7oXrG7Rwq3jy/C
c4x3H8xtyflHkT6KMsIchEwOgJE3OCU88IfpphHBx8DYopaTMzeasm7l0nEeWU3W
IbOW07fdxwx2/NbdeiU7egYwx3zaYY0iCkbTDyqYfC+VUS3w+FsEPItSSCOZGDKW
d+KU9fKyapLmDCza4L1e3gFIzPsmc+hL+Um8/VWWCoNAwLR97YVb4EUt3ct0rf9r
KFBiddNDD4OsLlo4pcPlfT0Ul5WZegTQ0hDXcJw5s8pjSHh6eXuUiYZzJijJVaOC
gUorYmcuI+CPgFvNGOChAHqysaWmi71qb1/VbwF5bA==
=PtnT
-----END PGP SIGNATURE-----
Technical Details
Message-ID:
<81402QOY40980.236400463@reece.net.au>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-alt.privacy.anon-server.20141023.mbox.gz!border1.nntp.ams3.giganews.com!border1.nntp.ams2.giganews.com!border2.nntp.ams2.giganews.com!border4.nntp.ams.giganews.com!border2.nntp.ams.giganews.com!border3.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!eweka.nl!hq-usenetpeers.eweka.nl!188.40.76.149.MISMATCH!mail2news.mixmin.net!not-for-mailShow Full Headers
Complete Article Headers
Message-ID: <81402QOY40980.236400463@reece.net.au> Subject: Using Thunderbird to find hsub Date: Sun, 11 Mar 2012 21:40:25 +0000 From: Rooster <remailer@reece.net.au> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-alt.privacy.anon-server.20141023.mbox.gz!border1.nntp.ams3.giganews.com!border1.nntp.ams2.giganews.com!border2.nntp.ams2.giganews.com!border4.nntp.ams.giganews.com!border2.nntp.ams.giganews.com!border3.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!eweka.nl!hq-usenetpeers.eweka.nl!188.40.76.149.MISMATCH!mail2news.mixmin.net!not-for-mail X-Remailer-Contact: abuse@reece.net.au (English Only Please) Newsgroups: alt.privacy.anon-server Lines: 232 Injection-Info: mail2news.mixmin.net; mail-complaints-to=abuse@mixmin.net X-Original-Bytes: 14541