Waraxe IT Security Portal
Login or Register
November 14, 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: 9144

People Online:
Visitors: 62
Members: 0
Total: 62
Full disclosure
SEC Consult SA-20241112-0 :: Multiple vulnerabilities in Siemens Energy Omnivise T3000 (CVE-2024-38876, CVE-2024-38877, CVE-2024-38878, CVE-2024-38879)
Security issue in the TX Text Control .NET Server for ASP.NET.
SEC Consult SA-20241107-0 :: Multiple Vulnerabilities in HASOMED Elefant and Elefant Software Updater
Unsafe eval() in TestRail CLI
4 vulnerabilities in ibmsecurity
32 vulnerabilities in IBM Security Verify Access
xlibre Xnest security advisory & bugfix releases
APPLE-SA-10-29-2024-1 Safari 18.1
SEC Consult SA-20241030-0 :: Query Filter Injection in Ping Identity PingIDM (formerly known as ForgeRock Identity Management) (CVE-2024-23600)
SEC Consult SA-20241023-0 :: Authenticated Remote Code Execution in Multiple Xerox printers (CVE-2024-6333)
APPLE-SA-10-28-2024-8 visionOS 2.1
APPLE-SA-10-28-2024-7 tvOS 18.1
APPLE-SA-10-28-2024-6 watchOS 11.1
APPLE-SA-10-28-2024-5 macOS Ventura 13.7.1
APPLE-SA-10-28-2024-4 macOS Sonoma 14.7.1
Log in Register Forum FAQ Memberlist Search
IT Security and Insecurity Portal

www.waraxe.us Forum Index -> Newbies corner -> So I have...
Post new topicReply 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 topicReply 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-2024 Janek Vind "waraxe"
Page Generation: 0.044 Seconds