Old 03-08-2010, 09:39 PM   #1 (permalink)
Newbie
 
Join Date: Jan 2010
Posts: 12
deramik is on a distinguished road
Default Base64 subjects in Reports

In my reports of SpamBlocker
when I export data to CSV
I get subjects like:
[!! SPAM] =?koi8-r?B?0sXNz87UIM7BIMTB3sUgySDXIMvXwdLUydLF?=
How can I convert it to readable strings?
Thanks.
deramik is offline  
Old 03-09-2010, 02:10 AM   #2 (permalink)
Untangle Ninja
 
Solignis's Avatar
 
Join Date: Jul 2008
Location: Hudson, Ohio, USA
Posts: 1,669
Solignis is on a distinguished road
Send a message via MSN to Solignis
Default

http://www.opinionatedgeek.com/dotne...e/Default.aspx

I found that by googling Base64 decode. Maybe it is a start?
__________________
Easy things should be easy, and hard things should be possible. -- Larry Wall, Creator of PERL
Solignis is offline  
Old 03-09-2010, 02:16 AM   #3 (permalink)
Untangle Ninja

 
WebFooL's Avatar
 
Join Date: Jan 2009
Location: Sweden (Eskilstuna)
URLs submitted: 57
Posts: 3,696
WebFooL is on a distinguished road
Send a message via MSN to WebFooL
Default

This might help.
Code:
=?<charset>?<encoding>?<data>?<possibly repeated>?=
WebFooL is offline  
Old 03-09-2010, 04:47 AM   #4 (permalink)
Newbie
 
Join Date: Jan 2010
Posts: 12
deramik is on a distinguished road
Default

I meant getting decoded subjects in CSV reports.
Or instrument to decode a whole file.
deramik is offline  
Old 03-09-2010, 04:51 AM   #5 (permalink)
mdh
Untangle Ninja
 
mdh's Avatar
 
Join Date: Aug 2007
URLs submitted: 171
Posts: 4,802
mdh is on a distinguished road
Default

I have no intention of digging into this as concurrent project #35, but that being said, if you're messing with CSV files, you're likely using Excel or importing into a database. You can write some code for either one of those to decode (translate) the data and stuff it into another field. That will give you the raw data and the info you're looking for. If its a big puppy, I'd go for the database method to keep Excel from barfing on you.
__________________
This space reserved for profound thought.....which does happen on occasion."
mdh is offline  
Old 03-09-2010, 05:49 AM   #6 (permalink)
Untangle Ninja

 
WebFooL's Avatar
 
Join Date: Jan 2009
Location: Sweden (Eskilstuna)
URLs submitted: 57
Posts: 3,696
WebFooL is on a distinguished road
Send a message via MSN to WebFooL
Default

I build a small application.
But i don't know how well it works.

In my cases it works. but your string looks to be encoded with some strange characters.

My sample:
Code:
=?iso-8859-1?B?RvZyZnLlZ2FuIGZy5W4gUEFSIEFkcmVzc3JlZ2lzdHJldDsg?=
Download the decoder from http://fakenews.se/untangle/Base64dec.exe

Run it and enter the information from between the last two ?.
Ex from my line it is "RvZyZnLlZ2FuIGZy5W4gUEFSIEFkcmVzc3JlZ2lzdHJld Dsg"
enter.PNG
Now it should decode the subject.
dec.PNG

If you get something that you understand out of your line i should be able to script something that decodes the string and then replaces the encrypted string in the csv report.

Last edited by WebFooL; 03-09-2010 at 05:58 AM..
WebFooL is offline  
Old 03-09-2010, 11:22 AM   #7 (permalink)
Newbie
 
Join Date: Jan 2010
Posts: 12
deramik is on a distinguished road
Default

Thank you!
But in my case:
=?koi8-r?B?0sXNz87UIM7BIMTB3sUgySDXIMvXwdLUydLF?=
returned

Can your small application speak with codepage cyrillic KOI8-R?
Attached Images
File Type: jpg screen.JPG (6.7 KB, 30 views)
deramik is offline  
Old 03-09-2010, 11:28 AM   #8 (permalink)
Untangle Ninja

 
WebFooL's Avatar
 
Join Date: Jan 2009
Location: Sweden (Eskilstuna)
URLs submitted: 57
Posts: 3,696
WebFooL is on a distinguished road
Send a message via MSN to WebFooL
Default

Right now my train is in the middle of the woods and my laptop batterie is dead

But i will see if i can't find a way to convert it to UTF-8 in that case it will work.
WebFooL is offline  
Old 03-09-2010, 12:05 PM   #9 (permalink)
Newbie
 
Join Date: Jan 2010
Posts: 12
deramik is on a distinguished road
Default

I need this decoding - because I am testing Untangle SpamBlocker and default settings of score does not suit me - many non-spam messages are marked with SPAM.
I'd like to analyze logs and find desired value. Except "from" and "to" headers I have to know subjects.
Thank for your help!
deramik is offline  
Old 03-09-2010, 01:04 PM   #10 (permalink)
Untangle Ninja

 
WebFooL's Avatar
 
Join Date: Jan 2009
Location: Sweden (Eskilstuna)
URLs submitted: 57
Posts: 3,696
WebFooL is on a distinguished road
Send a message via MSN to WebFooL
Default

Dose this look better?
Code:
0sXNz87UIM7BIMTB3sUgySDXIMvXwdLUydLF = ремонт на даче и в квартире = renovation of rooms and dache

Last edited by WebFooL; 03-09-2010 at 01:48 PM..
WebFooL is offline  
Closed Thread

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -7. The time now is 05:00 PM.


© 2010 Untangle, Inc. All Rights Reserved.   SEO by vBSEO 3.6.0