묻고 답해요
161만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
해결됨[퇴근후딴짓] 빅데이터 분석기사 실기 (작업형1,2,3)
작업형2 모의문제 2 질문있습니다!
안녕하세요!작업형 2 모의문제 2의 마지막에 csv파일을 제출할 때 에러가 발생하는데, 어떤 이유인지 찾아봐도 안보여 질문드립니다. 그리고 작업형 2유형의 train과 test데이터 파일만 주어진 경우, 어떤 문제는 n_train, c_train, n_test, c_test로 나누는 문제가 있고 그렇지 않은 문제들이 있어서 헷갈립니다ㅠ 그래서 문제를 읽고 데이터를 분리해야하는 상황이 궁금합니다!import pandas as pd train = pd.read_csv('train.csv') test = pd.read_csv('test.csv') # print(train.head()) # print(test.head()) # print(train.info()) 1. 불필요한 컬럼제거 2. 결측치 대치 3. 인코딩 4. 스케일링 # print(test.info()) train = train.drop(columns ='id') test_id = test.pop('id') # print(test_id) cols = ['host_id','neighbourhood_group','neighbourhood','name', 'host_name', 'last_review'] # print(train.shape) train = train.drop(cols, axis =1) test = test.drop(cols, axis =1) # print(train.shape) # train = train.drop(columns ='host_id') # test = test.drop(columns ='host_id') # train = train.drop(columns ='neighbourhood_group') # test = test.drop(columns ='neighbourhood_group') # train = train.drop(columns ='neighbourhood') # test = test.drop(columns ='neighbourhood') # train = train.drop(columns ='name') # test = test.drop(columns ='name') # train = train.drop(columns ='host_name') # test = test.drop(columns ='host_name') # train = train.drop(columns ='last_review') # test = test.drop(columns ='last_review') # print(train.info()) # print(test.info()) # print(train.isnull().sum()) # print(test.isnull().sum()) train['reviews_per_month'] = train['reviews_per_month'].fillna(0) test['reviews_per_month'] = test['reviews_per_month'].fillna(0) # print(train.isnull().sum()) # print(test.isnull().sum()) #라벨 인코딩 from sklearn.preprocessing import LabelEncoder cols =train.select_dtypes(include = 'object').columns for col in cols: encoder = LabelEncoder() train[col] = encoder.fit_transform(train[col]) test[col] = encoder.transform(test[col]) # print(train.info()) # print(test.info()) # print(train.describe()) # print(test.describe()) # 스케일링 from sklearn.preprocessing import minmax_scale cols2 = train.select_dtypes(exclude = 'object').columns for col in cols2: train[col] = minmax_scale(train[col]) cols2 = test.select_dtypes(exclude = 'object').columns for col in cols2: test[col] = minmax_scale(test[col]) # print(train.describe()) # print(test.describe()) from sklearn.model_selection import train_test_split X_train, X_val, y_train, y_val = train_test_split(train.drop('price', axis=1), train['price'], test_size=0.2, random_state=20) # print(X_train.head()) from sklearn.ensemble import RandomForestRegressor rf = RandomForestRegressor() rf.fit(X_train, y_train) pred = rf.predict(X_val) # print(pred) #id,price sumit = pd.DataFrame({'id': test_id, 'price' : pred}) submit.to_csv('10004.csv', index=False)
-
미해결인터랙티브 웹 개발 제대로 시작하기
이미지 없으신분 제 코드를 보세요 ㅎㅎ
이미지 없으신 분들 그냥 구글 이미지에서 간단히 가져와서 사용해 봤습니다.요걸로 테스트 해 봅시다<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>Document</title> </head> <style> @keyframes break-egg-ani { /* 0%는 from */ /* 100% 은 to*/ to { background-position: -500px 0; } } .broken-egg { width: 85px; height: 150px; background: url("https://www.shutterstock.com/image-vector/cartoon-dragon-ice-crystal-eggs-260nw-2152129871.jpg") no-repeat 0 0 / auto 150px; animation: break-egg-ani 2s infinite steps(7); } </style> <body> <div class="broken-egg"></div> </body> </html>
-
해결됨Django REST Framework 핵심사항
프로잭트를 생성하고 runserver하면 ModuleNotFoundError: No module named 발생해요
가상환경을 만들고 새로운 프로잭트를 만들었는데 runserver하면 ModuleNotFoundError: No module named [예전에 만든 프로잭트 폴더이름] 이 뜨면서 에러가 나요.. 가상환경이 아닌곳에서 해도 똑같이 에러가 발생하고 삭제하고 다시 만들고 settings.py, wsgi 등등 에서도 잘 확인했습니다만 해결이 안됩니다.해결방법이 있을까요? 에러코드 < File "C:\Users\USER21R16\AppData\Local\Programs\Python\Python310\lib\site-packages\django\core\management\__init__.py", line 446, in execute_from_command_line utility.execute() File "C:\Users\USER21R16\AppData\Local\Programs\Python\Python310\lib\site-packages\django\core\management\__init__.py", line 440, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "C:\Users\USER21R16\AppData\Local\Programs\Python\Python310\lib\site-packages\django\core\management\base.py", line 415, in run_from_argv connections.close_all() File "C:\Users\USER21R16\AppData\Local\Programs\Python\Python310\lib\site-packages\django\utils\connection.py", line 84, in close_all for conn in self.all(initialized_only=True): File "C:\Users\USER21R16\AppData\Local\Programs\Python\Python310\lib\site-packages\django\utils\connection.py", line 76, in all return [ File "C:\Users\USER21R16\AppData\Local\Programs\Python\Python310\lib\site-packages\django\utils\connection.py", line 73, in __iter__ return iter(self.settings) File "C:\Users\USER21R16\AppData\Local\Programs\Python\Python310\lib\site-packages\django\utils\functional.py", line 57, in __get__ res = instance.__dict__[self.name] = self.func(instance) File "C:\Users\USER21R16\AppData\Local\Programs\Python\Python310\lib\site-packages\django\utils\connection.py", line 45, in settings self._settings = self.configure_settings(self._settings) File "C:\Users\USER21R16\AppData\Local\Programs\Python\Python310\lib\site-packages\django\db\utils.py", line 148, in configure_settings databases = super().configure_settings(databases) File "C:\Users\USER21R16\AppData\Local\Programs\Python\Python310\lib\site-packages\django\utils\connection.py", line 50, in configure_settings settings = getattr(django_settings, self.settings_name) File "C:\Users\USER21R16\AppData\Local\Programs\Python\Python310\lib\site-packages\django\conf\__init__.py", line 92, in __getattr__ self._setup(name) File "C:\Users\USER21R16\AppData\Local\Programs\Python\Python310\lib\site-packages\django\conf\__init__.py", line 79, in _setup self._wrapped = Settings(settings_module) File "C:\Users\USER21R16\AppData\Local\Programs\Python\Python310\lib\site-packages\django\conf\__init__.py", line 190, in __init__ mod = importlib.import_module(self.SETTINGS_MODULE) File "C:\Users\USER21R16\AppData\Local\Programs\Python\Python310\lib\importlib\__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1050, in _gcd_import File "<frozen importlib._bootstrap>", line 1027, in _find_and_load File "<frozen importlib._bootstrap>", line 992, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed File "<frozen importlib._bootstrap>", line 1050, in _gcd_import File "<frozen importlib._bootstrap>", line 1027, in _find_and_load File "<frozen importlib._bootstrap>", line 1004, in _find_and_load_unlockedModuleNotFoundError: No module named 'blog'>
-
미해결[개정3판] Node.js 교과서 - 기본부터 프로젝트 실습까지
강의자료 ppt는 어디서 받을 수 있나요?
안녕하세요 11강에서 강의자료 ppt 파일을 올려주신다고 했는데 어디서 다운로드 받을수 있나요?
-
해결됨[퇴근후딴짓] 빅데이터 분석기사 실기 (작업형1,2,3)
3회 기출유형(작업형2) 코드 인코딩 방법 관련 질문
안녕하세요. 우선 좋은 강의 너무 감사드립니다.3회 기출유형(작업형2) 코드 인코딩 방법 관련 질문드립니다.풀이 영상에서 원핫인코딩 방법을 선택해주셨던데 시험 문제를 풀때 1)원핫인코딩을 할지 2)라벨인코딩을 할지는 어떤 정보를 보고 선택하나요?저는 라벨 인코딩이 익숙해서 아래 처럼 작성했는데 인코딩 방식이 무관하다면, 아래처럼 라벨인코딩으로 진행해도 될지 문의드립니다.# 수치형 데이터와 범주형 데이터 분리 n_train = train.select_dtypes(exclude=object).copy() c_train = train.select_dtypes(include=object).copy() n_test = test.select_dtypes(exclude=object).copy() c_test = test.select_dtypes(include=object).copy()cols = c_train.columns for col in cols: le = LabelEncoder() c_train[col] = le.fit_transform(c_train[col]) c_test[col] = le.transform(c_test[col]) c_train.head()
-
해결됨자바 ORM 표준 JPA 프로그래밍 - 기본편
영속성 컨텍스트가 1순위인건가요?
학습하는 분들께 도움이 되고, 더 좋은 답변을 드릴 수 있도록 질문전에 다음을 꼭 확인해주세요.1. 강의 내용과 관련된 질문을 남겨주세요.2. 인프런의 질문 게시판과 자주 하는 질문(링크)을 먼저 확인해주세요.(자주 하는 질문 링크: https://bit.ly/3fX6ygx)3. 질문 잘하기 메뉴얼(링크)을 먼저 읽어주세요.(질문 잘하기 메뉴얼 링크: https://bit.ly/2UfeqCG)질문 시에는 위 내용은 삭제하고 다음 내용을 남겨주세요.=========================================[질문 템플릿]1. 강의 내용과 관련된 질문인가요? (예/아니오)2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오)3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오)[질문 내용]영속성 콘텍스트에 값이 먼저 들어가있는getReperence로 프록시 호출(호출이라고 하는게 모르겠지만) 하고 초기화를 먼저 진행하면 find로 조회해도 프록시로 반환해주는걸로 봤는데그렇다면 영속성컨텍스트에 먼저 들어간 (프록시 던지 아니면 실제 엔티티던지)것을 반환한다고 보면 되는건가요?그리고 JPA는 ==을 무조건 보장해준다고 했는데 (같은 영속성 컨텍스트에 있을때) 특별한 이유가 있는건가요?
-
해결됨[코드캠프] 부트캠프에서 만든 고농축 백엔드 코스
Ubuntu 듀얼부팅
안녕하세요 windows 사용자인데 램 24기가라서 듀얼부팅 메뉴얼대로 우분투 설치했습니다 (재부팅하는데 os 윈도우로 할거냐 우분투로 할거냐 선택창이 안떠서 엄청 헤매다가 유투브 찾아보고 결국 해결했네요 ㅠㅠ) 수업자료에 있는 20.04.4 LTS 버전은 안보여서 비슷한 버전으로 20.04.6 LTS로 설치했는데 문제 없겠죠? 그리고 파티션 할당할 때 c드라이브 용량을 최대한 줄여본다 해서 40기가 정도 우분투 환경에 할당해줬는데 충분할까요?빠른 답변 주시면 감사하겠습니다!!
-
미해결Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)
로그인 요청시 401 상태 반환
로그인 시도 시 401 오류를 반환하고 있습니다.user-service의 AuthenticationFilter 에서 인증이 실패가 된지 알아 디버깅을 해보니 인증이 성공해서 도대체 어디가 문제인지 알 수가 없습니다.그래서 유저 서비스에 직접 접근을 할 시 똑같은 401 오류를 반환하고 있습니다.그리고 유저 서비스에 직접 접근을 하거나 게이트웨이로 접근해도 성공에 관한 메소드는 작동하지 않습니다.< 스프링 부트, 시큐리티는 현재 최신 버전입니다. > AuthenticationFilter 클래스@RequiredArgsConstructor @Slf4j public class AuthenticationFilter extends UsernamePasswordAuthenticationFilter { private final UserService userService; @Value("${token.expiration_time}") private Long EXPIRATION_TIME; @Value("${token.secret}") private String secretKey; @Override public Authentication attemptAuthentication(HttpServletRequest request, HttpServletResponse response) throws AuthenticationException { log.info("attemptAuthentication"); try{ RequestLoginVo cred=new ObjectMapper().readValue(request.getInputStream(), RequestLoginVo.class); log.info(cred.getEmail()+" "+cred.getPassword()); return this.getAuthenticationManager().authenticate(new UsernamePasswordAuthenticationToken( cred.getEmail(), cred.getPassword(), new ArrayList<>() )); } catch(IOException e){ throw new RuntimeException(e); } } @Override protected void successfulAuthentication(HttpServletRequest request, HttpServletResponse response, FilterChain chain, Authentication authResult) throws IOException, ServletException { String userName = ((User)authResult.getPrincipal()).getUsername(); UserDto userDto = userService.getUserDetailByEmail(userName); String token = Jwts.builder() .setSubject(userDto.getUserId()) .setExpiration(new Date(System.currentTimeMillis() + EXPIRATION_TIME)) .signWith(SignatureAlgorithm.HS512, secretKey) .compact(); response.addHeader("token",token); response.addHeader("userId",userDto.getUserId()); } }loadUserByUsername 메소드@Override public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException { log.info("loadUserByUsername "+username); Optional<UserEntity> userEntity = userRepository.findByEmail(username); log.info(userEntity.get().getEmail()+" "+userEntity.get().getName()+" "+userEntity.get().getEncryptedPwd()); if(userEntity.isEmpty()){ throw new UsernameNotFoundException("해당 유저는 존재하지 않습니다."); } return new User(userEntity.get().getEmail(), userEntity.get().getEncryptedPwd(), true, true, true, true, new ArrayList<>()); }WebSecurity 클래스@Configuration @EnableWebSecurity @RequiredArgsConstructor public class WebSecurity{ private final BCryptPasswordEncoder bCryptPasswordEncoder; private final UserService userService; @Bean public SecurityFilterChain filterChain(HttpSecurity http) throws Exception { http .csrf(csrf -> csrf.disable()) .headers(headers -> headers .frameOptions((frameOptions) -> frameOptions.disable())) .authorizeRequests(authorize -> authorize .requestMatchers(PathRequest.toH2Console()).permitAll() .requestMatchers("/**").hasIpAddress("127.0.0.1") ) .addFilter(getAuthenticationFilter()); return http.build(); } @Bean public AuthenticationManager authenticationManager() { DaoAuthenticationProvider provider = new DaoAuthenticationProvider(); provider.setUserDetailsService(userService); provider.setPasswordEncoder(bCryptPasswordEncoder); return new ProviderManager(provider); } private AuthenticationFilter getAuthenticationFilter() { AuthenticationFilter authenticationFilter = new AuthenticationFilter(userService); authenticationFilter.setAuthenticationManager(authenticationManager()); return authenticationFilter; } }ApiGateWay - Application.yml 유저 서비스 부분 routes: - id: user-service uri: lb://USER-SERVICE predicates: - Path=/user-service/login - Method=POST filters: - RemoveRequestHeader=Cookie - RewritePath=/user-service/(?<segment>.*), /$\{segment} - id: user-service uri: lb://USER-SERVICE predicates: - Path=/user-service/users - Method=POST filters: - RemoveRequestHeader=Cookie - RewritePath=/user-service/(?<segment>.*), /$\{segment} - id: user-service uri: lb://USER-SERVICE predicates: - Path=/user-service/** - Method=GET filters: - RemoveRequestHeader=Cookie - RewritePath=/user-service/(?<segment>.*) , /$\{segment} - AuthorizationHeaderFilter
-
미해결[코드캠프] 부트캠프에서 만든 고농축 프론트엔드 코스
싸이월드 실습 4탄 질문이요 ㅠㅠ
싸이월드 실습 4탄 하는 중인데LOTTO 부분에 "특히 버튼과 숫자박스 부분"이 왜 세로로 다닥다닥 붙어있을까요..ㅠgame__container 부분에 flex-direction: column; align-items: center; justify-content: space-between; padding: 20px;가 들어있고lotto__text부분에도display: flex; flex-direction: column; align-items: center; justify-content: space-between;를 넣어봤으나 아무 변화가 없었습니다 ㅠgame.html:<!DOCTYPE html> <html lang="ko"> <head> <title>Game</title> <link href="./styles/game.css" rel="stylesheet"> </head> <body> <div class="wrapper"> <div class="wrapper__header"> <div class="header__title"> <div class="title">GAME</div> <div class="subtitle">TODAY CHOICE</div> </div> <div class="divideLine"></div> </div> <div class="game__container"> <img src="./images/word.png"> <div class="game__title">끝말잇기</div> <div class="game__subtitle">제시어 : <span id="word">코드캠프</span> </div> <div class="word__text"> <input class="textbox" id="myword" placeholder="단어를 입력하세요"> <button class="search">입력</button> </div> <div class="word__result" id="result">결과!</div> </div> <div class="game__container"> <img src="./images/lotto.png"> <div class="game__title">LOTTO</div> <div class="game__subtitle"> 버튼을 누르세요. </div> <div class="lotto__text"> <div class="number__box"> <div class="number1">3</div> <div class="number1">5</div> <div class="number1">10</div> <div class="number1">24</div> <div class="number1">30</div> <div class="number1">34</div> </div> <button class="lotto_button">Button</button> </div> </div> </div> </body> </html>game.css:* { box-sizing: border-box; margin: 0px } html, body{ width: 100%; height: 100%; } .wrapper { width: 100%; height: 100%; padding: 20px; display: flex; flex-direction: column; /* 박스가 wrapper안에 game__container 두개 총 세개*/ align-items: center; justify-content: space-between; } .wrapper__header{ width: 100%; display: flex; flex-direction: column; } .header__title{ display: flex; flex-direction: row; align-items: center; } .title{ color: #55b2e4; font-size: 13px; font-weight: 700; } .subtitle{ font-size: 8px; padding-left: 5px; } .divideLine{ width: 100%; border-top: 1px solid gray; } .game__container{ width: 222px; height: 168px; border: 1px solid gray; border-radius: 15px; display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 20px; background-color: #f6f6f6; } .game__title { font-size: 15px; font-weight: 900; } .game__subtitle { font-size: 11px; } .word__result { font-size: 11px; font-weight: 700; } .word__text { width: 100%; display: flex; flex-direction: row; justify-content: space-between; } .textbox { width: 130px; height: 24px; border-radius: 5px; } .search { font-size: 11px; font-weight: 700; width: 38px; height: 24px; } .number__box{ width: 130px; height: 24px; border-radius: 5px; background-color: #FFE400 ; display: flex; flex-direction: row; justify-content: space-between; align-items: center; } .lotto__text { display: flex; flex-direction: column; align-items: center; justify-content: space-between; } .number1{ font-size: 10px; font-weight: 700px; margin: 5px; } .lotto_button { font-size: 11px; font-weight: 700; width: 62px; height: 24px; }
-
미해결AWS 전 직원이 알려주는 AWS 아키텍처
Target Group Health checks failed 문제
AutoScaling을 만들어서 확인해봤는데 Target Group의 Health status가 unhealthy이며, Health checks failed라는 문제가 뜹니다.강의랑 정확히 똑같이 실행시켰습니다.
-
미해결빅데이터분석기사 실기대비 (R 활용)
dplyr 라이브러리의 select 함수를 궂이 써야하는 이유가 있을까요?
- 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! - 먼저 유사한 질문이 있었는지 검색해보세요. - 서로 예의를 지키며 존중하는 문화를 만들어가요. - 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요. 기본적으로 [ , ] 사용한 인덱싱과셀렉트 함수를 사용하여 인덱싱 하는것의 차이점이과 사용시 더 유용한 경우가 있을까요?혹시 가독성이 더 좋아서일까요?
-
해결됨Flutter 중급 2편 - 실전 앱 개발 - 미국 주식 앱 (with 클린 아키텍처)
다음 로드맵 질문
안녕하세요! 강의 너무 잘듣고 있습니다.혹시 다음에 예정된 flutter 강의가 있을까요? 있다면 수강하고 싶어서 질문드립니다!
-
해결됨[퇴근후딴짓] 빅데이터 분석기사 실기 (작업형1,2,3)
하이퍼파라미터 질문입니다.
안녕하세요 강사님교차검증을 통해 하이퍼파라미터를 사용할 때, 분류모델인 랜덤포레스트 외에도 의사결정나무, XGBOOST, 회귀모델인 로지스틱 등 전 모델에 동일하게 사용이 가능한가요?random_state의 값을 다른 값을 찾을 필요없이 0으로 고정해도 괜찮을까요?기존방식대로 검증 데이터를 분리하여 하이퍼파라미터 최적 값을 찾는 방법은 없을까요? 하이퍼파라미터를 사용하지 않고 기존방식으로 검증 데이터를 분리 후 성능지표가 가장 좋은 모델을 사용하는 방식으로 해도 점수감점이 없을까요?4가지 질문에 대한 답변을 해주시면 감사합니다.
-
미해결[C++과 언리얼로 만드는 MMORPG 게임 개발 시리즈] Part1: C++ 프로그래밍 입문
선처리 영역의 구분을 어떻게 해야할까요?
c++ 초기화 리스트 수업입니다.사진의 어셈블리 코드를 보시면,call Inventory::Inventory가 생성자의 몸체부분과 같은 중괄호로 묶여있습니다. 그렇다면 Inventory() 생성자가 선처리 영역이 아닌 몸체 내에서 호출된다고 보는게 맞는걸까요? 물론 선생님이 강의시간에 Inventory() 생성자는 선처리 영역에서 기본적으로 한번 호출된다고 하셨기때문에, 만약에 같은 중괄호에 묶여있더라도 저걸 선처리 영역으로 본다면, 그냥 몸체에 있는 첫번째 코드 int a=3;이 실행되기 전까지의 모든 어셈블리 코드는 다 선처리 영역이다! 라고 보는것이 맞을까요?
-
해결됨[리뉴얼] 타입스크립트 올인원 : Part2. 실전 분석편
"axios": "1.4.0" 버전 axios type 코드가 강의와 다릅니다!
export interface AxiosInstance extends Axios { <T = any, R = AxiosResponse<T>, D = any>(config: AxiosRequestConfig<D>): Promise<R>; <T = any, R = AxiosResponse<T>, D = any>(url: string, config?: AxiosRequestConfig<D>): Promise<R>; defaults: Omit<AxiosDefaults, 'headers'> & { headers: HeadersDefaults & { [key: string]: AxiosHeaderValue } }; } bind 함수 때도 버전에 따라 바뀐 버전이 확인 됐는데..type 업그레이드가 상당히 빈번히 되나보네요 ....
-
미해결10주완성 C++ 코딩테스트 | 알고리즘 코딩테스트
질문있습니다!
안녕하세요 큰돌님https://www.acmicpc.net/submit/5430/62168272 위 코드가 시간 초과가 납니다.다른 질문글을 봤을때, 문자열을 split에서 최악의 경우 시간 복잡도가 n^2가 된다고 하였는데 어떤 경우에서 시간 복잡도가 n^2이 되는지 궁금합니다.
-
해결됨[퇴근후딴짓] 빅데이터 분석기사 실기 (작업형1,2,3)
df.sum() 과 sum(df) 차이가 뭔가요?
df.sum() 과 sum(df) 차이가 무엇인지 질문드립니다.
-
미해결스프링 프레임워크는 내 손에 [스프1탄]
스프1탄을 보기 전에 나프1,2탄은 필수일까요?
안녕하세요. 현재 회사에서 일하고 있는 초보개발자입니다. 현재 강사님의 로드맵을 따라서 모든 강의를 사서 차근차근 보고있는 중인데,현재 회사에서 스프링으로 신규 프로젝트를 진행할 것 같아서 스프1탄을 먼저 보려고 하는데, 나프1탄과 나프2탄을 필수적으로 보고 스프1탄을 봐야할까요?나프1탄과 나프2탄은 보기에는 시간적으로 여유가 많이 없을 것 같아서 질문드립니다ㅠ
-
미해결모의해킹 실무자가 알려주는, SQL Injection 공격 기법과 시큐어 코딩 : PART 1
case when 구문 실습중
크리핵티브님 안녕하세요 sql 파티 1강의를 다보고 sql 2 를 구매하기전에 case when 구문을 사용해서 실습을 하던중 mssql idx oracle idx 부분에서 case when 으로 에러 베이스 공격이 가능하다고 시나리오를 가정해서 실습중 (case when 1=1 then 2+and+1='%23%23'%2bconvert(char,((system_user))) else 1 end) ORACLE (case when 1=1 then ORDSYS.ORD_DICOM.GETMAPPINGXPATH((select banner from v$version where rownum=1)) else 22 end) 이런식으로 코드를 만들어 봣는데 에러가 나옵니다 데이터 추론 기법에서도 title 이부분에서 case when 구문으로 공격 가능하다고 가정하고 MSSQL (case when 1=1 then substring(system_user,2,1)='a'+and+title else all end)ORACLE (case when 1=1 then substr((select+user+from+dual),1,1)='a'+and+title else 2 end)이런식으로 구문을 작성햇는데 에러가 뜹니다 sql 구문에대해 이해도가 낮아서 어떤식으로 구문을 작성해야 될까요??ㅜㅜ
-
미해결3. 웹개발 코스 [Enterprise Architecture(EA) X 전자정부프레임워크]
6강 따라하다가 에러 발생했습니다!
2023-06-20 23:01:59,508 INFO [org.springframework.web.context.ContextLoader] Root WebApplicationContext: initialization started2023-06-20 23:02:00,929 DEBUG [org.egovframe.rte.fdl.cmmn.aspect.ExceptionTransfer] count of ExceptionHandlerServices = 22023-06-20 23:02:01,382 DEBUG [org.egovframe.rte.fdl.property.impl.EgovPropertyServiceImpl] [Properties Service] 프로퍼티 key = pageUnit, 값 = 10 은 이 설정파일에 정의되어 있습니다.2023-06-20 23:02:01,382 DEBUG [org.egovframe.rte.fdl.property.impl.EgovPropertyServiceImpl] [Properties Service] 프로퍼티 key = pageSize, 값 = 10 은 이 설정파일에 정의되어 있습니다.2023-06-20 23:02:01,479 WARN [org.springframework.web.context.support.XmlWebApplicationContext] Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlMapClient' defined in file [C:\eGovFrame\eGovFrameDev-4.1.0-64bit\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\Egov_WEB\WEB-INF\classes\egovframework\spring\context-sqlMap.xml]: Invocation of init method failed; nested exception is java.io.FileNotFoundException: class path resource [egovframework/sqlmap/example/sql-map-config.xml] cannot be opened because it does not exist2023-06-20 23:02:01,482 ERROR [org.springframework.web.context.ContextLoader] Context initialization failedorg.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlMapClient' defined in file [C:\eGovFrame\eGovFrameDev-4.1.0-64bit\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\Egov_WEB\WEB-INF\classes\egovframework\spring\context-sqlMap.xml]: Invocation of init method failed; nested exception is java.io.FileNotFoundException: class path resource [egovframework/sqlmap/example/sql-map-config.xml] cannot be opened because it does not exist at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1804) ~[spring-beans-5.3.20.jar:5.3.20] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:620) ~[spring-beans-5.3.20.jar:5.3.20] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[spring-beans-5.3.20.jar:5.3.20] at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.20.jar:5.3.20] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.20.jar:5.3.20] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.20.jar:5.3.20] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.20.jar:5.3.20] at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:934) ~[spring-beans-5.3.20.jar:5.3.20] at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918) ~[spring-context-5.3.20.jar:5.3.20] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583) ~[spring-context-5.3.20.jar:5.3.20] at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:401) ~[spring-web-5.3.20.jar:5.3.20] at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:292) ~[spring-web-5.3.20.jar:5.3.20] at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:103) ~[spring-web-5.3.20.jar:5.3.20] at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4494) ~[catalina.jar:9.0.76] at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4946) ~[catalina.jar:9.0.76] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ~[catalina.jar:9.0.76] at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1328) ~[catalina.jar:9.0.76] at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1318) ~[catalina.jar:9.0.76] at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?] at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) ~[tomcat-util.jar:9.0.76] at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140) ~[?:?] at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:866) ~[catalina.jar:9.0.76] at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:795) ~[catalina.jar:9.0.76] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ~[catalina.jar:9.0.76] at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1328) ~[catalina.jar:9.0.76] at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1318) ~[catalina.jar:9.0.76] at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?] at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) ~[tomcat-util.jar:9.0.76] at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140) ~[?:?] at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:866) ~[catalina.jar:9.0.76] at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:249) ~[catalina.jar:9.0.76] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ~[catalina.jar:9.0.76] at org.apache.catalina.core.StandardService.startInternal(StandardService.java:428) ~[catalina.jar:9.0.76] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ~[catalina.jar:9.0.76] at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:923) ~[catalina.jar:9.0.76] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ~[catalina.jar:9.0.76] at org.apache.catalina.startup.Catalina.start(Catalina.java:772) ~[catalina.jar:9.0.76] at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?] at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?] at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:347) ~[bootstrap.jar:9.0.76] at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:478) ~[bootstrap.jar:9.0.76]Caused by: java.io.FileNotFoundException: class path resource [egovframework/sqlmap/example/sql-map-config.xml] cannot be opened because it does not exist at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:199) ~[spring-core-5.3.20.jar:5.3.20] at org.egovframe.rte.psl.orm.ibatis.SqlMapClientFactoryBean.buildSqlMapClient(SqlMapClientFactoryBean.java:346) ~[org.egovframe.rte.psl.dataaccess-4.1.0.jar:?] at org.egovframe.rte.psl.orm.ibatis.SqlMapClientFactoryBean.afterPropertiesSet(SqlMapClientFactoryBean.java:301) ~[org.egovframe.rte.psl.dataaccess-4.1.0.jar:?] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1863) ~[spring-beans-5.3.20.jar:5.3.20] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1800) ~[spring-beans-5.3.20.jar:5.3.20] ... 42 more