Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using MalShare.NET;
- MSClient msc = new MSClient("API_KEY");
- List<string> results = new List<string>();
- List<List<string>> resultsSearch = new List<List<string>>();
- resultsSearch = msc.Search("pastebin"); //Search sample hashes, sources and file names.
- results.AddRange(msc.SearchByType("pe32")); //List MD5/SHA1/SHA256 hashes of a specific type from the past 24 hours
- results.AddRange(msc.GetDetails("7453fb054d4eb6dc7f70b705ff8962f3")); //GET stored file details by its hash
- results.AddRange(msc.GetSources()); //List of sample sources from the past 24 hours
- results.AddRange(msc.GetHashList()); //List hashes from the past 24 hours
- Console.WriteLine(msc.Upload("virus.exe")); //Upload file to MalShare. Returns operation status
- results.AddRange(msc.GetRequestLimit()); //GET allocated number of API key requests per day and remaining
- results.AddRange(msc.GetTypeList()); //Get list of file types & count from the past 24 hours
- Console.WriteLine(msc.DownloadFile("a2fac8ea47e12e82ef766c3742800932")); //Download the file with the specified hash. Returns operation status
- Console.WriteLine(msc.UrlToCollection("http://217.160.43.70/2FIAKFw4U.exe")); //Perform URL download and add result to sample collection. Returns operation status
- Console.WriteLine(msc.UrlToCollection("http://217.160.43.70/2FIAKFw4U.exe", true)); //Perform URL download and add result to sample collection. The optional boolean "true" enables crawling the specified URL. Returns operation status
- Console.WriteLine(msc.CheckGUID("16d6c204-cc99-4000-8433-745dbdcd11b0")); //Check status of download task via GUID
- Console.WriteLine(msc.HashLookup("440f4036a3609ef6c22f153d2b1fee4e")); //Check if hash is present in database, return md5, sha1 and sha256 if so
Add Comment
Please, Sign In to add comment