Author Topic: Miscellaneous snippets  (Read 3839 times)

jj2007

  • Moderator
  • Member
  • *****
  • Posts: 8422
  • Assembler is fun ;-)
    • MasmBasic
Create a temp web page to save a link
« Reply #45 on: May 14, 2018, 06:37:05 AM »
Sometimes I need to save a webpage but don't want to open it. So I copy the URL and run this proggie (source+exe attached):

include \masm32\MasmBasic\MasmBasic.inc         ; download
  Init
  Let esi=Clip$()               ; get URL from clipboard, e.g. http://masm32.com/board/index.php?action=unread
  .if Instr_(esi, "://")
        FileWrite "SaveLinkAsTemp.html", Cat$(Chr$("<html><head><title>Temporary link</title></head>", 13, 10, "<body>", 60, "a href=", 34)+esi+Chr$(34, 62, "Right-click here and choose 'Save Link as...' to download ")+esi+Chr$(60, "/a", 62, "</body></html>"))
        ShEx "SaveLinkAsTemp.html"      ; launch the browser
  .else
        MsgBox 0, esi, "No URL found:", MB_OK
  .endif
EndOfCode



jj2007

  • Moderator
  • Member
  • *****
  • Posts: 8422
  • Assembler is fun ;-)
    • MasmBasic
Check a file for http:// and friends
« Reply #46 on: May 18, 2018, 11:59:07 AM »
Attached a little file DownloadMasm32.exe that does something entirely harmless:
Code: [Select]
include \masm32\MasmBasic\MasmBasic.inc
  Init
  Let esi="0.75=draob?php.xedni/draob/moc.23msam//:ptth"
  PrintLine esi
  Let edi=FileRead$(Mirror$(esi))
  Inkey NoTag$(edi)
EndOfCode

In addition, the attachment contains a project that finds http:// and https:// in files, even if they are mirrored; just drag a file over SpyWareScanMB.exe 8)

Warning: While SpyWareScanMB.exe finds interesting http:// and https:// matches in exes and dlls, it is not a replacement for an AntiVirus. Malware writers use more sophisticated tricks to hide their URLs.