- cygwin
- dos2unix
- embedded linux
- tftp
- windows host
리눅스 Changing Your MAC Address In Window XP/Vista, Linux And Mac OS X First let me explain a few things about MAC addresses. MAC stands for Media Access Control and in a sense the MAC address is a computer뭩 true name on a LAN. An Ethernet MAC address is a six byte number, usually expressed as a twelve digit hexadecimal number (Example: 1AB4C234AB1F). IPs are translated to MAC address by a protocol called ARP (Address Resolution Protocol). Let뭩 say a computer with and IP of 192.168.1.1 wants to send information to another computer on the LAN that has an IP of 192.168.1.2 . First 192.168.1.1 will send out a broadcast to all stations on the LAN asking who has the IP 192.168.1.2. Then the box that has 192.168.1.2 will respond to 192.168.1.1 with it뭩 MAC address which is cached in 192.168.1.1뭩 ARP table for later use. To put this in Socratic Dialog form (with just a touch of Stallone): Host 1 (192.168.1.1): Yo everyone on the LAN (FF:FF:FF:FF:FF:FF), who has the IP 192.168.1.2? My MAC is DE:AD:BE:EF:CA:FE so you can respond back to me. Host 2 (192.168.1.2): Hello DE:AD:BE:EF:CA:FE, I have IP 192.168.1.2 and my MAC address is 12:34:56:78:90:12 so you can send your IP packets to me. You can see the ARP table of a box by dropping out to a command prompt and typing 밶rp 뻕?in Windows or just 밶rp?in Linux. ARP can also work the other way by a host on the LAN sending its MAC address to another machine on the LAN for preemptive caching unless the host is configured to not accept un-requested ARP replies. A person might want to change the MAC address of a NIC for many reasons:
Linux To change your MAC address in Linux (and most *nix system) is easy as pie. All it takes is two easy to script commands: ifconfig eth0 down hw ether 00:00:00:00:00:01 ifconfig eth0 up These two little commands would set your eth0 interface to use the MAC 00:00:00:00:00:01. Just plug in the NIC you want to set and the MAC address you want to use into the commands above and your done. Changing your MAC address is one of those things that is much easier to do in Linux then under Windows. Mac OS X For versions of OS X before Tiger (OS X 10.4) you will need this patch: http://slagheap.net/etherspoof/ Then you use a command like: sudo ifconfig en0 lladdr 00:00:00:00:00:01 I'm not much of a Macintosh guy, so I pulled most of this info from: http://www.macgeekery.com/gspot/2006-04/mac_address_spoofing My understanding is that there are complications with some AirPort cards so you may also want to read: http://rgov.org/airport-spoof/ Windows 2000/XP/Vista: The Hard Way In XP you can use the regedit to edit the registry from a GUI or the reg command to edit it from the console, I뭠l be using regedit. Information on all your NICs can be found the registry key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ Class\{4D36E972-E325-11CE-BFC1-08002bE10318}\ . Under this key you will find a bunch of sub keys labeled as 0000, 00001, 0002 and so forth. We can assume any MAC address we want by finding the key that controls the NIC we want to change, putting in a string value called 밡etworkAddress?and setting it to the MAC address we want to use formatted as a twelve digit hex number (example: 000000000001). To find out which key is which we can search through them for the value 밆riverDesc?until we find the one that matches the NIC we wish to alter. After you set 밡etworkAddress?to the address you want just restart the NIC by disabling it then enabling it (or in the case of PCMCIA cards, just eject and reinsert). You can confirm the MAC address change by using the 밽etmac?or 밿pconfig /all?commands. Windows 2000/XP/Vista: The Easy Way Use Mac Makeup ( http://www.gorlani.com/publicprj/macmakeup/macmakeup.asp ), MadMACs (http://www.irongeek.com/i.php?page=security/madmacs-mac-spoofer), Smac ( http://www.klcconsulting.net/smac/ ) or Etherchange (http://ntsecurity.nu/toolbox/etherchange/ ). Mac Makeup is a cool little GUI and Command line tool that's freeware, the creator also offers a Plugin for Bart's PE builder. MadMACs is a tool to randomize your MAC address and host name on every reboot. Smac has a nice GUI and was free but has since gone commercial, there's no reason to bother with it as there are free tools that are just as good. I use MadMACs since I wrote it and it lets me keep my host information randomized. Have fun with your MAC addresses switching, but be careful not to cause network problems. My favorite MAC address is DEADBEEFCAFE, for other interesting MACs see: http://www.binrev.com/forums/index.php?showtopic=15942 Enjoy. |
maxcpus=0 .
|
/etc/rc2.d/S20nfs-kernel-server restart |
https://linuxlink.timesys.com/docs/windows_tftp
Configuring a TFTP Server for WindowsOn Windows systems, the TFTP daemon is controlled by the Extended Internet Services Daemon (xinetd). To configure the TFTP daemon, use the following general procedure:
All of these files are located in the directory where you have Cygwin installed. Note If you use a Windows-provided editor to create text files, they might contain DOS-style line breaks. Use the dos2unix utility in Cygwin to convert the files for use in a UNIX-style system. Issue the command dos2unix --help for details about this utility. Creating the TFTP Server FileCreate the file /etc/xinetd.d/tftp with the contents shown in the following listing: # default: off # description: The tftp server serves files using the # trivial file transfer protocol. The tftp protocol # is often used to boot diskless workstations, download # configuration files to network-aware printers, and # to start the installation process for some # operating systems. service tftp { disable = no socket_type = dgram protocol = udp wait = yes user = SYSTEM server = /usr/sbin/in.tftpd server_args = /tftpboot per_source = 11 cps = 100 2 flags = IPv4 } Note The files in the xinetd.d directory must have read/write permissions set for all users. Generally the touch command is sufficient; however, this depends on how your host machine is configured. If necessary, use the chmod command to change permissions, as in the following example: $ chmod a+rw /etc/xinetd.d/* Disabling Unnecessary xinetd ServicesTo avoid conflicts and possible security risks, you can disable all services of the xinetd daemon except for TFTP. This step is optional. To disable unnecessary services, edit the xinetd configuration file, /etc/xinetd.conf, to add the enabled line as shown in the following example: # Simple configuration file for xinetd # Some defaults, and include /etc/xinetd.d/ defaults { instances = 60 log_type = FILE /var/log/servicelog log_on_success = HOST PID log_on_failure = HOST cps = 25 30 enabled = tftp } includedir /etc/xinetd.d The enabled line disables all services except those that are specified. If this line is not used, all services are enabled by default. |
압축하기
tar czvf - /tmp/* | split -b 1m - test.tar.gz ->tar는 /tmp의 모든 파일을 압축하되 압축한 내용을 std로 보내고(-) split은 std의 데이터를 1메가 단위로 분할해 test.tar.gz란 이름을 prefix로 하는 파일을 만든다. 압축 풀기 cat test.tar.gz* | tar xzvf - |
블록 선택
Ctrl + v indent 정리 = 함수 폴딩 설정 zf 해제 zo 함수 범위 확인 % 파일 탐색하여 열기 :10vs. 10 창크기 vs verticalscreen . 디렉토리 파일 처음과 끝 이동 처음 :1 끝 :$ 되살리기 되돌아가기 되살리기 u 되돌리기 ctrl+r 창 분할 후 사이즈 조절 ctrwl+w N+ 가로 N만큼 늘리기 ctrwl+w N- 가로 N만큼 줄이기 ctrwl+w N> 가로 N만큼 오른쪽으로 늘리기 ctrwl+w N< 가로 N만큼 왼쪽으로 늘리기 편집중에 수행한 명령의 출력 불러오기 :r !command 블록 선택해서 주석 설정 해제하기 설정 :norm i// 해제 :norm 2x |