{"id":1129,"date":"2020-03-24T10:12:17","date_gmt":"2020-03-24T15:12:17","guid":{"rendered":"https:\/\/delphijustin.biz\/?p=1129"},"modified":"2021-10-13T19:46:14","modified_gmt":"2021-10-14T00:46:14","slug":"url-notifier","status":"publish","type":"post","link":"https:\/\/delphijustin.biz\/url-notifier\/","title":{"rendered":"URL Notifier"},"content":{"rendered":"\n<p>This app monitors URLs and Files for changes. It runs from the command prompt, just pass the URLs as the parameters. If its a file use file:\/\/\/ URL. It uses Internet Explorer URLMon library to download the URLs. To see how to use just open urlnotify.exe file. Great for RSS feeds, comments feeds and blogs.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">program urlnotify;\n\n{$APPTYPE CONSOLE}\n{$RESOURCE URLNotifier.res}\nuses\n  SysUtils,\n  windows,\n  urlmon,\n  Classes,mmsystem,\n  shellapi;\nconst Table: Array[0..255] of DWord =\n     ($00000000, $77073096, $EE0E612C, $990951BA,\n      $076DC419, $706AF48F, $E963A535, $9E6495A3,\n      $0EDB8832, $79DCB8A4, $E0D5E91E, $97D2D988,\n      $09B64C2B, $7EB17CBD, $E7B82D07, $90BF1D91,\n      $1DB71064, $6AB020F2, $F3B97148, $84BE41DE,\n      $1ADAD47D, $6DDDE4EB, $F4D4B551, $83D385C7,\n      $136C9856, $646BA8C0, $FD62F97A, $8A65C9EC,\n      $14015C4F, $63066CD9, $FA0F3D63, $8D080DF5,\n      $3B6E20C8, $4C69105E, $D56041E4, $A2677172,\n      $3C03E4D1, $4B04D447, $D20D85FD, $A50AB56B,\n      $35B5A8FA, $42B2986C, $DBBBC9D6, $ACBCF940,\n      $32D86CE3, $45DF5C75, $DCD60DCF, $ABD13D59,\n      $26D930AC, $51DE003A, $C8D75180, $BFD06116,\n      $21B4F4B5, $56B3C423, $CFBA9599, $B8BDA50F,\n      $2802B89E, $5F058808, $C60CD9B2, $B10BE924,\n      $2F6F7C87, $58684C11, $C1611DAB, $B6662D3D,\n      $76DC4190, $01DB7106, $98D220BC, $EFD5102A,\n      $71B18589, $06B6B51F, $9FBFE4A5, $E8B8D433,\n      $7807C9A2, $0F00F934, $9609A88E, $E10E9818,\n      $7F6A0DBB, $086D3D2D, $91646C97, $E6635C01,\n      $6B6B51F4, $1C6C6162, $856530D8, $F262004E,\n      $6C0695ED, $1B01A57B, $8208F4C1, $F50FC457,\n      $65B0D9C6, $12B7E950, $8BBEB8EA, $FCB9887C,\n      $62DD1DDF, $15DA2D49, $8CD37CF3, $FBD44C65,\n      $4DB26158, $3AB551CE, $A3BC0074, $D4BB30E2,\n      $4ADFA541, $3DD895D7, $A4D1C46D, $D3D6F4FB,\n      $4369E96A, $346ED9FC, $AD678846, $DA60B8D0,\n      $44042D73, $33031DE5, $AA0A4C5F, $DD0D7CC9,\n      $5005713C, $270241AA, $BE0B1010, $C90C2086,\n      $5768B525, $206F85B3, $B966D409, $CE61E49F,\n      $5EDEF90E, $29D9C998, $B0D09822, $C7D7A8B4,\n      $59B33D17, $2EB40D81, $B7BD5C3B, $C0BA6CAD,\n      $EDB88320, $9ABFB3B6, $03B6E20C, $74B1D29A,\n      $EAD54739, $9DD277AF, $04DB2615, $73DC1683,\n      $E3630B12, $94643B84, $0D6D6A3E, $7A6A5AA8,\n      $E40ECF0B, $9309FF9D, $0A00AE27, $7D079EB1,\n      $F00F9344, $8708A3D2, $1E01F268, $6906C2FE,\n      $F762575D, $806567CB, $196C3671, $6E6B06E7,\n      $FED41B76, $89D32BE0, $10DA7A5A, $67DD4ACC,\n      $F9B9DF6F, $8EBEEFF9, $17B7BE43, $60B08ED5,\n      $D6D6A3E8, $A1D1937E, $38D8C2C4, $4FDFF252,\n      $D1BB67F1, $A6BC5767, $3FB506DD, $48B2364B,\n      $D80D2BDA, $AF0A1B4C, $36034AF6, $41047A60,\n      $DF60EFC3, $A867DF55, $316E8EEF, $4669BE79,\n      $CB61B38C, $BC66831A, $256FD2A0, $5268E236,\n      $CC0C7795, $BB0B4703, $220216B9, $5505262F,\n      $C5BA3BBE, $B2BD0B28, $2BB45A92, $5CB36A04,\n      $C2D7FFA7, $B5D0CF31, $2CD99E8B, $5BDEAE1D,\n      $9B64C2B0, $EC63F226, $756AA39C, $026D930A,\n      $9C0906A9, $EB0E363F, $72076785, $05005713,\n      $95BF4A82, $E2B87A14, $7BB12BAE, $0CB61B38,\n      $92D28E9B, $E5D5BE0D, $7CDCEFB7, $0BDBDF21,\n      $86D3D2D4, $F1D4E242, $68DDB3F8, $1FDA836E,\n      $81BE16CD, $F6B9265B, $6FB077E1, $18B74777,\n      $88085AE6, $FF0F6A70, $66063BCA, $11010B5C,\n      $8F659EFF, $F862AE69, $616BFFD3, $166CCF45,\n      $A00AE278, $D70DD2EE, $4E048354, $3903B3C2,\n      $A7672661, $D06016F7, $4969474D, $3E6E77DB,\n      $AED16A4A, $D9D65ADC, $40DF0B66, $37D83BF0,\n      $A9BCAE53, $DEBB9EC5, $47B2CF7F, $30B5FFE9,\n      $BDBDF21C, $CABAC28A, $53B39330, $24B4A3A6,\n      $BAD03605, $CDD70693, $54DE5729, $23D967BF,\n      $B3667A2E, $C4614AB8, $5D681B02, $2A6F2B94,\n      $B40BBE37, $C30C8EA1, $5A05DF1B, $2D02EF8D);\nLOG_FAILED_REQUEST=2;\nLOG_CHANGED_FOUND=1;\nLOG_STARTUP=3;\nLOG_REGFAILED=4;\nSOUND_MODE_OFF=0;\nSOUND_MODE_PLAY_ONCE=1;\nSOUND_MODE_BEEP=2;\nvar CurrentFN,ELComputer:array[0..max_path]of char;\nI:integer;\nherr:hresult;\nseerr:hinst;\nhel:thandle;\nhkel,hkApp,CheckSumKey:hkey;\nsoundmode,eltypes,currentcrc,newcrc,rs,sleeptime:dword;\nmbText:array[0..1024]of char;\nfunction WriteEvent(id,wtype,rawsize:dword;Strs:array of PChar;raw:pointer):boolean;\nbegin\nhel:=registereventsource(elcomputer,'URLNotifier');\nif length(strs)>0then result:=reportevent(hel,wtype,0,id,nil,length(strs),rawsize,\n@strs[0],raw)else result:=reportevent(hel,wtype,0,id,nil,0,rawsize,nil,raw);\nderegistereventsource(hel);\nend;\nprocedure CalcCRC32(const FileName: String; var CRC32: dword);\nvar F: file;\n    BytesRead: dword;\n    Buffer: Array[1..65521] of byte;\n    i: Word;\nbegin\n    FileMode := 0;\n    CRC32 := $ffffffff;\n    {$I-}\n    AssignFile(F, FileName);\n    Reset(F, 1);\n    if IOResult = 0 then\n    begin\n      repeat\n        BlockRead(F, Buffer, SizeOf(Buffer), BytesRead);\n        for i := 1 to BytesRead do CRC32 := (CRC32 shr 8) xor Table[Buffer[i] xor\n        (CRC32 and $000000FF)];\n      until BytesRead = 0;\n    end;\n    CloseFile(F);\n    {$I+}\n    CRC32 := not CRC32;\nend;\n\nfunction getURLSize:string;\nvar h:thandle;\nbegin\nh:=createfile(currentfn,generic_read,file_share_read or file_share_write or\nfile_share_delete,nil,open_existing,file_attribute_normal,0);\nresult:=formatfloat('0,',getfilesize(h,nil))+' Bytes';\nclosehandle(h);\nend;\n\nfunction finishMonitoring(ctrltype:dword):Boolean;\nbegin\nregclosekey(hkapp);\nregclosekey(checksumkey);\nderegistereventsource(hel);\nwriteln(datetimetostr(now),' - Monitoring aborted');\nExitprocess(0);\nend;\n\nbegin\nif paramcount=0then begin\nwriteln('Usage: ',extractfilename(paramstr(0)),' URL1 URL2 etc...');\nwriteln(\n'To enable\/disable beeping type ',extractfilename(paramstr(0)),' \/BEEP [\/OFF] [freq] [duration]');\nwriteln(\n'To enable\/disable sound type ',extractfilename(paramstr(0)),' \/SOUND [\/OFF]');\nwriteln;writeln('App icon by Icons8');\nwrite('Press enter to quit...');readln;exitprocess(0);\nend;\nwriteln('URL Notifier v1.0');\nif stricomp(pchar(paramstr(1)),'\/DELETE')=0then begin\nif regdeletekey(hkey_current_user,'Software\\Justin\\URL Notifier\\Checksums')&lt;>\nerror_success then writeln('Deletion failed.');exitprocess(0);\nend;\nregcreatekey(hkey_current_user,'Software\\Justin\\URLNotifier',hkapp);\nzeromemory(@currentfn,sizeof(currentfn));\nif regcreatekey(HKEY_LOCAL_MACHINE,\n'SYSTEM\\CurrentControlSet\\Services\\EventLog\\Application\\URLNotifier',hkel)=\nerror_success then begin\neltypes:=EVENTLOG_AUDIT_FAILURE or EVENTLOG_AUDIT_SUCCESS or\nEVENTLOG_WARNING_TYPE or eventlog_information_type;\nregsetvalueex(hkel,'TypesSupported',0,reg_dword,@eltypes,4);regsetvalueex(hkel,\n'EventMessageFile',0,reg_sz,pchar(paramstr(0)),(1+length(paramstr(0))*\nsizeof(char)));regclosekey(hkel);rs:=sizeof(elcomputer);strcopy(elcomputer,\n'\\\\127.0.0.1');regqueryvalueex(hkapp,'EventLogComputer',nil,nil,@elcomputer,@rs);\nwriteevent(log_startup,eventlog_information_type,0,[],nil);\nend else writeln('Notice: Could not register eventlog, please run as admin first');\nif stricomp('\/BEEP',pchar(paramstr(1)))=0then begin if stricomp(pchar(paramstr(2)),\n'\/OFF')=0then soundmode :=0 else soundmode:=makelong(makeword(sound_mode_beep,\nstrtointdef(paramstr(3),5)),strtointdef(paramstr(2),1000));writeln(Syserrormessage(\nregsetvalueex(hkapp,'SoundMode',0,reg_dword,@soundmode,4)));regclosekey(hkapp);\nexitprocess(0);\nend;\nif stricomp('\/SOUND',pchar(paramstr(1)))=0then begin if stricomp(pchar(paramstr(2)),\n'\/OFF')=0then soundmode :=0 else soundmode:=SOUND_MODE_PLAY_ONCE;\nwriteln(Syserrormessage(regsetvalueex(hkapp,'SoundMode',0,reg_dword,@soundmode,4)));\nregclosekey(hkapp);\nexitprocess(0);\nend;\nwriteln(datetimetostr(now),' - Started, Monitoring ',paramcount,' URL(s)');\nregcreatekey(hkapp,'CheckSums',checksumkey);\nSetConsoleCtrlHandler(@finishmonitoring,true);\nwhile true do\nbegin\nrs:=4;soundmode:=SOUND_MODE_OFF;Regqueryvalueex(hkapp,'SoundMode',nil,nil,\n@soundmode,@rs);rs:=4;sleeptime:=6;regqueryvalueeX(hkapp,'SleepTime',nil,nil,\n@sleeptime,@rs);\nfor i:=1to paramcount do begin rs:=4;currentcrc:=0;regqueryvalueex(checksumkey,\npchar(paramstr(i)),nil,nil,@currentcrc,@rs);herr:=urldownloadtocachefile(nil,\nPChar(paramstr(i)),currentfn,max_path,0,nil);if herr=s_ok then begin\ncalccrc32(currentfn,newcrc);if(newcrc&lt;>currentcrc)and(currentcrc>0)and(newcrc>0)\nthen begin case lobyte(loword(soundmode))of\nsound_mode_beep:beep(hiword(soundmode),hibyte(loword(soundmode))*1000);\nsound_mode_play_once:playsound('OnChange.wav',0,snd_filename or snd_async);\nend; writeevent(log_changed_found,eventlog_audit_success,0,[pchar(paramstr(i))],\nnil);writeln(datetimetostr(now),' - Changed: ',paramstr(1),#32,geturlsize,\n' CRC32:',inttohex(newcrc,8));case messagebox(0,strlfmt(mbtext,1024,\n'The file at the following URL has changed:'#13#10'%s'#13#10'View the file?',[\nparamstr(1)]),'URL Notifier',mb_iconinformation or mb_yesno)of\nidyes:begin seerr:=shellexecute(0,nil,pchar(paramstr(i)),nil,nil,sw_show);if\nseerr&lt;33then writeln(datetimetostr(now),' - LaunchError:',syserrormessage(seerr));\nend;\nidno:asm nop end;\nend;end;end else begin writeln(datetimetostr(now),' - Error(',herr,'): ',\nparamstr(i));writeevent(log_failed_request,EVENTLOG_AUDIT_FAILURE,sizeof(herr),[\npchar(paramstr(i))],@herr);\nend;\nif regsetvalueex(checksumkey,pchar(paramstr(i)),0,reg_dword,@newcrc,4)&lt;>\nerror_success then writeevent(log_regfailed,eventlog_warning_type,0,[],nil);\nend;\nsleep(sleeptime*10000);\nend;\n<\/pre>\n\n\n\n<input type=\"hidden\" name=\"_fmakey\" id=\"fmakey\" value=\"103e4fd117\"><div id=\"file_manager_advanced\"><\/div>\r\n<p><center>All programs are virus free. Some antivirus software might say its \"suspicious\" or a \"Potentionaly Unwanted Program\". Some of them rate them on what there code looks like no matter if theres a definition in the virus database. If any of them are detected any Antivirus I will zip the software with the password \"justin\" j is lowercase<\/center><br><iframe src=\"\/wp-content\/downloads\/gethashes.php?app=urlnotify\" height=\"255px\" width=\"100%\">\r\n\t<form action=\"\/wp-content\/downloads\/gethashes.php\" method=\"get\" target=\"apphashes\">\r\n\t\t<input type=\"hidden\" name=\"app\" value=\"urlnotify\">\r\n\t\t<input type=\"submit\" value=\"Get File Hashes\">\r\n\t<\/form>\r\n\t\t<\/iframe><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This app monitors URLs and Files for changes. It runs from the command prompt, just pass the URLs as the parameters. If its a file use file:\/\/\/ URL. It uses Internet Explorer URLMon library to download the URLs. To see how to use just open urlnotify.exe file. Great for RSS feeds, comments feeds and blogs.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"beyondwords_generate_audio":"","beyondwords_project_id":"","beyondwords_content_id":"","beyondwords_preview_token":"","beyondwords_player_style":"","beyondwords_language_id":"","beyondwords_title_voice_id":"","beyondwords_body_voice_id":"","beyondwords_summary_voice_id":"","beyondwords_error_message":"","beyondwords_disabled":"","beyondwords_delete_content":"","beyondwords_podcast_id":"","beyondwords_hash":"","publish_post_to_speechkit":"","speechkit_hash":"","speechkit_generate_audio":"","speechkit_project_id":"","speechkit_podcast_id":"","speechkit_error_message":"","speechkit_disabled":"","speechkit_access_key":"","speechkit_error":"","speechkit_info":"","speechkit_response":"","speechkit_retries":"","speechkit_status":"","speechkit_updated_at":"","_speechkit_link":"","_speechkit_text":""},"categories":[4],"tags":[208,207,206,204,205],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/delphijustin.biz\/wp-json\/wp\/v2\/posts\/1129"}],"collection":[{"href":"https:\/\/delphijustin.biz\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/delphijustin.biz\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/delphijustin.biz\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/delphijustin.biz\/wp-json\/wp\/v2\/comments?post=1129"}],"version-history":[{"count":5,"href":"https:\/\/delphijustin.biz\/wp-json\/wp\/v2\/posts\/1129\/revisions"}],"predecessor-version":[{"id":3997,"href":"https:\/\/delphijustin.biz\/wp-json\/wp\/v2\/posts\/1129\/revisions\/3997"}],"wp:attachment":[{"href":"https:\/\/delphijustin.biz\/wp-json\/wp\/v2\/media?parent=1129"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/delphijustin.biz\/wp-json\/wp\/v2\/categories?post=1129"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/delphijustin.biz\/wp-json\/wp\/v2\/tags?post=1129"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}