Jump to content

Foxhound

Active Members
  • Posts

    60
  • Joined

  • Last visited

Profile Information

  • Location
    Dallas
  • Interests
    Scripting, Desinging, etc..

Recent Profile Visitors

349 profile views

Foxhound's Achievements

Wayfarer

Wayfarer (2/7)

1

Reputation

  1. EDIT: Lol...I already found the answer but ignored it. Oh well it's past midnight, can't blame me. They have an API as I said before here: http://www.virustotal.com/advanced.html their api url is: https://www.virustotal.com/api/get_file_report You just supply your API key and the file hash to get a json report of the hash if it's in their database. they even have a python wrapper for it: http://code.google.com/p/virustotalapi/ Hope this helps...I'm going to sleep now
  2. That's why I deleted my question. I didn't read their API enough. Anyway, I was poking around their search page where they allow you to look up viruses based on your hash input. Although it's not part of their official API, you could try sending in POST/GET requests and cleaning the HTML tags to check your hash against their database. I'll keep poking around and see what I can find.
  3. Here's a little snippet to quickly sync your system clock with that of NIST. #cs--------------- Sync Time By Foxhound Public Domain #ce -------------- #RequireAdmin _set_time(_get_time()) Func _get_time() $central = "http://nist.time.gov/timezone.cgi?Central/d/-6" $eastern = "http://nist.time.gov/timezone.cgi?Eastern/d/-5" $data = BinaryToString(InetRead($central)) $regex = "\d{1,2}:\d{1,2}:\d{1,2}" $match = StringRegExp($data, $regex, 3) if not IsArray($match) Then return false Return $match[1] EndFunc ;==>_get_time Func _set_time($time) if NOT $time Then Exit RunWait(@ComSpec & " /c " & 'time ' & $time, "", @SW_HIDE) EndFunc ;==>_set_time EDIT: Uhhh... why is the forum injecting BBCode into my post? Someone should get to work fixing that :S
  4. Although I'm going a bit off topic here this seems like a good place to post it. Has anyone considered the possibility of AU3 going open source if and when AU4 comes out? I was disappointed to learn that AutoIT at one time was indeed open source. Although I wasn't around back then to learn why it went closed source, it's still rather disappointing.
  5. \d{2}:\d{2} works in regex tester but not in AutoIT. I'll keep trying and see what I come up with. EDIT: I'm an idiot >.< Had the wrong flags set on StringRegExp(). \d{1,2}:\d{1,2} will pick out just the time: $str = '<td style="font-size: medium;"><b>22:27</b> Sunday (EDT) - <b>Time</b> in <b>Toronto, ON, Canada</b></td>' $regex = '\d{1,2}:\d{1,2}' $match = StringRegExp($str,$regex,1) if IsArray($match) Then MsgBox(0,"",$match[0]) Else MsgBox(0,"","No match") EndIf
  6. This is a little UDF I wrote to deal with YouTube on another script of mine, QuickYouTubeToMP3. Although it's not complete, I decided to release it independently for others to use and perhaps expand upon. It currently contains five useful functions and another one used internally. _YT_Clean_Fmt_Map() _YT_URLDecode() _YT_Clean_Fmt_Map() _YT_checkFormat() _YT_getVideoIDByURL() _YT_getVideoInformation() Example Script: Go see Quick YouTube To MP3. It uses this UDF. ;-) Download: Latest version off of SVN https://sourceforge.net/p/quickyoutube/svn
  7. Easy there trigger. I believe he was just suggesting that he should the autoit tags since it does indeed make it easier for people read the code. I don't know why you, a mod, of all people would make an issue out of it. Anyway, to get back on topic, it's a neat script. The loop/refresh rate is causing it the CPU to get as high as 14-20% use on my machine. Perhaps 1/2/sec refresh rate should do it.
  8. Windows 7 Professional x86
  9. It worked! But it only to decrease brightness, not increase it. Supported brightness for my laptop says 95, I put 92 for _SetDisplayBrightness() but it decreases the brightness all the way down for some reason
  10. Nice one Wakil, but question: Is there any way you could use the DeviceIoControl to set backlight brightness instead of Gamma? I've gotten started on it but I'm having trouble with creating the handle from CreateFile (first parameter). #include "winapi.au3" ;CreateFile ;$cHandle = DllCall("User32.dll","HANDLE","CreateFile","str", ;IOCTL_VIDEO_SET_DISPLAY_BRIGHTNESS $DISPLAY_BRIGHTNESS = DllStructCreate("uchar 0x00000003;uchar 50;uchar 10") DllCall("User32.dll","int","DeviceIoControl","HANDLE",$cHandle,"dword","IOCTL_VIDEO_SET_DISPLAY_BRIGHTNESS","ptr",DllStructGetPtr($DISPLAY_BRIGHTNESS),"int",500,"int","none","int",0,"int","none","ptr","none") ConsoleWrite(_WinAPI_GetLastError()&@CRLF) I'm not so good with DllCall yet Anyway nice script
  11. XML...namespaces...interesting...I learned something new I believe I'm getting the hang of it. So let's say if I want to pull some data from this same API with this structure. <media:group> <media:description></media:description> </media:group> I would have to append xmlns:media='http://search.yahoo.com/mrss/' or its respective schema to _XMLFileOpen() and use 'a:entry/media:group/media:description' to pull data, am I correct? I think I have a pretty solid idea of what you're talking about now. Thank you for your help.
  12. Okay, so I was working on my YouTube API UDF when I decided to use the to make my life a bit easier. Now , I may not be proficient with XPath but I've tried several times to get some simple data data off of the YouTube GData API but it won't work (returns -1, @error is 0 though) I've tried _INetGetSource(), BinaryToString(InetRead()), InetGet(), and they all seem to return the XML data just fine. I don't want to have to manually parse it using the string functions as there is a lot of data I need to pull. Anyway, here's a test script I made to illustrate my dillema: #include "_XMLDomWrapper.au3" #include "Array.au3" #include "INet.au3" $videoid = 'YgFyi74DVjc' Local $ytAPIURL = 'http://gdata.youtube.com/feeds/api/videos/' & $videoid & '?v=2' InetGet($ytAPIURL,"output.xml") _XMLFileOpen("output.xml") ;returns 1, success $value = _XMLGetValue('/entry/id') ;returns -1, wtf if IsArray($value) Then _ArrayDisplay($value) trace($value) Func trace($data="") ConsoleWrite(@extended&" "&@error&" "&$value&@CRLF) EndFunc And here's a short sample of the XML structure for the YouTube API: <?xml version='1.0' encoding='UTF-8'?> <entry xmlns='http://www.w3.org/2005/Atom' xmlns:app='http://www.w3.org/2007/app' xmlns:media='http://search.yahoo.com/mrss/' xmlns:gd='http://schemas.google.com/g/2005' xmlns:yt='http://gdata.youtube.com/schemas/2007' gd:etag='W/&quot;DE8GSX47eCp7ImA9WhZRFUk.&quot;'> <id>tag:youtube.com,2008:video:YgFyi74DVjc</id> <published>2010-08-13T13:46:28.000Z</published> <updated>2011-04-11T18:33:48.000Z</updated><app:control> <yt:state name='restricted' reasonCode='limitedSyndication'>Syndication of this video was restricted by the content owner.</yt:state> </app:control> <!-- .... ~~~ --> </entry> Can anyone point me in the right direction? I'm about to pull my hair out...
  13. I'm a beginner when it comes to RegEx. Thanks for the suggestion. I have much to learn
  14. New version available! Download TinyURLfier 1.5 via SourceForge SVN or Download here: TinyURLfier 1.5.au3 Changes: __________________ - Total overhaul of the script - New changes to the GUI - Simpler regex pattern - Removed _InetGetSource() and implemented InetRead to get data from TinyURL + Added reverse TinyURL generation (Automatically turn TinyURL into long url & vice versa) + Added preliminary functions to support INI settings
  15. Nonsense. Make another thread and share your UDF with us. I might even incorporate it into my own weather script I wrote months ago.
×
×
  • Create New...