#include <stdio.h>
#include <string.h>

int main() {
    char url[200];
    int score = 0;

    printf("URL을 입력하세요: ");
    scanf("%199s", url);

    printf("\n===== 검사 결과 =====\n");

    // HTTPS 검사
    if (strncmp(url, "https://", 8) != 0) {
        printf("- HTTPS 미사용\n");
        score += 20;
    }

    // login 포함 여부
    if (strstr(url, "login") != NULL) {
        printf("- login 포함\n");
        score += 20;
    }

    // bank 포함 여부
    if (strstr(url, "bank") != NULL) {
        printf("- bank 포함\n");
        score += 20;
    }

    // verify 포함 여부
    if (strstr(url, "verify") != NULL) {
        printf("- verify 포함\n");
        score += 15;
    }

    // secure 포함 여부
    if (strstr(url, "secure") != NULL) {
        printf("- secure 포함\n");
        score += 15;
    }

    // @ 포함 여부
    if (strchr(url, '@') != NULL) {
        printf("- @ 포함\n");
        score += 15;
    }

    // .xyz 도메인
    if (strstr(url, ".xyz") != NULL) {
        printf("- .xyz 도메인\n");
        score += 20;
    }

    // .top 도메인
    if (strstr(url, ".top") != NULL) {
        printf("- .top 도메인\n");
        score += 20;
    }

    printf("\n위험 점수 : %d\n", score);

    if (score >= 70) {
        printf("판정 : 위험\n");
    } else if (score >= 40) {
        printf("판정 : 주의\n");
    } else {
        printf("판정 : 안전\n");
    }

    return 0;
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: