2014년 5월 8일 목요일

windows7에서 장치및 프린터가 검색되지 않을 경우


장치 및 프린터 검색이되지 않을 경우














 아래 서비스를 시작해 주면 정상적으로 열리게 됩니다.

2014년 4월 28일 월요일

자신의 PC 아이피 확인 이메일 발송 Script

① 윈도우 [ 출처: http://exchangeserverpro.com/ ]

<#
This script will monitor your IP for change, and email you if/when it changes
The email send feature uses a valid Gmail account to send the emails, if you don't have one it's easy to get one.
#>

#Get your current public IP address.  I use 1and1.com here as they are a large provider and reply to ping requests.
$a = ping -r 1 1and1.com | Select-String "Route: *." | Get-Unique | Out-String

#In order to check your IP against it's last value it's written to a file each time it is checked.  If the  file or folder do not exist they are created.
#confirm that the file c:\temp\ip.txt exists, if not create it
$path = Test-Path C:\temp\
If ($PATH -ne 'True'){mkdir c:\temp}
$path = Test-Path C:\temp\ip.txt
If ($PATH -ne 'True'){New-Item -ItemType file C:\temp\ip.txt}
$b = Get-Content "C:\temp\ip.txt" | Select-String "Route: *." | Out-String
#compare $a to $b
$c = $a.compareTo($b)
#If $a and $b are not the same, email new IP address
If ($c -ne '0') {
$data = $a
$a > C:\temp\ip.txt
#Email
$EmailFrom = "Yoursendingaccoutn@gmail.com"
$EmailTo = "recipient@domain.com" 
$Subject = "IP Has Changed" 
$Body = $data | Out-String
$SMTPServer = "smtp.gmail.com" 
$SMTPClient = New-Object Net.Mail.SmtpClient($SmtpServer, 587) 
$SMTPClient.EnableSsl = $true 
$SMTPClient.Credentials = New-Object System.Net.NetworkCredential("username", "password"); 
$SMTPClient.Send($EmailFrom, $EmailTo, $Subject, $Body)
EXIT
}
ELSE {
#If $a and $b are the same, exit
echo 'IP Address has not changed'
EXIT
}




















② 리눅스 [출처  https://bbs.archlinux.org/ ]
 
curl ifconfig.me | mailx -s "my IP" login@gmail.com
이외의 사이트 : icanhazip.com

2014년 4월 23일 수요일

windows7에서 프로그램 아이콘이 깨져 보일때

[출처 : http://support.microsoft.com ]

바탕 화면상의 프로그램이 실행에서는 문제가 없는데 아래와 같이 깨져 보일때





윈도우상의  concache.db 파일이 깨져서 발생한다.
해당 파일을 삭제하고 컴퓨터를 재 시작하면 다시 정상적으로 표시된다.

파일의 위치는 아래와 같다.







2014년 4월 18일 금요일

USB를 이용한 Windows7 설치하기


Windows7을 설치 할 때 USB를 이용할 경우 링크의 프로그램을 설치한 후
설치할 Windows 이미지를 선택하면 자동으로 설치 USB를 만들어 준다.
 ① 설치

















② USB에 설치 파일 선택하면 끝.

2014년 2월 27일 목요일

iptables를 이용하여 mac addr 필터링 하기

[출처 : http://kldp.org/ ]

#!/bin/sh
# PlusGenie Ltd
#set -x
 
DB_FILE=mac_dbfile.txt
DOOR=24810
 
# port example, 135:139 for range
 
function filter_one {
        iptables $1 INPUT $2 --protocol tcp --destination-port $DOOR -m mac --mac-source $3 -j ACCEPT > /dev/null 2>&1
        iptables $1 INPUT $2 --protocol tcp --source-port $DOOR -m mac --mac-source $3 -j ACCEPT  > /dev/null 2>&1
        iptables $1 INPUT $2 --protocol udp --destination-port $DOOR -m mac --mac-source $3 -j ACCEPT > /dev/null 2>&1
        iptables $1 INPUT $2 --protocol udp --source-port $DOOR -m mac --mac-source $3 -j ACCEPT > /dev/null 2>&1
}
 
 
#deny all other traffic
function filter_other {
        iptables $1 INPUT --protocol tcp --destination-port $DOOR -j DROP
        iptables $1 INPUT --protocol tcp --source-port $DOOR -j DROP
        iptables $1 INPUT --protocol udp --destination-port $DOOR -j DROP
        iptables $1 INPUT --protocol udp --source-port $DOOR -j DROP
}
 
if [ ! -e $DB_FILE ]; then
        echo "There is no config file"
        exit 1
fi
function setup_first_rule {
        echo "\n=====SETUP INIT RULES==========================="
        echo "Allow established sessions to receive traffic"
        iptables -A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
        # We need to insert this rule before that. Since this is a lot of traffic
        # we'll insert it as the first rule so it's processed first.
        echo "\n================================================"
        iptables -I INPUT 2 -i lo -j ACCEPT
        echo "\n================================================"
        echo "allow incoming traffic on the default SSH port (22)"
        iptables -A INPUT -p tcp --dport 22 -j ACCEPT
        echo "\n================================================"
#       echo "let's allow all incoming web traffic "
#       iptables -A INPUT -p tcp --dport 80 -j ACCEPT
}
 
#Just check whether we already set the rules or not
SETUP_DONE=0
for MAC in `cat $DB_FILE`; do
        if iptables -L | grep -q $MAC; then
                echo "checking configs"
                # Already add drop rules before
                SETUP_DONE=1
        fi
done
 
# let's set up the first rule
if [ $SETUP_DONE -eq 0 ]; then
        setup_first_rule
fi
 
for MAC in `cat $DB_FILE`; do
        if iptables -L | grep -q $MAC; then
                echo "already found in rules"
        else
        echo "\n================================================"
                echo "Inserting new rules"
                filter_one -I 4 $MAC
        fi
done
 
if [ $SETUP_DONE -eq 0 ]; then
        filter_other -A
fi
#Showing what we done:
#iptables -L -v

2014년 2월 20일 목요일

아웃룩 winmail.dat 오류

[출처 : http://www.guseongwoo.com/ ]

아웃룩 2010를 설치한 후 메일을 보내면 첨부 파일이 winmail.dat로 바뀌어 버리는 증상을 경험하셨다면 아래의 두가지 방법으로 해결 가능합니다.

DontEncodeCustomNote 키 설정
1. 레지스트리 편집기를 실행합니다. (윈도우버튼+R, 실행창에 regedt32 입력)
2. 'HKEY_CURRENT_USER\SOFTWARE\Microsft\Office\14.0\Outlook\Option\Mail'로 이동합니다.
3. 이동한 'Mail' 키에서 DWORD(32비트)타입으로 'DontEncodeCustomNote'값를 추가합니다.
4. 추가한 'DontEncodeCustomeNote'의 값을 0에서 1로 변경합니다.
5. 컴퓨터를 재부팅합니다.


DisableTNEF 키 설정
1. 레지스트리 편집기를 실행합니다. (윈도우버튼+R, 실행창에 regedt32 입력)
2. 'HKEY_CURRENT_USER\SOFTWARE\Microsft\Office\14.0\Outlook\Preferences'로 이동합니다.
3. 이동한 'Preferences' 키에서 DWORD(32비트)타입으로 'DisableTNEF'값를 추가합니다.
4. 추가한 'DisableTNEF'의 값을 0에서 1로 변경합니다.
5. 컴퓨터를 재부팅합니다.

왜 첨부 파일이 사라지고 winmail.dat이 생기는 것인지에 대한 설명은 Google에서 'winmail.dat'로 검색하면 많이 나옵니다. 대부분은 RTF, TNEF 어쩌구 하면서 웹메일에서 지원하지 않는 형식에 대한 설명을 하고, 이에 대한 해결 방법으로 아웃룩 옵션을 변경하라고 나옵니다.
 하지만, 저의 경우 아웃룩 2010의 옵션을 변경하였음에도 불구하고 첨부파일이 winmail.dat로 바뀌어 전송되는 경우가 자주 발생하였는데요, 아웃룩 2010의 버그로 여겨집니다.

 위의 두 설명은 이런 경우에 대한 해결 방법으로 아웃룩 옵션 값에 해당하는 레지스트리 설정을 직접 바꾸는 것입니다. 제 경우 현재까지는 문제가 재현되지 않아, 확실히 해결된 것으로 생각되고 있고요, 향후 아웃룩 2010 업데이트를 통해 본 문제가 해결될 수도 있을 거라 기대합니다.

 그러므로 아래의 설명은 참고만 하여 주세요. 그리고 혹시 관련된 좋은 정보를 알고 계신 분은 저에게도 알려주시면 아래 설명에 보태도록 하겠습니다.

 해결 방법의 출처는 아래의 두 곳입니다.
 1) http://blog.naver.com/iniskang
 2) http://outlooklab.wordpress.com/

** 추가(아웃룩 설정 변경 방법)
Winmail.dat 파일에서 데이터를 사용할 수 없습니다.
이 문제를 해결 하려면 일반 텍스트 형식으로 메시지를 다시 보내 달라고 합니다.
서식 있는 텍스트 메시지를 전송 중립 캡슐화 서식 (TNEF로) 캡슐화를 보내지
못하게 하려면 보낸 사람이 다음 메서드를 사용할 수 있습니다.

방법 1: 기본 메시지 형식 변경
        보낸 사람은 다음 단계를 사용 하 여 보내는 전자 메일 메시지의 서식을 변경할 수 있습니다.
        도구 메뉴에서 옵션클릭 한 다음 메일 형식 을 클릭 합니다..
        작성할 메시지 형식에서 일반 텍스트를 선택 하려면 클릭 한 다음 확인 을 클릭 합니다.
참고: 일반 텍스트 형식을 사용 하는 받는 사람이 RTF 형식 및 다른 사람을 사용 하여
      특정 받는 사람에 게 보내려면 보낸 사람이 받는 사람에 대 한 옵션 개인 주소록
      또는 받는 사람의 연락처 레코드에서 설정 해야 합니다.

방법 2: 개인 주소록에서 받는 사람 항목 수정
        보낸 개인 주소록에 있는 받는 사람 특성에서 RTF 형식을 제거 하려면 다음 단계를 사용할 수 있습니다.
        도구 메뉴에서 주소록 을 누릅니다
        주소록에서 개인 주소록을 클릭 합니다.
        일반 텍스트로 설정할 주소를 선택한 다음 파일 메뉴에서 속성 을 클릭 합니다.
        SMTP-일반 탭에서 항상이 받는이 사람이 Microsoft Exchange 서식 있는 텍스트 형식으로
        보내기 확인란의 선택을 취소 합니다 및 다음 확인 을 클릭 합니다.

방법 3: 특정 연락처 형식 변경
        보낸 사람이 받는 사람의 연락처 레코드에서 일반 텍스트 설정 하려면 다음 단계를 사용할 수 있습니다.
        연락처 폴더에서 받는 사람의 레코드를 엽니다.
        받는 사람의 전자 메일 주소를 두 번 클릭 합니다.
        전자 메일 속성 대화 상자에서 인터넷 메일 형식 에서 일반 텍스트만 보내기 를 클릭합니다

방법 4: Outlook 서식 있는 텍스트 형식 인터넷 전자 메일 설정
        Outlook 2003 및 Outlook 2007의 도구 메뉴에서 옵션 을 클릭 합니다.
        메일 형식 탭을 클릭 합니다.
        인터넷 메일 형식 을 클릭 합니다..
        Outlook 서식 있는 텍스트 옵션 HTML 형식으로 변환 또는 일반 텍스트 형식으로 변환 중 하나를 클릭합니다.

안드로이드 4.4 KitKat에서 플래시 사용하기

[출처 : http://www.phonearena.com/ ]


1) Download Dolphin Browser in the Google Play

Warning: You must download the Dolphin Jetpack in the Google Play as well. As far as I have noticed, Dolphin Jetpack better solves the compatibility with flash player, such as crash issue & freeze issue in full screen.

Latest version of Dolphin Browser

Latest version of Dolphin Jetpack

2) Download the hacked flash player HERE

Warning: Make sure that you have uninstall the flash player installed in your device and then install the hacked one for compatibility reason.

If your devices refused to install apk outside Google Play, you may set in your device (Settings> Securities> Unknown resources) to allow installation of apps from unknown sources.

3) Make sure that the flash setting in Dolphin Browser (Click Menu>Settings>Web Content>Flash Player) is on.