I need to pair two text files, One file contains User:Hash and the other file contains Hash:Pass I want a 3rd text file created containing User:Pass based on matching Pairs.
Hash-Killer has some awesome tools meant to split hashes and passwords.
https://hashkiller.co.uk/list-tool.aspx
or
alternatively you could use REGEX that is the method that they use to provide the "text tool"
PS: I know this from personally cracking hashes, and it can be a pain to sort out. regex would be a good option.
Related
I have a very long script that contains a huge list of brand names that is not in alphabetical order. The result of many different people working on it over a few years :) Question - is there a way to re-order lines of code alphabetically in Visual Studio Code (VSCode)? I know this is possible for single lines of code, but is it possible for multi-line blocks of code that have been indented? See attached example - so in this case I would be looking to select all these lines of code and sort by the brand name (acer, acqua, aeg, amazon etc) and retain the nested parts of the code for each. Many thanks in advance if anyone has any ideas or suggestions
Screenshot of code to be sorted
I tried sorting in VSCode, but it only sorts individual lines of code and mixes them together. It does not recognize multiline, nested blocks of code as being one group of code that can be sorted individually
[Assuming you have a json object or could your text into one. Looks very close already - if it isn't json you might consider making a separate file and make it json, so you can use a sorter.]
I see a number of json sorters in the Marketplace: just search for json sort.
This one has 280K+ downloads: Sort JSON Objects
And I see a couple more. There is no built-in way to do what you want, you will need an extension.
I would:
Replace new line + 3x - \n\t\t\t - with an empty string
Sort
Format document (you may need to Change Language Mode first)
So i want to make a dictionary and there are two ways i can think of accomplishing this
a dictinary directory where each word is stored as a filename with its meaning as the filecontent
a single file with all words
First question can someone suggest any better way to store a dictionary which is efficient ? (i have to store this as a file)
Second question which of 2 methods suggested by me is more faster to access ?
Please note i am not going to search through this directory since it will be huge rather only check if the word exists or not by checking if the file exists and then print its content if its exists.
Edit: added how am i going to use the dictionary as suggested by #Vlad Feinstein
The most important part is missing from your question: how are you going to use that dictionary?
However, in order to access words stored in individual files you would have to use OS-provided API, that is most likely less efficient that to go through data in a single file.
Please note that many words have multiple meanings. Did you consider some popular data formats, like JSON, to store all that?
Is there an alternative to Elasticsearch? I am looking for something lightweight and tiny. Some sort of Ruby library would be ideal. For example, if I don't need to run an application to do the job but instead using that library I can search YAML or JSON files for matching text etc. And based on match score returns the sorted list.
Example here would make it clear.
Let's say I have a single YAML file with array of strings E.g
values:
- “some nice text here”
- “this is another sentence”
- “some nice”
- “nice text here”
So now if I search for “some nice text here” the first line should come on top but also there is a slight similarity with the last two lines, so the search results should return as follows:
some nice text here
nice text here
some nice
Thanks
Sphinx, Solr, come to mind but they're not small. Hell even using PostgreSQL until you really need to scale is fine (and you'll know when you need to scale) and it's probably already baked into your stack.
If your needs are to search YAML files, you could easily write your own naive approac
There's also https://github.com/mezis/fuzzily but it might require some updating.
Let's say i refactored some code in my huge solution, now i want to be sure that there are no occurencies of my old code (including specific words in strings and so one).
Problem is, that i have a huge, automatically built file (imagine something like a 'compiled' app.js), which is allowed to contain string values of my old code.
With the 'Find' functionallity of Visual Studio, is it possible to skip this specific file?
One possible way I could think off is Look at these file types field present in Find and Replace (Shortcut: Ctrl + Shift + F).
You could specify the file types with extensions or/and names. You could use multiple names separated by a semicolon.
Ex: Say you want to search in all XAML files & all CS files starting with A. You would enter this in the Look at these file types field: *.xaml;A*.cs
If you simply want to ensure that your only matches are in that one file, you can check "Display file names only" option in "Find in Files", and verify that there is only that file name in the result pane.
I would like to write a Ruby program which can parse three separate text files, each containing different delimiters, then sort them according to certain criteria.
Can someone please point me in the right direction?
It is not clear what is the data format in your files, and what criteria you used to sort, so I am not able to provide you a accurate answer.
However, basically, you might need something like this:
File.open("file_name","r").read.split(",").sort_by {|x| x.length}
You:
Opened a file using File.open.
Read the whole file and got a string. You can also read the file line-by-line using the each method.
Split the string use split. The delimiter used is ,.
Use sort_by to sort them according to the criteria specified in the block.
Enumerable#sort_by will allow you to sort an array (or other enumerable object) with a specific comparison function.
If by "text files with delimiters" you mean CSV files (character seperated values), then you can use the csv library, which is part of the standard library, to parse them. CSV gives you objects that look and feel like Ruby Hashes and Arrays, so you can use all the standard Ruby methods for sorting, filtering and iterating, including the aforementioned Enumerable#sort_by.