유틸리티 Swiss File Knife
2020.12.30 17:34
nircmd 처럼 다기능 명령 줄 도구입니다.
출처: http://stahlworks.com/dev/?tool=hexfind
SFK - The Swiss File Knife Multi Function Tool.
Release 1.9.7 Base/XD Revision 2 of Sep 17 2020.
StahlWorks Technologies, http://stahlworks.com/
Distributed for free under the BSD License, without any warranty.
type "sfk commandname" for help on any of the following.
some commands require to add "-help" for the help text.
file system
sfk list - list directory tree contents.
list latest, oldest or biggest files.
list directory differences.
list zip jar tar gz bz2 contents.
sfk olist - list office files in a folder,
like .docx .xlsx .ods .odt
sfk filefind - find files by filename
sfk treesize - show directory size statistics
sfk copy - copy directory trees additively
sfk sync - mirror tree content with deletion
sfk rename - flexible multi file rename
sfk partcopy - copy part from a file into another one
sfk mkdir - create directory tree
sfk delete - delete files and folders
sfk deltree - delete whole directory tree
sfk deblank - remove blanks in filenames
sfk space [-h] - tell total and free size of volume
sfk filetime - tell times of a file
sfk touch - change times of a file
sfk index - create index file(s) for fast lookup
sfk name - lookup file names using index files
sfk fixfile - change bad filenames and file times
sfk setbytes - set bytes at offset within a file
compression
sfk zip - create zip file from folder
sfk zipto - zip selected file list
sfk unzip - list or extract zip file
sfk checkzip - verify zip file content
conversion
sfk oload - load office file content as text
sfk lf-to-crlf - convert from LF to CRLF line endings
sfk crlf-to-lf - convert from CRLF to LF line endings
sfk detab - convert TAB characters to spaces
sfk entab - convert groups of spaces to TAB chars
sfk scantab - list files containing TAB characters
sfk split - split large files into smaller ones
sfk join - join small files into a large one
sfk csvtotab - convert .csv data to tab separated
sfk tabtocsv - convert tab separated to .csv format
sfk encode - convert data to base64 or hex format
sfk decode - decode base64, hex or url format
sfk wtoa - convert wide chars to Ansi
sfk wtou - convert wide chars to UTF-8
sfk utoa - convert UTF-8 text to Ansi
sfk hexdump - create hexdump from a binary file
sfk hextobin - convert hex data to binary
sfk hex - convert decimal number(s) to hex
sfk dec - convert hex number(s) to decimal
sfk chars - print chars for a list of codes
sfk bin-to-src - convert binary to source code
text processing
sfk filter - search, filter and replace text data
sfk ofilter - filter text from an office file
sfk replace - replace words in binary and text files
sfk xed - edit stream text using sfk expressions
sfk xex - extract from stream text using expressions
sfk xreplace - Plus/XE: replace in files using expressions
sfk run - run external command on all files of a folder
sfk runloop - run a command n times in a loop
sfk printloop - print some text many times
sfk load - load file content for further processing
sfk perline - run sfk command(s) per input text line
sfk head - print first lines of a file
sfk tail - print last lines of a file
sfk snapto - join many text files into one file
sfk addhead - insert string at start of text lines
sfk addtail - append string at end of text lines
sfk joinlines - join text lines split by email reformatting
sfk strings - extract strings from a binary file
sfk sort - sort text lines produced by another command
sfk count - count text lines, filter identical lines
sfk difflines - show text lines differing between files
sfk linelen - tell length of string(s)
search and compare
sfk xfind - search in text files using
wildcards and simple expressions
sfk ofind - search in office files .docx .xlsx .ods
sfk xfindbin - search in text and binary files
sfk xhexfind - search with hexdump output
sfk extract - extract data from text and binary
sfk find - search static text, without wildcards
sfk hexfind - search static binary data
sfk md5gento - create list of md5 checksums over files
sfk md5check - verify list of md5 checksums over files
sfk md5 - calc md5 over a file, compare two files
sfk pathfind - search PATH for location of a command
sfk reflist - list fuzzy references between files
sfk deplist - list fuzzy dependencies between files
sfk dupfind - find duplicate files by content
networking
sfk httpserv - run an instant HTTP server.
type "sfk httpserv -help" for help.
sfk ftpserv - run an instant FTP server
type "sfk ftpserv -help" for help.
sfk ftp - instant FTP client
sfk web - send HTTP request to a server
sfk wget - download HTTP file from the web
sfk tcpdump - print TCP conversation between programs
sfk udpdump - print incoming UDP requests
sfk udpsend - send UDP requests
sfk ip - tell own machine's IP address(es).
type "sfk ip -help" for help.
sfk netlog - send text outputs to network,
and/or file, and/or terminal
sfk fromnet -h - receive and print network text
sfk ping - ping multiple machines in one go
scripting
sfk help chain - how to combine multiple commands
sfk batch - run many sfk commands in a script file
sfk label - define starting points within a script
sfk call - call a sub function at a label
sfk echo - print (coloured) text to terminal
sfk color - change text color of terminal
sfk setvar - put text into an sfk variable
sfk storetext - store text in memory for later use
sfk alias - create command from other commands
sfk mkcd - create command to reenter directory
sfk sleep - delay execution for milliseconds
sfk pause - wait for user input
sfk stop - stop sfk script execution
sfk tee - split command output in two streams
sfk tofile - save command output to a file
sfk toterm - flush command output to terminal
sfk for - repeat commands many times
sfk loop - repeat execution of all commands
sfk cd - change directory within a script
sfk getcwd - print the current working directory
sfk require - compare version text
sfk time [-h] - print current date and time
development
sfk bin-to-src - convert binary data to source code
sfk make-random-file - create file with random data
sfk fuzz - change file at random, for testing
sfk sample - print example code for programming
sfk patch - change text files through a script
sfk inst - instrument c++ with tracing calls
diverse
sfk view - show text output in a GUI tool,
for interactive browse and filter
sfk status - send colored status to the SFKTray
Windows GUI utility for display
sfk calc - do a simple instant calculation
sfk random - create a random number
sfk prompt - ask for user input
sfk number - print number in diverse formats
sfk xmlform - reformat xml for easy viewing
sfk jsonform - reformat json for easy viewing
sfk video - how to edit video files
sfk toclip - copy command output to clipboard
sfk fromclip - read text from clipboard
sfk env - search environment variables
sfk version - show version of a binary file
sfk ascii - list Ansi codepage characters
sfk ascii -dos - list OEM codepage characters
sfk spell - phonetic spelling for telephone
sfk cmd - print an example command
sfk data - create random test data
sfk ruler - measure console text width
sfk license - print the SFK license text
sfk update - check for SFK updates
help by subject
sfk help office - how to search in office files
sfk help select - how dirs and files are selected in sfk
sfk help options - general options reference
sfk help patterns - wildcards and text patterns within sfk
sfk help chain - how to combine (chain) multiple commands
sfk help var - how to use sfk variables and parameters
sfk samp - example scripts on sfk use and for
http web access automation
sfk help shell - how to optimize the windows command prompt
sfk help chars - about locale specific characters
sfk help nocase - about case insensitive search
sfk help unicode - about unicode file reading support
sfk help colors - how to change result colors
sfk help compile - how to compile sfk on any linux system
first time user
type "sfk basic" for very basic informations about
how to select files, general options, shell preparation,
complex <>|!&? character issues and color setup.
to search ALL help text for a topic:
type "sfk ask word1" to search all for word1.
type "sfk ask w1 w2" to search all for w1 or w2.
type "sfk dumphelp" to print ALL help text.
===================================================================================
- 간단한 사용법:
1) 1000 ms 대기하기
sfk.exe sleep 1000
2) 싸이트에서 파일 다운로드: 원래의 wget.exe 파일이 아니고 sfk 에 내장된 기능입니다.
sfk.exe wget http://www.drivesnapshot.de/download/snapshot.exe
3) 헥스 값 "F00022000B020A00" 를 찾아서 "F00023000B020A00" 로 바꾸기
sfk.exe replace -binary /F00022000B020A00/F00023000B020A00/ -dir %~dp0 -file snapshot.exe -yes
4) 문자 "Unallocated" 를 찾아서 "미 할당 " 로 바꾸기
sfk.exe replace snapshot.exe "/Unallocated/미 할당 /" -yes
5) 옵셋 "9878" 에 헥스 값 "00AA0600" 쓰기
sfk.exe setbytes snapshot.exe 0x9878 0x00AA0600 -yes
6) 컴퓨터 ip 찾기
sfk.exe ip
*** "-yes" 옵션이 없으면 시물레이션만 보여주고 값은 실제로 변경은 하지 않습니다.
댓글 [13]
-
짱ㅇr치 2020.12.30 17:52 -
sunshine 2020.12.30 17:56
간단한 사용법을 추가했습니다.
-
슈머슈마 2020.12.30 17:53
client 기능 sftp 는 없나요? psftp 를 써야할까요?
팁도 감사합니다.
-
sunshine 2020.12.30 17:57
client 기능 쪽은 잘 모릅니다.
-
슈머슈마 2020.12.30 23:32
혹시 regsetup.exe 아실까요?
1.0다운을 받았는데 작동법이 어려워서
regsetup.txt ansi 해주고 폴더에있는 실행파일을 레지스트리에 상대경로값으로
입력해줄수 있는 파일인데 나온지가 꾀대서 작동이 제대로 안되서
-
sunshine 2020.12.31 00:50
저도 처음 보는 툴이네요. 대충 내용을 보니 실행 파일 위치를 등록해주는 것같군요.
RegConvert.exe 로 reg 파일을 bat 로 변경후 설치 위치를 %~dp0 로 수정하면 될것같습니다.
-
슈머슈마 2020.12.31 01:09
배치 파일에서는 해봤는데 레지를 배치파일로는 안해봤는데 혹시
제일위에 상단에 %~dp0 메인으로 걸어주나요? 아니면 각 줄마다
경로가 있는 해당줄에서 예를들어서 %~dp0powerpro₩power.exe 이런식으로? 해야될까요?
-
sunshine 2020.12.31 01:31
보통은 이런 식이지요.
@echo off
pushd %~dp0
%~dp0power.exe
-
슈머슈마 2020.12.31 01:47
파일에 바로 적용이 되나보군요. 레지에서도 이게 된다니 정말감사합니다. 새로운걸 알았습니다. 잘 배우고 갑니다. -
슈머슈마 2020.12.31 11:27
배치파일 경로 지정으로 %~dp0 레지에 적용하는 방법좀 가르켜주세요 아무리해봐도 안되네요 -
슈머슈마 2020.12.31 14:15
저위에 올린 파일은 안에 보시면 regsetup.exe 파일과 regsetup.txt 파일 두개하고 reg.bat 파일로 구성되어 있습니다.
regsetup.exe 는 그대로 실행 파일 reg.bat 배치파일 실행 환경, regsetup.txt 는 레지 파일을 넣어두고 경로만 지정해주면
상대경로로 레지에 지금 reg.bat 실행한 곳의 regsetup.txt 파일의 내용을 상대경로로 레지스트리에 입력합니다.
@= [기본값] 을 ""= [기본값] 으로 입력하여 넣어주시면 됩니다.
나머지 레지스트리 명령은 똑같습니다. "명령문"=%d\실행할파일.exe 이런식으로 적어주시면 reg.bat 폴더의 경로에 있는 실행파일을 레지스트리에
상대경로로 입력합니다. 레지스트리 명령문은 레지스트리 내보내기 하면 나옵니다.
폴더는 "명령문"=%d\선택된폴더 이런식으로
-
홍이잠 2021.01.08 15:21
좋은자료 감사합니다.. 즐겁고 행복한 시간 되세요♡
-
키그 2021.01.24 01:11
SFK 도 내부에 함수와 배치 스크립트 기능이 있습니다. 그걸로 어떻게든 코딩을 해봤는데, 매 줄마다 그 + 와 등등의 불편함으로 포기했던 기억이...ㅠ
다시 공부해서 도전해 봐야겠군요. 그 놈의 연구, 공부....ㅋㅎ
사용법 은 없나요
사용법만 알면 좋아 보이는데?