자동 접속
페이지 정보
작성자 ㅇㅇ (192.♡.0.1) 작성일 24-09-16 00:54 조회 291 댓글 0본문
[code]
<?php
function randomUserAgent() {
$browsers = [
'Chrome' => [
'Mozilla/5.0 (%s; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Safari/537.36',
'Mozilla/5.0 (%s; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Chrome/%s Safari/605.1.15',
'Mozilla/5.0 (%s; Linux; Android 10; SM-G973F) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36',
],
'Firefox' => [
'Mozilla/5.0 (%s; Win64; x64; rv:%s) Gecko/20100101 Firefox/%s',
'Mozilla/5.0 (%s; Linux; Ubuntu; 20.04; rv:%s) Gecko/20100101 Firefox/%s',
],
'Safari' => [
'Mozilla/5.0 (%s; iPhone; CPU iPhone OS %s like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/%s Mobile/15E148 Safari/604.1',
],
'Edge' => [
'Mozilla/5.0 (%s; Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Safari/537.36 Edg/%s',
'Mozilla/5.0 (%s; Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/%s Edg/%s',
],
'Opera' => [
'Mozilla/5.0 (%s; Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s OPR/%s',
'Mozilla/5.0 (%s; Linux; Android 10; SM-G973F) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s OPR/%s Mobile Safari/537.36',
],
'Robot' => [
'Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)',
'Mozilla/5.0 (compatible; Bingbot/2.0; +http://www.bing.com/bingbot.htm)',
'Mozilla/5.0 (compatible; Slurp; Yahoo! Slurp; http://help.yahoo.com/help/us/ysearch/slurp)',
'Mozilla/5.0 (compatible; DuckDuckBot/1.0; +https://duckduckgo.com/duckduckbot)',
],
];
$software = [
'Windows' => [
'Windows NT 10.0',
'Windows NT 6.3',
'Windows NT 6.2',
],
'Mac' => [
'Macintosh; Intel Mac OS X 10_15_7',
'Macintosh; Intel Mac OS X 11_0_1',
],
'Linux' => [
'Linux; Ubuntu; 20.04',
'Linux; Debian; 10',
],
'Android' => [
'Linux; Android 10; SM-G973F',
'Linux; Android 11; SM-G998B',
'Linux; Android 12; Pixel 5',
],
'iOS' => [
'iPhone; CPU iPhone OS 14_0 like Mac OS X',
'iPhone; CPU iPhone OS 15_0 like Mac OS X',
'iPad; CPU OS 14_0 like Mac OS X',
],
'Tablet' => [
'Linux; Android 10; Tablet',
'Linux; Android 11; Tablet',
],
];
$screenSizes = [
'1920x1080',
'1366x768',
'1280x800',
'375x667', // iPhone
'768x1024', // iPad
'1440x900',
];
$randomBrowser = array_rand($browsers);
$randomSoftwareType = array_rand($software);
$version = rand(60, 90); // 랜덤 브라우저 버전 생성
// 소프트웨어 정보 선택
$randomSoftwareVersion = $software[$randomSoftwareType][array_rand($software[$randomSoftwareType])];
$userAgentTemplate = $browsers[$randomBrowser][array_rand($browsers[$randomBrowser])];
// 화면 크기와 접속 경로 선택
$randomScreenSize = $screenSizes[array_rand($screenSizes)];
// 여러 접속 경로 중 랜덤 선택
$urls = [
'https://naver.com',
'https://google.com',
'https://google.co.kr',
];
$randomUrl = $urls[array_rand($urls)];
// 소프트웨어 정보를 포함하여 반환
return sprintf(
$userAgentTemplate,
$randomSoftwareVersion,
$version,
$version
) . " | Screen Size: $randomScreenSize | URL: $randomUrl";
}
// 하드코딩된 입력값 설정
$domain = 'https://dsclub.kr'; // 접속할 도메인
$duration = 60; // 지속 시간 (초)
$count = 15; // 요청 횟수
$endTime = time() + $duration;
for ($i = 0; $i < $count && time() < $endTime; $i++) {
$userAgent = randomUserAgent();
$options = [
"http" => [
"header" => "User-Agent: $userAgent\r\n"
]
];
$context = stream_context_create($options);
$result = @file_get_contents($domain, false, $context);
if ($result === false) {
echo "접속 실패: " . date('Y-m-d H:i:s') . " - User-Agent: $userAgent\n";
} else {
echo "접속 완료: " . date('Y-m-d H:i:s') . " - User-Agent: $userAgent\n";
}
sleep(1); // 각 요청 사이에 1초 대기
}
?>
[/code]
<?php
function randomUserAgent() {
$browsers = [
'Chrome' => [
'Mozilla/5.0 (%s; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Safari/537.36',
'Mozilla/5.0 (%s; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Chrome/%s Safari/605.1.15',
'Mozilla/5.0 (%s; Linux; Android 10; SM-G973F) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36',
],
'Firefox' => [
'Mozilla/5.0 (%s; Win64; x64; rv:%s) Gecko/20100101 Firefox/%s',
'Mozilla/5.0 (%s; Linux; Ubuntu; 20.04; rv:%s) Gecko/20100101 Firefox/%s',
],
'Safari' => [
'Mozilla/5.0 (%s; iPhone; CPU iPhone OS %s like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/%s Mobile/15E148 Safari/604.1',
],
'Edge' => [
'Mozilla/5.0 (%s; Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Safari/537.36 Edg/%s',
'Mozilla/5.0 (%s; Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/%s Edg/%s',
],
'Opera' => [
'Mozilla/5.0 (%s; Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s OPR/%s',
'Mozilla/5.0 (%s; Linux; Android 10; SM-G973F) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s OPR/%s Mobile Safari/537.36',
],
'Robot' => [
'Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)',
'Mozilla/5.0 (compatible; Bingbot/2.0; +http://www.bing.com/bingbot.htm)',
'Mozilla/5.0 (compatible; Slurp; Yahoo! Slurp; http://help.yahoo.com/help/us/ysearch/slurp)',
'Mozilla/5.0 (compatible; DuckDuckBot/1.0; +https://duckduckgo.com/duckduckbot)',
],
];
$software = [
'Windows' => [
'Windows NT 10.0',
'Windows NT 6.3',
'Windows NT 6.2',
],
'Mac' => [
'Macintosh; Intel Mac OS X 10_15_7',
'Macintosh; Intel Mac OS X 11_0_1',
],
'Linux' => [
'Linux; Ubuntu; 20.04',
'Linux; Debian; 10',
],
'Android' => [
'Linux; Android 10; SM-G973F',
'Linux; Android 11; SM-G998B',
'Linux; Android 12; Pixel 5',
],
'iOS' => [
'iPhone; CPU iPhone OS 14_0 like Mac OS X',
'iPhone; CPU iPhone OS 15_0 like Mac OS X',
'iPad; CPU OS 14_0 like Mac OS X',
],
'Tablet' => [
'Linux; Android 10; Tablet',
'Linux; Android 11; Tablet',
],
];
$screenSizes = [
'1920x1080',
'1366x768',
'1280x800',
'375x667', // iPhone
'768x1024', // iPad
'1440x900',
];
$randomBrowser = array_rand($browsers);
$randomSoftwareType = array_rand($software);
$version = rand(60, 90); // 랜덤 브라우저 버전 생성
// 소프트웨어 정보 선택
$randomSoftwareVersion = $software[$randomSoftwareType][array_rand($software[$randomSoftwareType])];
$userAgentTemplate = $browsers[$randomBrowser][array_rand($browsers[$randomBrowser])];
// 화면 크기와 접속 경로 선택
$randomScreenSize = $screenSizes[array_rand($screenSizes)];
// 여러 접속 경로 중 랜덤 선택
$urls = [
'https://naver.com',
'https://google.com',
'https://google.co.kr',
];
$randomUrl = $urls[array_rand($urls)];
// 소프트웨어 정보를 포함하여 반환
return sprintf(
$userAgentTemplate,
$randomSoftwareVersion,
$version,
$version
) . " | Screen Size: $randomScreenSize | URL: $randomUrl";
}
// 하드코딩된 입력값 설정
$domain = 'https://dsclub.kr'; // 접속할 도메인
$duration = 60; // 지속 시간 (초)
$count = 15; // 요청 횟수
$endTime = time() + $duration;
for ($i = 0; $i < $count && time() < $endTime; $i++) {
$userAgent = randomUserAgent();
$options = [
"http" => [
"header" => "User-Agent: $userAgent\r\n"
]
];
$context = stream_context_create($options);
$result = @file_get_contents($domain, false, $context);
if ($result === false) {
echo "접속 실패: " . date('Y-m-d H:i:s') . " - User-Agent: $userAgent\n";
} else {
echo "접속 완료: " . date('Y-m-d H:i:s') . " - User-Agent: $userAgent\n";
}
sleep(1); // 각 요청 사이에 1초 대기
}
?>
[/code]
좋아요0
이 글을 좋아요하셨습니다
등록된 댓글이 없습니다.