News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

InString

Started by Grincheux, December 24, 2015, 06:43:38 PM

Previous topic - Next topic

hutch--

Philippe,

Sorry to be a party pooper but we must keep titz 'n arse out of the forum as many of our visitors read the forum from work where they have porn filters.

Grincheux

Ok, I removed the link
Kenavo (Bye)
----------------------
Help me if you can, I'm feeling down...

Grincheux

The new version is available here

I removed MasmBasic functions (sorry JJ2007) because it could cover all the cases.
First versions were searching for <img src= but there are cases where theres is an id="cccc" between img and src
Accept format JPG, JPEG, GIF & PNG
*.jpeg files are renamed *.jpg

Supports the following syntaxes:


  • <img + src ="
  • <img + src='
  • <href="
  • <href='
  • url('
  • http:\/\/
  • https:\/\/

The program does not support base64 images introduced by "<img src="data:image/".
It cannot catch the avatars of this forum!!!

Next step : Import an html file from the disk.
Kenavo (Bye)
----------------------
Help me if you can, I'm feeling down...

Siekmanski

Quote from: Grincheux on December 28, 2015, 04:03:24 AM
It cannot catch the avatars of this forum!!!

Yes, you can  :badgrin:

; uses urlmon.lib

.data
URL_1   db "http://masm32.com/board/index.php?action=dlattach;attach=4892;type=avatar",0
NAME_1  db "Grincheux.jpg",0

.code
    invoke  URLDownloadToFile,0,addr URL_1,addr NAME_1,0,0
Creative coders use backward thinking techniques as a strategy.

Grincheux

New version available here
The zip file has been deleted and replaced with a 7Zip SFX file.
Corrected a bug while creating font used in edit control.
Corrected a bug when calling VirtualFree, the memory used to load the file was not released!
Removed unused variables.
Added a flag in CreateFile while creating the file to download. In some cases empty files where created or files were written entirely.
Flush the cash before the downloaded file is closed.
Kenavo (Bye)
----------------------
Help me if you can, I'm feeling down...

TouEnMasm

#20
Here some sample who can interest you
From the internet explorer,copy the url in the clipboard and switch to webimage
Fa is a musical note to play with CL

TouEnMasm


need to know how interpret:
index.php?PHPSESSID=8b66972e915875a2a5ed239bbb76b96b&amp;action=dlattach;attach=407;type=avatar
PHPSESSID is the key
Fa is a musical note to play with CL

Grincheux

WebImage : Le mien ne fait rien de plus.
Kenavo (Bye)
----------------------
Help me if you can, I'm feeling down...

TouEnMasm

I see that Siekmanski just rename the file to save it.
I will try that but which extension give it ?

Fa is a musical note to play with CL

Grincheux

#24
Jut run $CatchWebImages.exe it the uncompress all the files
Inside this file there is CatchWebImages.exe which is the real program.
Kenavo (Bye)
----------------------
Help me if you can, I'm feeling down...

Grincheux

Kenavo (Bye)
----------------------
Help me if you can, I'm feeling down...

TouEnMasm

Quote
Who wrote WebImage?
it's me,I hope i have find a soluce and post it soon.
Fa is a musical note to play with CL

Grincheux

What is the problem?
Kenavo (Bye)
----------------------
Help me if you can, I'm feeling down...

TouEnMasm


the problem is to give a valid file name to:
index.php?PHPSESSID=8b66972e915875a2a5ed239bbb76b96b&amp;action=dlattach;attach=407;type=avatar
and give it the correct extension
Fa is a musical note to play with CL

jj2007

Quote from: ToutEnMasm on December 29, 2015, 05:31:26 AM

the problem is to give a valid file name to:
index.php?PHPSESSID=8b66972e915875a2a5ed239bbb76b96b&amp;action=dlattach;attach=407;type=avatar
and give it the correct extension

No problem :bgrin:

include \masm32\MasmBasic\Res\MbGui.asm
  .if !Exist("Yves.jpg")
      void FileRead$("http://masm32.com/board/index.php?action=dlattach;attach=407;type=avatar")
      Rename "~FrLocal.tmp", "Yves.jpg"
  .endif
Event Paint
  GuiImage hWnd, "Yves.jpg"
  GuiTextBox 99.9-150, 10, 140, 50, "Yves is a prominent member of the Masm32 forum", bcol RgbCol(255, 255, 80)
GuiEnd