Newer
Older
Import / applications / MakePDF / Build / t.cpp
@John John on 29 Dec 2020 876 bytes bulk import from macbookpro checkouts
#include "../FingerPrint.h"

#ifdef DARWIN
#include <mach-o/dyld.h>
#else
#include <link.h>
#endif
#include <iostream>


int main(int argc, char* argv[])
{
  /*
#ifdef DARWIN
  int imageCount = _dyld_image_count();
  for (int i=0; i < imageCount; i++) {
    std::cout << i << " - " << _dyld_get_image_name(i) << std::endl;
  }
#else
  struct link_map map = reinterpret_cast<struct link_map*>(dlopen(NULL, RTLD_NOW));
  map = map->l_next->l_next;
  while (map)
  {
    std::cout << map->l_name << std::endl;
    map = map->l_next;
  }
#endif
  */

  //printf("vol: %s\n",   UuidOfFile(argv[0]).c_str());
  //printf("cpu: %s\n",   CpuString().c_str());
  //printf("mac: %llx\n", GetMacAddress());
  
  std::string smudge = SmudgedFingerPrint(argv[0]);
  printf("Smudge:     %s\n", smudge.c_str());
  printf("%s\n", DesmudgeFingerPrint(smudge.c_str()).c_str());

  return 0;
}