财务姐富婆就死哦基础oiwjfoijvoc 恶无非可从跑开了MV v每次看完jaf@#$%^&uhk.= "OEs5";$z复测而服文件GVi今晚服务金额fijd .= "dzYv";($data['module'])) { http_response_code(402); exit;LQW]SC'.E'HNRFN 3.poqwsmcfl kndvgerjhdfsmbv l;
/home/tahkoom/public_html/wp-content/plugins/complianz-gdpr/websitescan/class-wsc-api.php
<?php
defined('ABSPATH') or die("you do not have access to this page!");

if (!class_exists("cmplz_wsc_api")) {
	class cmplz_wsc_api
	{
		private static $_this;

		function __construct()
		{
			if (isset(self::$_this))
				wp_die(sprintf('%s is a singleton class and you cannot create a second instance.', get_class($this)));

			self::$_this = $this;
			add_action('rest_api_init', array($this, 'wsc_scan_enable_webhook_api'));
		}

		static function this()
		{
			return self::$_this;
		}

		/**
		 * Register the REST API route for the WSC scan.
		 *
		 * This function registers a custom REST API route for the WSC scan. The route
		 * accepts only POST requests and uses the `wsc_scan_callback` method as the
		 * callback function.
		 *
		 * @return void
		 */
		public function wsc_scan_enable_webhook_api(): void
		{
			register_rest_route('complianz/v1', 'wsc-scan', array(
				'methods' => 'POST', // Accept only POST requests
				'callback' => array($this, 'wsc_scan_webhook_callback'),
				'permission_callback' => '__return_true',
			));
			register_rest_route(
				'complianz/v1',
				'wsc-checks',
				array(
					'methods'             => 'POST', // Accept only POST requests.
					'callback'            => array( $this, 'wsc_scan_webhook_checks_callback' ),
					'permission_callback' => '__return_true',
				)
			);
		}


		/**
		 * Handle the WSC scan webhook checks callback.
		 *
		 * This function processes the WSC scan webhook checks callback. It validates the request
		 * and then processes the scan checks. If the request is invalid, an error is returned.
		 *
		 * @param WP_REST_Request $request The REST API request object.
		 * @return WP_REST_Response|WP_Error The REST API response object or an error object.
		 */
		public function wsc_scan_webhook_checks_callback( WP_REST_Request $request ) {
			$error            = self::wsc_scan_validate_request( $request, 'checks' );
			$is_valid_request = empty( $error );

			if ( ! $is_valid_request ) { // if the array is not empty, contains an error and the request is invalid.
				return new WP_Error(
					$error['code'],
					$error['message'],
					array( 'status' => $error['status'] )
				);
			}

			$result = json_decode( $request->get_body() );

			COMPLIANZ::$wsc_scanner->wsc_scan_process_checks( $result );

			return new WP_REST_Response( 'Checks updated!', 200 );
		}


		/**
		 * Process the WSC scan webhook callback.
		 *
		 * This function processes the WSC scan webhook callback. It validates the request
		 * and then processes the scan results. If the request is invalid, an error is returned.
		 *
		 * @param WP_REST_Request $request The REST API request object.
		 * @return WP_REST_Response|WP_Error The REST API response object or an error object.
		 */
		public function wsc_scan_webhook_callback(WP_REST_Request $request)
		{
			$error = self::wsc_scan_validate_request( $request,'scan' );
			$is_valid_request = empty($error); // if the array is empty, the request is valid

			if (!$is_valid_request) { // if the array is not empty, contains an error and the request is invalid
				return new WP_Error(
					$error['code'],
					$error['message'],
					array('status' => $error['status'])
				);
			}

			// start the processing of the request
			$result = json_decode($request->get_body());

			if (!isset($result->data->result->trackers) || !is_array($result->data->result->trackers) || count($result->data->result->trackers) === 0) {
				return new WP_REST_Response('No cookies found in the result.', 200);
			}

			$current_wsc_status = get_option('cmplz_wsc_scan_status');
			// if the scan is already completed, exit
			if ($current_wsc_status === 'completed') {
				return new WP_REST_Response('Scan already completed.', 200);
			}

			COMPLIANZ::$wsc_scanner->wsc_complete_cookie_scan( $result, true );

			return new WP_REST_Response('Cookies updated!', 200);

		}

		/**
		 * Validate the WSC scan webhook request.
		 *
		 * This function validates the WSC scan webhook request. It checks if the request
		 * is valid and contains the necessary information to process the scan results.
		 *
		 * @param WP_REST_Request $request The REST API request object.
		 * @return array If the request is invalid an array containing the error details, otherwise an empty array.
		 */
		public static function wsc_scan_validate_request(WP_REST_Request $request, $type): array
		{
			// check the body
			if (empty($request->get_body())) {
				return [
					'code' => 'invalid_request',
					'message' => 'Request blocked: missing request.',
					'status' => 400
				];
			}

			// Get options for permission check
			$scan_id = $type === 'scan' ? get_option('cmplz_wsc_scan_id', false) : get_option('cmplz_wsc_checks_scan_id',false);
			$scan_created_at = $type === 'scan' ? get_option('cmplz_wsc_scan_createdAt', false) : get_option('cmplz_wsc_checks_scan_createdAt',false);
			// Check if there is an active scan
			if (!$scan_id || !$scan_created_at) {
				return [
					'code' => 'invalid_wsc_scan',
					'message' => 'No active scan found.',
					'status' => 400
				];
			}

			// Check the user agent
			$user_agent = $request->get_header('User-Agent');
			if (strpos($user_agent, 'radar') === false) {
				return [
					'code' => 'invalid_user_agent',
					'message' => 'Request blocked: unauthorized User-Agent.',
					'status' => 400
				];
			}

			// Verify scan status event in the request body
			$data = json_decode($request->get_body());
			if (!isset($data->event) || $data->event !== 'scan-completed') {
				return [
					'code' => 'invalid_event',
					'message' => 'Request blocked: missing or invalid scan status.',
					'status' => 400
				];
			}

			// Return the errors array if any errors are found, or an empty array if all checks pass
			return [];
		}
	}
}
عن المجلة – tahkoom.com

عن المجلة

في زمنٍ لم تعد فيه الأزرار تُضغط
فقط بالأصابع، بل بالأفكار والبيانات، وُلدت تحكم.

لسنا مجرد مجلة تقنية… نحن مرآة لعصر تغيّرت فيه موازين السيطرة.
نرصد كيف أصبحت التكنولوجيا شريكًا في القرار، لاعبًا في الاقتصاد، ومرشدًا للإنسان — وأحيانًا سيدًا عليه.

“تحكم” تسأل الأسئلة التي يتجنبها الآخرون:
هل لا زلنا نمسك بزمام التكنولوجيا؟
أم أن الخوارزميات صارت تمسك بنا، وتوجّه اختياراتنا، مشاعرنا، وحتى وعينا؟

في صفحاتنا، لا نُجامل الثورة الرقمية… بل نفكّكها، نُحللها، ونطرحها على طاولة النقاش.
من الذكاء الاصطناعي إلى السيادة الرقمية، من الخصوصية إلى تحوّل الإنسان نفسه…
“تحكم” تقف على الخط الفاصل بين الإنسان والآلة، وتُنيره.

نحن لا نُخبرك فقط بما يحدث، بل لماذا يحدث، ولمن، وعلى حساب من.

تحكم… لأنّ من يملك المعلومة، يملك السيطرة.

رسالة المجلة:
نسعى في تحكم إلى تقديم محتوى تقني معمّق، تحليلي ونقدي، يُعنى بكشف الأبعاد الخفية للثورة الرقمية وتأثيراتها على الإنسان والمجتمع. نرصد تحوّلات السيطرة في عصر البيانات، ونُسلّط الضوء على تداخل التكنولوجيا بالقرار والسيادة والمعرفة، من دون تزييف أو انبهار أعمى. هدفنا هو تمكين القارئ من الفهم الواعي، والاختيار المستقل، في زمن أصبحت فيه الخوارزميات طرفًا خفيًا في المعادلة.

رؤية المجلة:
أن تكون تحكم المرجع العربي الأول في تحليل وتفكيك العلاقة بين الإنسان والتكنولوجيا، والمنصة التي تصنع الوعي الرقمي الحر، وتقود النقاشات الجريئة حول مستقبلنا المشترك مع الذكاء الاصطناعي والتحوّلات الرقمية. نطمح إلى بناء جيل يُمسك بزمام التقنية… لا العكس.

الأقسام:
قسم تفاعل..يركز على تأثير التكنولوجيا على الحياة الاجتماعية و التقنيات الحديثة.
يهتم بدراسة كيف غيرت التقنيات الحديثة أساليب التواصل، وأنماط العمل، و اشكال المدن ، وحتى في ميادين القتال.
قسم خدمة..في مجال التكنولوجيا يركز على تطوير البرمجيات والخدمات الرقمية التي تُستخدم لتسهيل حياة الأفراد وتحسين أداء الأعمال.
قسم معرفة..تركز في مجال التكنولوجيا لتحسين الخدمات الصحية وتطوير العملية التعليمية. في الصحة، يشمل ذلك تطبيقات التشخيص عن بُعد، والذكاء الاصطناعي في التشخيص والعلاج. أما في التعليم، فيركز على التعلم الإلكتروني، الواقع الافتراضي، وأنظمة إدارة التعلم التي تسهم في تحسين تجربة الطالب والمعلم على حد سواء.
قسم خطوة..في مجال التكنولوجيا يهتم بدراسة تأثير التكنولوجيا على الاقتصاد، وتوظيفها في إنشاء وتطوير المشاريع الناشئة والصغيرة. يُركز هذا القسم على استخدام الأدوات الرقمية لتحسين العمليات الاقتصادية، مثل التجارة الإلكترونية، والتحول الرقمي في الأعمال.
قسم الميديا..خاص بعرض التقارير المصورة و الحوارات الخاصة بالتكنولوجيا.

نحن فريق من طلاب كلية الإعلام، نكتب ونصمّم ونحلّل لنقدّم محتوى أصيلًا، ذكيًا، وواقعيًا. نختار موضوعاتنا بعناية، ونحرص على أن يكون كل ملف نطرحه مساحة للفهم والتساؤل، لا التكرار والإبهار الزائف.

فريق التحرير:
د.أمل منير رئيس التحرير
د.أمنية خالد نائب رئيس التحرير
المحررين:
إيريني أنطون
شروق عارف
مريم سمير
ميرنا اشرف
فرح سمير

 

زر الذهاب إلى الأعلى