kskumar Posted June 9, 2016 Report Share Posted June 9, 2016 okka text file lo some 10,000 plus UserNames unaye...but output lo naku only aa 10,000 plus UserNames ae raval not any other details (pwd, ip etc)..if you know any Tool how to get or compare username info...pls let me know.... Java code lo kuda try cheyachu ani annadu....upload the text file and search for username...but output ravadam ledu... text file ki read, write and execute permissions unaye.. text file lo ila untundi information..meku emaina idea unte cheppandi bro. 2016-05-17 09:32:37.000000: EXEC sp_web_logLogin4 @UserName = 'abcd', @PW = 'xy344', @IP = '00.00.00.00', @Browser = 'Mozilla/5.0 (Windows NT 6.1; 2016-05-17 08:58:50.000000: CPMDB EXEC sp_web_logLogin4 @UserName = 'cdef', @PW = 'xy344', @IP = '11.11.11.1', @Browser = 'Mozilla/5.0 (Windows NT 6.1; 2016-05-17 09:07:09.000000: CPMDB EXEC sp_web_logLogin4 @UserName = 'qqqqq', @PW = 'wwwww', @IP = '00.00.00.00', @Browser = 'Mozilla/5.0 (Windows NT 6.1; Quote Link to comment Share on other sites More sharing options...
kiladi bullodu Posted June 9, 2016 Report Share Posted June 9, 2016 crl+c crl+v Quote Link to comment Share on other sites More sharing options...
kskumar Posted June 9, 2016 Author Report Share Posted June 9, 2016 Just now, kiladi bullodu said: crl+c crl+v 50,000 usernames unte 50,000 times ctrl c and ctrl v annalemu kada bro Quote Link to comment Share on other sites More sharing options...
kiladi bullodu Posted June 9, 2016 Report Share Posted June 9, 2016 1 minute ago, kskumar said: 50,000 usernames unte 50,000 times ctrl c and ctrl v annalemu kada bro anesey ot chesi extra time vesey Quote Link to comment Share on other sites More sharing options...
savithababhi Posted June 9, 2016 Report Share Posted June 9, 2016 deeniki program enduku awk and sed are more than enough Quote Link to comment Share on other sites More sharing options...
Maryadaramanna Posted June 9, 2016 Report Share Posted June 9, 2016 5 minutes ago, kiladi bullodu said: crl+c crl+v Quote Link to comment Share on other sites More sharing options...
Maryadaramanna Posted June 9, 2016 Report Share Posted June 9, 2016 8 minutes ago, kskumar said: okka text file lo some 10,000 plus UserNames unaye...but output lo naku only aa 10,000 plus UserNames ae raval not any other details (pwd, ip etc)..if you know any Tool how to get or compare username info...pls let me know.... Java code lo kuda try cheyachu ani annadu....upload the text file and search for username...but output ravadam ledu... text file ki read, write and execute permissions unaye.. text file lo ila untundi information..meku emaina idea unte cheppandi bro. 2016-05-17 09:32:37.000000: EXEC sp_web_logLogin4 @UserName = 'abcd', @PW = 'xy344', @IP = '00.00.00.00', @Browser = 'Mozilla/5.0 (Windows NT 6.1; 2016-05-17 08:58:50.000000: CPMDB EXEC sp_web_logLogin4 @UserName = 'cdef', @PW = 'xy344', @IP = '11.11.11.1', @Browser = 'Mozilla/5.0 (Windows NT 6.1; 2016-05-17 09:07:09.000000: CPMDB EXEC sp_web_logLogin4 @UserName = 'qqqqq', @PW = 'wwwww', @IP = '00.00.00.00', @Browser = 'Mozilla/5.0 (Windows NT 6.1; I'm not a java expert..ee coding kadu kani nadoka suggestion. I have a solution with Excel; Is it ok for you to try using MS Excel Quote Link to comment Share on other sites More sharing options...
kskumar Posted June 9, 2016 Author Report Share Posted June 9, 2016 2 minutes ago, Maryadaramanna said: I'm not a java expert..ee coding kadu kani nadoka suggestion. I have a solution with Excel; Is it ok for you to try using MS Excel yeah okay.. Quote Link to comment Share on other sites More sharing options...
graham Posted June 9, 2016 Report Share Posted June 9, 2016 (edited) Try with Windows PowerShell. First do $content = Get-Content <PathOfTextFile> Then get substring of $content with help using http://www.lazywinadmin.com/2013/10/powershell-get-substring-out-of-string.html Let me know if you need help Edited June 9, 2016 by graham Added one more line Quote Link to comment Share on other sites More sharing options...
SUbba LIngam Posted June 9, 2016 Report Share Posted June 9, 2016 username field position same untunda for every line in the text file ? 1 Quote Link to comment Share on other sites More sharing options...
SUbba LIngam Posted June 9, 2016 Report Share Posted June 9, 2016 Quote Link to comment Share on other sites More sharing options...
graham Posted June 9, 2016 Report Share Posted June 9, 2016 Open notepad, save these lines as something.ps1 $content = Get-Content C:\notepad.txt #This is your notepad with all the info for($i= 0; $i -lt $content.Length ; $i++) { $content[$i].Split("@")[1] | Out-File C:\Usernames.txt -Append } Open PowerShell and run that something.ps1 Idi run cheyi, tarvata C:\usernames.txt chudu. Let me know if you need help Quote Link to comment Share on other sites More sharing options...
Maryadaramanna Posted June 9, 2016 Report Share Posted June 9, 2016 9 minutes ago, kskumar said: yeah okay.. Paste the data in excel; so, u'll receive these lines in separate rows 2016-05-17 09:32:37.000000: EXEC sp_web_logLogin4 @UserName = 'abcd', @PW = 'xy344', @IP = '00.00.00.00', @Browser = 'Mozilla/5.0 (Windows NT 6.1; 2016-05-17 08:58:50.000000: CPMDB EXEC sp_web_logLogin4 @UserName = 'cdef', @PW = 'xy344', @IP = '11.11.11.1', @Browser = 'Mozilla/5.0 (Windows NT 6.1; 2016-05-17 09:07:09.000000: CPMDB EXEC sp_web_logLogin4 @UserName = 'qqqqq', @PW = 'wwwww', @IP = '00.00.00.00', @Browser = 'Mozilla/5.0 (Windows NT 6.1; Then, 1. go to "Data" (Next to Home, Insert, Formulas in excel) and look for text to columns 2. Select "Delimited", press Next 3. Use the delimiter "=" (select "Other" and give = as the option), press Next 4. Finish U'll get the data in various columns separated by = and all the Usernames will come in a single column, as long as your format is unique Quote Link to comment Share on other sites More sharing options...
kskumar Posted June 9, 2016 Author Report Share Posted June 9, 2016 7 minutes ago, graham said: Open notepad, save these lines as something.ps1 $content = Get-Content C:\notepad.txt #This is your notepad with all the info for($i= 0; $i -lt $content.Length ; $i++) { $content[$i].Split("@")[1] | Out-File C:\Usernames.txt -Append } Open PowerShell and run that something.ps1 Idi run cheyi, tarvata C:\usernames.txt chudu. Let me know if you need help try chesa...naa system lo cannot be loaded the execution of scripts is disabled on this system ani ochindi... Quote Link to comment Share on other sites More sharing options...
kskumar Posted June 9, 2016 Author Report Share Posted June 9, 2016 13 minutes ago, SUbba LIngam said: username field position same untunda for every line in the text file ? Yes same position lo untundi... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.