#ifndef EXPLOIT_CLI_H #define EXPLOIT_CLI_H #include #include #include #include #include #include #include #include #include #include // Constants // #define API_BASE_URL "https://market.haxorport.online/api" #define API_BASE_URL "https://exploit.or.id/api" #define CONFIG_DIR_NAME ".exp" #define TOKEN_FILE_NAME "token" #define MAX_PATH 1024 #define MAX_BUFFER 4096 // Structure to store HTTP response typedef struct { char *data; size_t size; } http_response_t; // Utility functions void create_dir_if_not_exist(const char *path); char *get_config_dir(); char *get_token_path(); char *get_token(); char *get_repo_config_path(); void save_token(const char *token); void print_error(const char *message); void print_success(const char *message); void print_info(const char *message); void print_warning(const char *message); void print_progress(const char *message); size_t write_callback(void *contents, size_t size, size_t nmemb, void *userp); // Command functions int cmd_login(int argc, char *argv[]); int cmd_init(int argc, char *argv[]); int cmd_upload(int argc, char *argv[]); int cmd_release(int argc, char *argv[]); int cmd_delete(int argc, char *argv[]); int cmd_delete_release(int argc, char *argv[]); int cmd_change_repo(int argc, char *argv[]); int cmd_status(int argc, char *argv[]); int cmd_clone(int argc, char *argv[]); // HTTP functions http_response_t http_get(const char *url, const char *token); http_response_t http_post(const char *url, const char *token, const char *data); http_response_t http_post_multipart(const char *url, const char *token, const char *filepath, const char *fieldname, const char *path); http_response_t http_post_multipart_mime(const char *url, const char *token, curl_mime *mime); http_response_t http_delete(const char *url, const char *token); #endif /* EXPLOIT_CLI_H */