daslick Posted April 25, 2007 Share Posted April 25, 2007 (edited) I went to http://www.autoitscript.com/forum/index.ph...4&hl=webcam and saw the WEBCAM viewer... so I worked and made it a PC monitor viewer, so I cannot take full credit... it uses a dll... you must download it to use it. You can download the dll file at this thread!Remember to change line 9 to the location of the downloaded dll file above.expandcollapse popup#include <GUIConstants.au3> #include <Inet.au3> TCPStartup() If @error Then Exit Global $recv, $output $listen = TCPListen(@IPAddress1, 80, 20) If $listen = -1 Then Exit $capturedll = "\vcap.dll" ;change this line to the full path of the capture dll $snapfile = '\screenshot.jpg'; change this While 1 $sock = TCPAccept($listen) $msg = GUIGetMsg() If $sock >= 0 Then $recv = _SockRecv($sock) If StringInStr($recv, "GET") Then $recv = _StringBetween($recv, "GET /", " HTTP/1.1") If $recv <> "" Then $file = FileOpen($snapfile, 0) If $file <> - 1 Then $output = FileRead($file) EndIf FileClose($file) Else DllCall($capturedll, "int:cdecl", "CaptureScreen", "str", $snapfile, "int", 30) $output = '<html><meta http-equiv="refresh" content="2"><center><a href="screenshot.jpg"><img src="screenshot.jpg" alt="screenshot" height="95%"></a><BR>Time=' & @HOUR & ':' & @MIN & ':' & @SEC & '<BR></center></html>' EndIf TCPSend($sock, $output) TCPCloseSocket($sock) EndIf Sleep(100) WEnd Func _SockRecv($iSocket, $iBytes = 10000) Local $sData = '' While $sData = '' $sData = TCPRecv($iSocket, $iBytes) WEnd Return $sData EndFunc Func _StringBetween($string, $begin, $end) Local $_begin, $_end $_begin = StringSplit($string, $begin, 1) If Not @error Then $_end = StringSplit($_begin[2], $end, 1) If Not @error Then Return ($_end[1]) EndIf EndIf EndFuncMake sure you change line 8 to the path of the jpg capture dll. Edited October 16, 2007 by daslick Link to comment Share on other sites More sharing options...
James Posted April 25, 2007 Share Posted April 25, 2007 This doesnt do anything. Nothing at all. No errors, no screenshot, nothing. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
jvanegmond Posted April 25, 2007 Share Posted April 25, 2007 I get a "AutoIt has exited to prevent stack overflow (or something with corrupt)" message. github.com/jvanegmond Link to comment Share on other sites More sharing options...
BillLuvsU Posted April 25, 2007 Share Posted April 25, 2007 Don't work. Test your scripts before you put them up. [center][/center]Working on the next big thing.Currently Playing: Halo 4, League of LegendsXBL GT: iRememberYhslaw Link to comment Share on other sites More sharing options...
Siddhartha Posted April 25, 2007 Share Posted April 25, 2007 aww, thats not very nice, he tried...i think Link to comment Share on other sites More sharing options...
James Posted April 26, 2007 Share Posted April 26, 2007 But did he? If he tried then it would work. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
Gabburd Posted April 26, 2007 Share Posted April 26, 2007 (edited) The Script will work, but it needs quite a bit of tweaking before setting up.If a folder named Drivers does not exist on the user's homedrive than the script will not work, This can be fixed by tweaking line 8 to: $snapfile = @HomeDrive & '\\screenshot.jpg'oÝ÷ Ûùb#بçZ·w$áx9eë-mên¶)íëçbç-¢¼ÙbïlzÛh¶YÚì!ÈH¶§+*ºj]We«¨·ùb"¶=§]ë,Â*.Á©í¶që,¶©j¨+÷Þéí¶§"v·¬³[azw!jxÚ')ÞêÚaz²)×kzË/j[þX¥ò¢æ«y©ky§r®éçxÁæìz»Þ®é¢»|ÒØZ*.Â)e«Þ¶!jx¶½©nzåwºþX¥X§jYr«â«^¶az zÚ/ì"¶)ÚºÚ"¶V§æ zØb³¥·ºÚ"µÍ][ÝÚËÉ][ÝÈ [ÈYÜÌH [È ][ÝÎÉ][Ý Replace @IpAddress1 and the port with your applicable values if neededOnce it's running it great! The hard part is just to get it there. Edited April 26, 2007 by Gabburd Link to comment Share on other sites More sharing options...
daslick Posted April 28, 2007 Author Share Posted April 28, 2007 (edited) Sorry guys... I had it working with my computer... but I changed some stuff so it would work on any computer at the last minute and didn't test it.My fault. Actually I put a lot of work into this, secure. I fixed the original post... you may look at my monitor at my computer! Edited May 1, 2007 by daslick Link to comment Share on other sites More sharing options...
WhOOt Posted April 29, 2007 Share Posted April 29, 2007 Great script! Works great, without too much tweaking. Plain and clean script. WhOOt Link to comment Share on other sites More sharing options...
daslick Posted April 29, 2007 Author Share Posted April 29, 2007 (edited) has any1 taken a look at my computer with it?http://68.113.199.134/index.html Edited May 1, 2007 by daslick Link to comment Share on other sites More sharing options...
foggw Posted April 30, 2007 Share Posted April 30, 2007 has any1 taken a look at my computer with it?http://68.113.199.134/I tried yesterday and again just now.I can tracert and ping that address but http does'nt work. Your router or ISP is probably blocking port 80 traffic.Hey, It works just great on my XP SP2 Pro system. Very handy!ThanksBill Link to comment Share on other sites More sharing options...
daslick Posted April 30, 2007 Author Share Posted April 30, 2007 Meh, I've been working on my server... so it goes up and down... you probably just caught me while I was changing stuff on the server. My isp has not blocked it, I have tested that link from home and school. Link to comment Share on other sites More sharing options...
foggw Posted April 30, 2007 Share Posted April 30, 2007 Meh, I've been working on my server... so it goes up and down... you probably just caught me while I was changing stuff on the server.My isp has not blocked it, I have tested that link from home and school.It's working now, you may want to slow the refresh rate down to 5 or 10 seconds.On a local network the fast refresh works fine.Across the Internet You get to see the page for a moment and then the screen clears and redraws.What's that code you're working on?Bill Link to comment Share on other sites More sharing options...
slipperylobster Posted April 30, 2007 Share Posted April 30, 2007 could anyone tell me what this program does? if i download it and tweak it here and there to make it work...what is it that it will be doing ? will i be viewing ur webcam? Link to comment Share on other sites More sharing options...
daslick Posted April 30, 2007 Author Share Posted April 30, 2007 It takes screenshots of my computer and makes it viewable online (at my ip address)... You can see SORT of what it does by going to the link listed above... the only difference is that the link posted shows the keylogger report from my computer and IE history... (a very modified version of what is posted)... Has any1 tried out the link? Link to comment Share on other sites More sharing options...
smashly Posted April 30, 2007 Share Posted April 30, 2007 Thank You for this simple great script, nice work daslick You can replace the capture.dll file with the the function _ScreenCap_Capture from PaulIA's Auto3Lib. Requires you to be using Beta AutoIt and Auto3Lib for it to work of coarse eg:expandcollapse popup#include <A3LScreenCap.au3> #include <GUIConstants.au3> #include <Inet.au3> TCPStartup() If @error Then Exit Global $recv, $output $listen = TCPListen(@IPAddress1, 80, 20) If $listen = -1 Then Exit $snapfile = @ScriptDir & '\screenshot.jpg' While 1 $sock = TCPAccept($listen) $msg = GUIGetMsg() If $sock >= 0 Then $recv = _SockRecv($sock) If StringInStr($recv, "GET") Then $recv = _StringBetween($recv, "GET /", " HTTP/1.1") If $recv <> "" Then $file = FileOpen($snapfile, 0) If $file <> - 1 Then $output = FileRead($file) EndIf FileClose($file) Else _ScreenCap_Capture(@ScriptDir & "\screenshot.jpg") $output = '<html><meta http-equiv="refresh" content="2"><center><a href="screenshot.jpg"><img src="screenshot.jpg" alt="screenshot" height="95%"></a><BR>Time=' & @HOUR & ':' & @MIN & ':' & @SEC & '<BR></center></html>' EndIf TCPSend($sock, $output) TCPCloseSocket($sock) EndIf Sleep(100) WEnd Func _SockRecv($iSocket, $iBytes = 10000) Local $sData = '' While $sData = '' $sData = TCPRecv($iSocket, $iBytes) WEnd Return $sData EndFunc Func _StringBetween($string, $begin, $end) Local $_begin, $_end $_begin = StringSplit($string, $begin, 1) If Not @error Then $_end = StringSplit($_begin[2], $end, 1) If Not @error Then Return ($_end[1]) EndIf EndIf EndFunc Cheers Link to comment Share on other sites More sharing options...
daslick Posted April 30, 2007 Author Share Posted April 30, 2007 (edited) EDIT: Read downloaded and read some auto3lib code... so I saw it does have jpg compression. I am getting an error when taking screenshots with it though... #include <A3LScreenCap.au3> _ScreenCap_Capture("C:\Drivers\screenshot.jpg",0,0,-1,-1,False) ERRORC:\PROGRA~1\AutoIt3\Include\A3LWinAPI.au3 (1195) : ==> Variable must be of type "Object".: $tCursor.Size = $iCursor $tCursor^ ERROR +>23:49:56 AutoIT3.exe ended.rc:0 Am I doing something wrong? Edited April 30, 2007 by daslick Link to comment Share on other sites More sharing options...
smashly Posted April 30, 2007 Share Posted April 30, 2007 As a guess , your not running the script in Beta AutoIt. Launching the script in scite then Alt + F5 to run the script in beta autoit. Is your Autoit Beta Include folder at C:\PROGRA~1\AutoIt3\Include ? If not then you also need to copy all A3Lxxxxx.au3 files from C:\PROGRA~1\AutoIt3\Include\ To C:\PROGRA~1\AutoIt3\beta\Include\ (or where ever your beta include folder is.) Cheers. Link to comment Share on other sites More sharing options...
James Posted April 30, 2007 Share Posted April 30, 2007 (edited) Hey,I got it working! Its great but one thing is everytime it takes and displays a screenshot the image is placed in the middle and it gets smaller.Now it works I can say you worked hard on it.Thanks,SecureEdit: ok, this is what happens. When the page refreshes the original screenshot is made smaller but it isn't removed. Also your link is not working.Edit2: The problem doesnt occur on FireFox! GET FIREFOX! Edited April 30, 2007 by Secure_ICT Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
BillLuvsU Posted April 30, 2007 Share Posted April 30, 2007 Cool, now make bust out some AJAX or Java or somthing so that it captures clicks and keypresses so that we can have control. THAT would be freaking awesome. [center][/center]Working on the next big thing.Currently Playing: Halo 4, League of LegendsXBL GT: iRememberYhslaw Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now