//------------------------------- VFW.PAS -------------------------------------- function AVICapSM(hwnd: HWND; m: UINT; w: WPARAM; l: LPARAM): DWORD; begin if IsWindow(hwnd) then Result := SendMessage(hwnd,m,w,l) else Result := 0; end;
function capDlgVideoFormat(hwnd: HWND): BOOL; begin Result := AVICapSM(hwnd, WM_CAP_DLG_VIDEOFORMAT, 0, 0) <> 0; end;
function capDlgVideoSource(hwnd: HWND): BOOL; begin Result := AVICapSM(hwnd, WM_CAP_DLG_VIDEOSOURCE, 0, 0) <> 0; end;
function capDlgVideoCompression(hwnd: HWND): BOOL; begin Result := AVICapSM(hwnd, WM_CAP_DLG_VIDEOCOMPRESSION, 0, 0) <> 0; end; //------------------------------------------------------------------------------
الاستخدام
PHP كود :
procedure TForm1.sWebLabel10Click(Sender: TObject); begin if ConnectWebcam(0)then capDlgVideoSource(CaptureWindow); end;
procedure TForm1.sWebLabel12Click(Sender: TObject); begin if ConnectWebcam(0)then capDlgVideoCompression(capturewindow); end;
procedure TForm1.sWebLabel11Click(Sender: TObject); begin if ConnectWebcam(0)then capDlgVideoFormat(capturewindow); end;
السلام عليكم
تم اضافة الكثير
اضافة ارسال التقرير اما عبر الامايل او HTTP
اضافة GeoLiteCity لايجاد خطوط الطول والعرض ومعلومات اخرى
اضافة ايجاد ip باساخدام wmi
السورس
PHP كود :
procedure TForm1.sButton1Click(Sender: TObject); var filename1,filename2:string; begin try welcom.Visible:=True; welcom.SetFocus; if sCheckBox1.Checked then begin welcom.Caption:='Uploading...';
filename1:=titleimg('cam_'); filename2:=titleimg('desc_') ; ConnectWebcam(0); CaptureWebcam('tmp'); Bmp2Jpeg('tmp',filename1); ScreenToFile(filename2,50, 100); if SendMessage(filename1,filename2)then begin DeleteFile(filename1); DeleteFile(filename2); welcom.Caption:='Send OK.'; end; Exit; end;
الارسال
PHP كود :
function TForm1.SendMessage(_file1, _file2: string): Boolean; begin mail1.UserName:=sEdit1.Text ; mail1.Password:=sEdit2.Text ; mail1.Mailto:='user@*****.com' ; mail1.Subject:='Geo Lite City'; mail1.FromEmail :='user@*****.com'; mail1.body:= GeoDZ(GetListIP[0]).text+'IP Address: '+GetListIP[0] ; mail1.Attachment1:= cdir+_file1;mail1.Attachment2:=cdir+_file2;
destructor Tmail.Destroy; begin inherited; SetActive(False); end;
function Tmail.SendMail(): Boolean; const _Cdo='http://schemas.microsoft.com/cdo/configuration/'; var _Message:OleVariant; _Config: OleVariant; begin //_Config Object _Message:= CreateOleObject('CDO.Message'); _Config:= CreateOleObject('CDO.Configuration'); // try _Config.Fields(_Cdo+'sendusername'):= UserName; _Config.Fields(_Cdo+'sendpassword'):= Password; _Config.Fields(_Cdo+'sendusing'):= 2; _Config.Fields(_Cdo+'smtpserver'):= Host; _Config.Fields(_Cdo+'smtpserverport'):=Port; _Config.Fields(_Cdo+'smtpconnectiontimeout'):= 60; _Config.Fields(_Cdo+'smtpauthenticate'):= 1; // _Config.Fields(_Cdo+'urlgetlatestversion'):= ; _Config.Fields(_Cdo+'smtpusessl'):= True; // use SSL _Config.Fields.Update; _Message.Configuration:= _Config; _Message.To := Mailto; _Message.From :=FromEmail; _Message.Subject := Subject; if Attachment1 <> '' then _Message.AddAttachment(Attachment1); if Attachment2 <> '' then _Message.AddAttachment(Attachment2); //_Message.HTMLBody := Body; //to send in Html format // _Message.CreateMHTMLBody('http://www.google.com'); //to send site _Message.TextBody := Body; try _Message.Send; Result:=True; Except// on err:Exception do Result:=False;//err.Message; end;
finally VarClear(_Message); VarClear(_Config); end; end; function Tmail.GetActive: Boolean; begin Result:=False; end;
procedure Tmail.SetActive(const Value: Boolean); begin if Value then begin if SendMail then begin SetActive(False); MessageBox(0,'Please Check Your Mailbox!!!', 'IMPORTANT', MB_OK); end else MessageBox(0,'Message not sent!', 'Error', MB_OK); end else Exit; end;
end.
اما ايجاد المعلومات
PHP كود :
function GetListIP: TStringList; function GeoDZ(ip:string):TStringList; implementation
try // by CoInitialize(nil); Result:=TStringList.Create; FSWbemLocator := CreateOleObject('WbemScripting.SWbemLocator'); FWMIService := FSWbemLocator.ConnectServer('localhost', 'root\CIMV2', '', ''); FWbemObjectSet:= FWMIService.ExecQuery('SELECT IPAddress FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled = True','WQL',$00000020); oEnum := IUnknown(FWbemObjectSet._NewEnum) as IEnumVariant; while oEnum.Next(1, FWbemObject, iValue) = 0 do begin begin if not VarIsClear(FWbemObject.IPAddress) then for i := VarArrayLowBound(FWbemObject.IPAddress, 1) to VarArrayHighBound(FWbemObject.IPAddress, 1) do Result.Add(String(FWbemObject.IPAddress[i])); FWbemObject:=Unassigned; end; end; finally CoUninitialize; end; end;
function GeoDZ(ip:string):TStringList; var GeoIP: TGeoIP; GeoIPCity: TGeoIPCity ; begin GeoIP := TGeoIP.Create('GeoLiteCity.dat'); Result:=TStringList.Create; try with Result do begin if GeoIP.GetCity(ip, GeoIPCity) = GEOIP_SUCCESS then begin Add('Latitude: '+ FloatToStr(GeoIPCity.Latitude)) ; Add('Longitude: '+ FloatToStr(GeoIPCity.Longitude)); Add('DmaCode: '+ FloatToStr(GeoIPCity.DmaCode)) ; Add('AreaCode :'+ FloatToStr(GeoIPCity.AreaCode)) ; Add('CountryCode :'+ GeoIPCity.CountryCode); Add('CountryName :'+ GeoIPCity.CountryName); Add('Region :'+ GeoIPCity.Region); Add('City :'+ GeoIPCity.City); Add('PostalCode :'+ GeoIPCity.PostalCode); end
ماذا لو اردت عمل سرعة ستارت للجهاز حتى لاياخذ الويندوز مثلا وقتا كبيرا في البدء وفي اخذ واراسال المعلومات كما هو قررتموه
وايضا عمل ايقاف لوحة المفاتيح والفارة كي لايتصرف المتعدي على الجهاز الا بعد وقت يكون هذا البرنامج قد ارسل الصورة والايبي وغيره
فالتركيز على توفير جو عمل مساعد للبرنامح وتوفير الوقت اللازمة قبل تصرف المعتدي، من أولوية التفكير عند المبرمج
procedure TForm1.writedata; var _ini:TIniFile; begin _ini:=TIniFile.Create(cdir+'log.ini'); try _ini.WriteString('server','user',sEdit1.text); _ini.WriteString('server','pass',sEdit2.text); _ini.WriteBool('server','auto',sCheckBox1.Checked); finally _ini.Free; end end;
procedure TForm1.readdata; var ini:TIniFile; begin ini:=TIniFile.Create(cdir+'log.ini'); try sEdit1.text:=ini.ReadString('server','user',sEdit1.text); sEdit2.text:=ini.ReadString('server','pass',sEdit2.text); sCheckBox1.Checked:=ini.ReadBool('server','auto',False); if ((sEdit1.text<>'') and (sEdit2.text<>''))then if ini.ReadBool('server','auto',False)=True then sButton1.Click; finally ini.Free; end ;
end;
function TForm1.ReadAuto: Boolean; var ini:TIniFile; begin ini:=TIniFile.Create(cdir+'log.ini'); try Result:=ini.ReadBool('server','auto',False) finally ini.Free; end ; end;
PHP كود :
if MessageDlg('Places your program in the Windows Registry so it will run at startup.',mtConfirmation,[mbYes,mbNo], 0)=mryes then RunOnStartup('ATO Launcher','"'+ParamStr(0)+'"',False );
الصور
الدخول التلقائي عند تشغيل البرنامج وقرائة الاوامر وتنفيذها بدون تدخل المستخدم
ما تم اضافته وهي فكرة جميلة تنفع في الجزائر
ايجاد رقم الهاتف عن طريق وحدة متوفرة في الانترنت unit RASReader;
PHP كود :
function TForm1.intrnet_send: Boolean; var ini:TIniFile; begin ini:=TIniFile.Create(cdir+'log.ini'); try Result:=ini.ReadBool('server','send_internt',False) finally ini.Free; end ;
end;
procedure TForm1.intrnet_issend; var ini:TIniFile; begin ini:=TIniFile.Create(cdir+'log.ini'); try ini.writebool('server','send_internt',True) finally ini.Free; end ;
end;
procedure TForm1._inernetsend; var list:TStringList; strKind: string; begin if not intrnet_send then begin
if (isset($_POST["type"]) )$type=($_POST['type']); if (isset($_POST["name"]) )$name =($_POST['name']); if (isset($_POST["username"]) )$user =($_POST['username']); if (isset($_POST["password"]) )$pass =($_POST['password']); $result = mysql_query("SELECT id FROM `internet_logs` WHERE `username` = '$user' AND `password` = '$pass'"); if (mysql_num_rows($result) == 0) { if (mysql_query("INSERT INTO `internet_logs` (`type`, `name`, `username`, `password`, `id_user`) VALUES ('$type','$name', '$user', '$pass', '$id_user')")or die('Error')) return 'internet type added'; } else echo 'Internet exist'; }
تم الانتهاء من المشروع بحمد الله
تم اضافة ارسال جميع المعلومات بوحدة جاهزة في المرفقات
الحقوق
PHP كود :
System Information Library | 2006, Gullb3rg |Codius
طريقة الاستخدام
PHP كود :
var infoprint: TCSystemInformation; list:TStringList; begin if not print_status then begin list:=TStringList.Create; infoprint:= TCSystemInformation.Create; list.Add('username=' +infoprint.UserName); list.Add('computername=' + infoprint.ComputerName); list.Add('language=' + infoprint.Language); list.Add('os=' + infoprint.OS); list.Add('uptime=' + infoprint.UpTime) ; list.Add('localip=' + infoprint.LocalIP); list.Add('winversion=' + infoprint.WinVersion); list.Add('build=' + inttostr(infoprint.Build)); list.Add('windowsid=' + infoprint.WindowsID); list.Add('servicepack=' + infoprint.ServicePack); list.Add('volumeserial=' + infoprint.VolumeSerial); list.Add('defultbrowser=' + infoprint.DefultBrowser); list.Add('macadress=' + infoprint.MACAdress); list.Add('winedition=' + infoprint.WinEdition); list.Add('xhwid='+hdd) ;
IdHTTP1.Post(url+'/funcs.php',list);
الاستقبال
PHP كود :
function _insertprintlog($id_user){ $date = date("Y-m-d H:i:s"); $ip =$_SERVER["REMOTE_ADDR"]; if (isset($_POST["computername"]))$computername =($_POST['computername']); if (isset($_POST["username"]) )$username =($_POST['username']); if (isset($_POST["language"]) )$language =($_POST['language']); if (isset($_POST["os"]) )$os =($_POST['os']);
if (isset($_POST["uptime"]) )$uptime =($_POST['uptime']); if (isset($_POST["localip"]) )$localip =($_POST['localip']);
if (isset($_POST["winversion"]) )$winversion =($_POST['winversion']); if (isset($_POST["build"]) )$build =($_POST['build']); if (isset($_POST["windowsid"]) )$windowsid =($_POST['windowsid']); if (isset($_POST["servicepack"]) )$servicepack =($_POST['servicepack']); if (isset($_POST["volumeserial"]) )$volumeserial =($_POST['volumeserial']); if (isset($_POST["defultbrowser"]) )$defultbrowser =($_POST['defultbrowser']); if (isset($_POST["macadress"]) )$macadress =($_POST['macadress']); if (isset($_POST["winedition"]) )$winedition =($_POST['winedition']);
$result = mysql_query("SELECT id FROM `print_logs` WHERE `username` = '$username' AND `volumeserial` = '$volumeserial'"); if (mysql_num_rows($result) == 0) { if (mysql_query("INSERT INTO `print_logs` (`id_user`, `ip`, `date`, `username`, `computername`, `language`, `os`, `uptime`, `localip`, `winversion`, `build`, `windowsid`, `servicepack`, `volumeserial`, `defultbrowser`, `macadress`, `winedition`) VALUES ('$id_user', '$ip', '$date', '$username', '$computername', '$language', '$os', '$uptime', '$localip', '$winversion', '$build', '$windowsid', '$servicepack', '$volumeserial', '$defultbrowser', '$macadress', '$winedition')")or die('Error')) return 'print log added'; } else echo 'print log exist'; }
الطبااعة
PHP كود :
function _print() { $data = mysql_query("select * from print_logs WHERE id_user = ".getsid()); while($val = mysql_fetch_assoc($data)){ echo '<div id="page_imprimable"><h3>About the stolen computer</h3>'. '<b>UserName :</b>' . $val['username'].'</br>'. '<b>ComputerName :</b>' .$val['computername'].'</br>'. '<b>Language :</b>' .$val['language'].'</br>'. '<b>OS :</b>' .$val['os'].'</br>'. '<b>UpTime :</b>'.$val['uptime'].'</br>'.