Waraxe IT Security Portal  
  Login or Register
::  Home  ::  Search  ::  Your Account  ::  Forums  ::   Waraxe Advisories  ::  Tools  ::
May 3, 2024
Menu
 Home
 Logout
 Discussions
 Forums
 Members List
 IRC chat
 Tools
 Base64 coder
 MD5 hash
 CRC32 checksum
 ROT13 coder
 SHA-1 hash
 URL-decoder
 Sql Char Encoder
 Affiliates
 y3dips ITsec
 Md5 Cracker
 User Manuals
 AlbumNow
 Content
 Content
 Sections
 FAQ
 Top
 Info
 Feedback
 Recommend Us
 Search
 Journal
 Your Account



User Info
Welcome, Anonymous
Nickname
Password
(Register)

Membership:
Latest: MichaelSnaRe
New Today: 0
New Yesterday: 0
Overall: 9145

People Online:
Visitors: 530
Members: 0
Total: 530
PacketStorm News
·301 Moved Permanently

read more...
Log in Register Forum FAQ Memberlist Search
IT Security and Insecurity Portal

www.waraxe.us Forum Index -> Newbies corner -> So I have...
Post new topic  Reply to topic View previous topic :: View next topic 
So I have...
PostPosted: Fri Nov 16, 2007 3:25 am Reply with quote
lordorion
Regular user
Regular user
 
Joined: Nov 16, 2007
Posts: 6




A sql file with lots of usernames, md5s, etc. I am looking for a way to remove the md5s and organize them into a list. Any ideas?
View user's profile Send private message
PostPosted: Fri Nov 16, 2007 3:29 am Reply with quote
waraxe
Site admin
Site admin
 
Joined: May 11, 2004
Posts: 2407
Location: Estonia, Tartu




Write script for that - in perl, php or other language. Or write shell script.
It's simple string manipulation Smile

By the way i'm using special php CLI script, which takes raw copy-pasted text, extracts md5 hashes and then exports them to Cain cracker. Very useful, lot easier as copy-paste one-by-one Smile
View user's profile Send private message Send e-mail Visit poster's website
PostPosted: Fri Nov 16, 2007 3:32 am Reply with quote
lordorion
Regular user
Regular user
 
Joined: Nov 16, 2007
Posts: 6




Yes, I could, but I'm not very good at scripting. I was wondering if anyone had one, otherwise I guess I'll have to hit the books Confused
View user's profile Send private message
PostPosted: Fri Nov 16, 2007 3:33 am Reply with quote
waraxe
Site admin
Site admin
 
Joined: May 11, 2004
Posts: 2407
Location: Estonia, Tartu




How big is your sql dump file? Megabytes?
View user's profile Send private message Send e-mail Visit poster's website
PostPosted: Fri Nov 16, 2007 3:35 am Reply with quote
lordorion
Regular user
Regular user
 
Joined: Nov 16, 2007
Posts: 6




Yeah, about 5.5 megs after I deleted some stuff. Original file size was 50 megs.
View user's profile Send private message
PostPosted: Fri Nov 16, 2007 3:42 am Reply with quote
waraxe
Site admin
Site admin
 
Joined: May 11, 2004
Posts: 2407
Location: Estonia, Tartu




Yes, first thing to do is to remove unneeded info and let only user data.
I can write needed php script within minutes, but i need source.
Can you use php scripts on you PC? And if you dont have privacy concerns, then upload packed file somewhere and gimme da link. And i will write script for md5 extracting.
... Tomorrow, becaue right now there is 5:43 AM where I live Smile
View user's profile Send private message Send e-mail Visit poster's website
PostPosted: Fri Nov 16, 2007 3:46 am Reply with quote
lordorion
Regular user
Regular user
 
Joined: Nov 16, 2007
Posts: 6




See, the thing is i kinda do have privacy concerns. The file basically looks like this all the way through:

','cc8cc5a0b0cd91564ea8b3514fa82d05',1165473474,-4,1165472573,1165472483,0,0,'0.00',4,'english','D M d, Y g:i a',2,0,1175641746,0,0,NULL,0,1,1,1,1,1,1,1,1,1,1,0,'
View user's profile Send private message
PostPosted: Fri Nov 16, 2007 3:32 pm Reply with quote
waraxe
Site admin
Site admin
 
Joined: May 11, 2004
Posts: 2407
Location: Estonia, Tartu




OK, here is php CLI script I wrote today:

Code:

<?php
error_reporting(E_ALL);
//=======================================================
$infile = 'test.txt';
$outfile = 'out.txt';
//=======================================================
if(!is_file($infile))
{
   die('Cannot open input file, exiting!');
}
$buff = file_get_contents($infile);
$buff = strtolower($buff);
$arr = array();
$cnt = preg_match_all('/\'[a-f0-9]{32}\'/',$buff, $arr);
echo "found $cnt hashes\n";
$arr2 = array();

for($i = 0; $i < $cnt; $i ++)
{
   $arr2[] = str_replace('\'', '', $arr[0][$i]);
}

$arr = array_unique($arr2);
$arr2 = array();

foreach($arr as $hash)
{
   if(preg_match('/^[a-f0-9]{32}$/',$hash))
   {
      $arr2[] = $hash;
   }
}

sort($arr2);
$cnt2 = count($arr2);
echo "got $cnt2 unique hashes\n";

$out = implode("\n", $arr2);
$fh = fopen($outfile, 'wb');
fwrite($fh, $out);
fclose($fh);

die("--okok--");
?>


It is simple script and can't handle too big input files (> 20MB). And there can be some "noise", because hash extracting regex is as simple as possible. If someone writes better version - share it here Smile
View user's profile Send private message Send e-mail Visit poster's website
PostPosted: Fri Nov 16, 2007 6:53 pm Reply with quote
lordorion
Regular user
Regular user
 
Joined: Nov 16, 2007
Posts: 6




Worked really well, thank you! Very Happy Very Happy
View user's profile Send private message
PostPosted: Sat Nov 17, 2007 8:31 am Reply with quote
pexli
Valuable expert
Valuable expert
 
Joined: May 24, 2007
Posts: 665
Location: Bulgaria




waraxe i don't try your script but look nice.Install phpmyadmin on your PC.Import this dump in some db.After that simple sql query

example

Select concat(username,":",password) from users
Select concat(username,":",password,":",salt) from users
View user's profile Send private message
PostPosted: Mon Nov 19, 2007 6:22 am Reply with quote
sk8er
Advanced user
Advanced user
 
Joined: May 09, 2005
Posts: 64




How is it going? , Because is this php useful for working hash truth?,
I am interested in getting the list from e-mails would you help me there???



saludos Very Happy
View user's profile Send private message Send e-mail MSN Messenger
So I have...
  www.waraxe.us Forum Index -> Newbies corner
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT  
Page 1 of 1  

  
  
 Post new topic  Reply to topic  




Powered by phpBB © 2001-2008 phpBB Group






Space Raider game for Android, free download - Space Raider gameplay video - Zone Raider mobile games
All logos and trademarks in this site are property of their respective owner. The comments and posts are property of their posters, all the rest (c) 2004-2020 Janek Vind "waraxe"
Page Generation: 0.133 Seconds