본문 바로가기

전체 글606

AFLNET: A Greybox Fuzzer for Network Protocols Pham, Van-Thuan, Marcel Böhme, and Abhik Roychoudhury. "Aflnet: a greybox fuzzer for network protocols." 2020 IEEE 13th International Conference on Software Testing, Validation and Verification (ICST) . IEEE, 2020. the first stateful CFG tool(SCGG) -> mutation-based approach where new message sequences are generated by mutating existing(recorded) message sequences client: fuzzer & server: fuzz t.. 2024. 3. 26.
vector를 스택처럼 사용 #include #include using namespace std; void printStack(const std::vector& stack) { for (auto& e : stack) { cout 2024. 3. 21.
assert #include #include using namespace std; int main() { //assert(false); //release모드에서는 작동안함->debug모드에서 테스트할 때 사용됨 int number = 5; assert(number == 5); //static_assert(number==5); 이 친구는 불가능! 컴파일타임에 결정되어야 static_assert 사용가능 const int x = 5; static_assert(x == 6, "x should be 6"); return 0; } 2024. 3. 21.
함수포인터 #include #include #include using namespace std; int func(int x) { return 5; } int goo(int x) { return 10; } bool isEven(const int& number) { if (number % 2 == 0)return true; else return false; } bool isOdd(const int& number) { if (number % 2 != 0)return true; else return false; } typedef bool (*check_fcn)(const int&); using check_fcn_using = bool(*)(const int&); void printNumbers1(const array& m.. 2024. 3. 19.
오버로딩 #include #include int add(double x, double y) { return x + y; } int add(int x, int y) { return x + y; } typedef int my_int; void print_int(int x) {} //void print_int(my_int x) {} //불가능!! int main() { add(1, 2); return 0; } 함수 오버로딩에서 파라미터는 같고, 리턴 타입만 다른거는 오버로딩이 불가능하다! -> 파라미터 타입이 달라야 한다. 2024. 3. 19.
Large Language Model guided Protocol Fuzzing 3. Case Study PROFUZZBENCH의 LIVE555(RTSP)에 대해서 LLM 테스트 1) LLM에게 message structure에 대한 machine-readable information을 요청했고, generated grammar와 diversity of message을 평가 2) enriching the seed corpus: LLM에게 given seed message sqeuence에게 random message를 추가하라고 요청 3) inducing interesting state transitions 2024. 3. 18.
inline 함수 inline함수는 해당 코드를 그대로 코드 상에 넣은 것처럼 된다. 속도가 빨라진다고는 하지만 요즘 컴파일러가 좋아져서 굳이 안써두 될듯! #include using namespace std; int min1(int x, int y) { return x > y ?y : x; } inline int min2(int x, int y) { return x > y?y : x; } int main() { cout 2024. 3. 13.
함수 반환값 #include #include #include using namespace std; int& getValue(int x) { int value = x * 2; return value; } int& getArr(std::array& my_array, int ix) { return my_array[ix]; } std::tuple getTuple(){ int a = 10; double d =3.14; return std::make_tuple(a, d); } int main() { int & value = getValue(3); cout 2024. 3. 13.
주소에 의한 전달 주소에 의한 전달은 기본적으로 값에 의한 전달과 동일 대신 값이 아닌 주소일 뿐! #include using namespace std; void foo1(int* ptr) { cout 2024. 3. 12.