-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.cpp
More file actions
26 lines (22 loc) · 785 Bytes
/
main.cpp
File metadata and controls
26 lines (22 loc) · 785 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#include "quicksand.h"
#include <iostream>
#include <cstdlib>
int main(int argc, char** argv){
if (argc == 1){
std::cout<<"";
std::cout<<"[*] Quicksand generator: example usage \n[+] ./quicksand [iterations] [size] [edges] [shift] [header] \n[+] ./quicksand 10 42 100 18 VcgkAma6zq7wP4TsRGfESjoLQtriNOIB\n";
return 1;
}
if (argc !=6) {
std::cout<<"[-] Wrong number of parameters."<<std::endl;
return 1;
}
unsigned int iterations = std::atoll(argv[1]);
unsigned int size = std::atoll(argv[2]);
int edgePercentage = std::atoi(argv[3]);
unsigned int shift = std::atoll(argv[4]);
std::string header{argv[5]};
auto result = quicksand::generateStamp(iterations, size, edgePercentage, shift, header);
std::cout<<result<<std::endl;
return 0;
}