일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
- SK7MOBILE
- 소스비교
- apple여의도
- #알뜰폰
- 유니콘
- 유심무료
- applestore
- 알뜰유심
- VLOOKUP
- 금융감독원API
- advil
- XML무료뷰어
- 여의도IFC
- VS2019
- OPENDART
- 알뜰요금제
- IFC
- vs2017
- 알뜰
- 애드빌
- xmlviewer
- xml뷰어
- AWS
- 유니콘앱
- 광고차단
- productivity Power Tools
- json #paramquery
- 애드빌용법
- 유니콘광고차단
- VS2015
- Today
- Total
목록프로그래밍/JAVA (8)
체크개발자's Blog
//Path manipulation 방지 public static String FilePathFilter(String FilePath) { String result = FilePath; if(!"".equals(File)) { FilePath= FilePath.replace('\\', '/'); // 시스템에 따라 file.separator 다르기때문에 java는 '/' 로 설정해야한다. FilePath= FilePath.replaceAll("\\\\", "/"); FilePath= FilePath.replaceAll("/[.]{1,2}", ""); //상위경로로 가는 것을 방지 FilePath = FilePath.replaceAll("\\[.]{1,2}", ""); //상위경로로 가는 것을 방지 res..
window > Preferences > java > Code Style > Code Templates Comments > Files ## 위의 위치에서 수정해도 안될때는 ## 해당 프로젝트 > properties 에서 설정을 변경해준다 Patten Class 에 적용 - Comment > Types /** * FileName : ${file_name} * Comment : * @version : 1.0 * @author : sunshiny * @date : ${date} */ --------------------------- Method 에 적용 - Comment > Methods /** * Comment : * @version : 1.0 * @tags : ${tags} * @date : ${date}..
package encryption;import java.security.AlgorithmParameters;import java.security.NoSuchAlgorithmException;import java.security.SecureRandom;import javax.crypto.BadPaddingException;import javax.crypto.Cipher;import javax.crypto.IllegalBlockSizeException;import javax.crypto.SecretKey;import javax.crypto.SecretKeyFactory;import javax.crypto.spec.IvParameterSpec;import javax.crypto.spec.PBEKeySpec;i..
Getuuid() 이거 이용햇음. 기본적인 Controller와 jsp 경로 호출 등 셋팅은 되어있다는 가정하에 시작한다.(필자는 STS를 사용 > http://mkil.tistory.com/267 (4)테스트환경 참조~) 1. fileTest.jsp 생성JSP를 다음과 같이 생성하고 FORM 태그를 사용하여 다음과 같이 작성하자.가장 중요한건 multipart/form-data를 설정해 줘야 한다는것.주석에 순서대로 설명을 달아놓았다. 해당 소스는 "제출" 버튼을 누르면 submit동작에 의해 /fileUpload로 매핑되어져 있는Contorller를 호출한다. 이름 : 파일 : 2. action Url에 fileupload 메소드 작성action url이 매칭되는 /fileUpload 에 file u..
/** * 날짜 반환(format이 없으면 오늘(yyyy-MM-dd)날짜 반환) * @param tormat(yyyy|MM|dd|hh|mm|ss 치환) * @returns {String} */ function cfGetDate(format){ var result = ""; var date = new Date(); if(format !== undefined){ result = format.replace(/(yyyy|MM|dd|hh|mm|ss|fff|a\/p)/gi, function($obj){ switch ($obj) { case "yyyy": return date.getFullYear(); case "MM": return cfSetAddZero(date.getMonth() + 1); case "dd": ..
자바의 AES128 CBC 암호화 예제입니다.참고로 CBC 암호화는 IV 라는 벡터값이 하나가 더 들어갑니다.public Key getAESKey() throws Exception { String iv; Key keySpec; String key = "1234567890123456"; iv = key.substring(0, 16); byte[] keyBytes = new byte[16]; byte[] b = key.getBytes("UTF-8"); int len = b.length; if (len > keyBytes.length) { len = keyBytes.length; } System.arraycopy(b, 0, keyBytes, 0, len); keySpec = new SecretKeySpec(k..
java 에서 한것은 replaceAll("\\\\","/"); 파일 다운로드시, Header Manipulation 취약점 있는 경우replaceAll("/r","");replaceAll("/n",""); File file1 = new File(INPUT PATH);String S_NEW_FILE_PATH = file1 == null ? null : file1.getAbsolutePath().replaceAll("\\\\", "/"); /* application/pdf application/vnd.ms-word application/vnd.ms-xls application/vnd.ms-powerpoint*/ String strClient = request.getHeader("user-agent"); S..
https://www.codeproject.com/Articles/8633/File-Encryption-Decryption-with-Hash-Verification Java Spring Framework Masterclass - 4,625 students enrolledEncryption and decryption are fundamental requirements of every secure-aware application, therefore the Java platform provides strong support for encryption and decryption through its Java Cryptographic Extension (JCE) framework which implements t..