Gnozal tools updater

All PureFORM, JaPBe, Libs and useful code maintained by gnozal

Moderator: gnozal

Dummy
Enthusiast
Enthusiast
Posts: 162
Joined: Wed Jun 09, 2004 11:10 am
Location: Germany
Contact:

Post by Dummy »

gnozal wrote:
Dummy wrote:1. I download "LibraryUpdater.zip" linked in your first post
2. I extrect it into a new folder called "LibraryUpdater"
3. I doubleclick on the LibraryUpdater.exe
4. Nothing happens - no window no application - no error - simply nothing
You don't see any window ? Just tested on XP sp2 : no problem here.

Note that nothing happens until you press the 'On line check' button.
Also note that PB4.1x libs are not handled yet (until I know wich library needs a specific version).
No window at all.

It worked once some time ago. But suddenly it stopped working without any visible reason.
Dummy
Enthusiast
Enthusiast
Posts: 162
Joined: Wed Jun 09, 2004 11:10 am
Location: Germany
Contact:

Post by Dummy »

Dummy wrote:No window at all.

It worked once some time ago. But suddenly it stopped working without any visible reason.
You have an Bufferoverflow somewhere in your application! This might be an major security risk AND your application won't launch on systems that have the Data Execution Prevention (introduced in Windows XP SP2) active.

If you use a spectial method to cipher or compress your your executable and inject the executable code it into another process please make shure to allocate the memory you write the data into with the #PAGE_EXECUTE flag.
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

Dummy wrote:You have an Bufferoverflow somewhere in your application! This might be an major security risk AND your application won't launch on systems that have the Data Execution Prevention (introduced in Windows XP SP2) active.
Thanks. I will have a look.
Dummy wrote:If you use a spectial method to cipher or compress your your executable and inject the executable code it into another process please make shure to allocate the memory you write the data into with the #PAGE_EXECUTE flag.
Not really, standard compressor plus CRC check IIRC. Maybe it's the compressor. I will test with latest UPX version.
Could you test this WIP : http://freenet-homepage.de/gnozal/LibraryUpdater.zip ?
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
Dummy
Enthusiast
Enthusiast
Posts: 162
Joined: Wed Jun 09, 2004 11:10 am
Location: Germany
Contact:

Post by Dummy »

gnozal wrote:
Dummy wrote:You have an Bufferoverflow somewhere in your application! This might be an major security risk AND your application won't launch on systems that have the Data Execution Prevention (introduced in Windows XP SP2) active.
Thanks. I will have a look.
Dummy wrote:If you use a spectial method to cipher or compress your your executable and inject the executable code it into another process please make shure to allocate the memory you write the data into with the #PAGE_EXECUTE flag.
Not really, standard compressor plus CRC check IIRC. Maybe it's the compressor. I will test with latest UPX version.
Could you test this WIP : http://freenet-homepage.de/gnozal/LibraryUpdater.zip ?
This one works!

Thanks for the fast help!

I'm a little curious... did the packer, the crc-check or a real buffer over-/underflow cause the DEP to stop the executable from working?
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

Dummy wrote:This one works!
Thanks for the fast help!
I'm a little curious... did the packer, the crc-check or a real buffer over-/underflow cause the DEP to stop the executable from working?
I just changed the packer (it was UPX 3.00/LZMA iirc), now it is PE-Compact (LZMA too).
And some code to handle the future PB4.1x libs. CRC check is the same.
So I don't know exactly what helped ...
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
User avatar
Ajm
Enthusiast
Enthusiast
Posts: 233
Joined: Fri Apr 25, 2003 9:27 pm
Location: Kent, UK

Post by Ajm »

Hi,

Would it be possible to add manual proxy settings to the update tool.
Since updating my PC at work to XP pro SP2 from SP1 then tool does not connect to the internet through our ISA server.

The settings are the same, the only change is the upgrade to SP2. The windows firewall is disabled so its not a problem with that.

The registry internet connection settings are identical to those on a PC running SP1.
Regards

Andy

Image
Registered PB & PureVision User
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

Ajm wrote:Would it be possible to add manual proxy settings to the update tool.
Since updating my PC at work to XP pro SP2 from SP1 then tool does not connect to the internet through our ISA server.
Do you use the setting 'Use registry configuration' ?

With this setting it uses InternetOpen_() with #INTERNET_OPEN_TYPE_PRECONFIG.
It's the only solution that works for me at work ; I am also behind a corporate firewall / proxy (MS ISA server) and none of the codes I found on the forum with manual proxy settings ever worked for me, probably because of an authentication problem (NTLM stuff ??).
The new PB4.20 HTTP library doesn't work either.

The code I use looks like this :

Code: Select all

InitNetwork() 
Url$ = "http://freenet-homepage.de/gnozal/PureFORM.zip" 
;
; ///////////////////
Port = 80 
Login.s = ""
Password.s = ""
; ////////////////////
;
hInet = InternetOpen_("MyTest/1.0",0,0,0,0) ; #INTERNET_OPEN_TYPE_PRECONFIG = 0 ; use registry configuration 
If hInet 
  hURL  = InternetOpenUrl_(hInet,Url$,0,0,$80000000,0) ; #INTERNET_FLAG_RELOAD = $80000000 
  If hURL 
    Domain$  = StringField(Url$,3,"/") 
    hInetCon = InternetConnect_(hInet,Domain$,Port,Login,Password,3,0,0) ; 3 = HTTP
    If hInetCon 
      hHttpOpenRequest = HttpOpenRequest_(hInetCon,"HEAD",ReplaceString(Url$,"http://"+Domain$+"/",""),#Null,#Null,0,$80000000,0) 
      If hHttpOpenRequest 
        iretval = HttpSendRequest_(hHttpOpenRequest,#Null,0,0,0) 
        If iretval 
          BufferLength = 2048 : Buffer$ = Space(BufferLength) 
          HttpQueryInfo_(hHttpOpenRequest,19,@Buffer$,@BufferLength,0) 
          String$ = PeekS(@Buffer$,BufferLength) 
          String$ = Trim(String$) 
          If String$ = "200" 
            BufferLength = 2048 : Buffer$ = Space(BufferLength) 
            HttpQueryInfo_(hHttpOpenRequest,22,@Buffer$,@BufferLength,0) 
            String$ = PeekS(@Buffer$,BufferLength) 
            MessageRequester("API", String$) ; <------ if it works, you should see a message requester
          EndIf 
        EndIf 
      EndIf 
      InternetCloseHandle_(hInetCon) 
    EndIf 
    InternetCloseHandle_(hURL) 
  EndIf 
  InternetCloseHandle_(hInet) 
EndIf
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
User avatar
Ajm
Enthusiast
Enthusiast
Posts: 233
Joined: Fri Apr 25, 2003 9:27 pm
Location: Kent, UK

Post by Ajm »

Hi gnozal,

I have just tried the above code and run it through the debugger.
It pauses for a while at the following line then ends.

iretval = HttpSendRequest_(hHttpOpenRequest,#Null,0,0,0)
iretval returned is 0
Regards

Andy

Image
Registered PB & PureVision User
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

Ajm wrote:Hi gnozal,
I have just tried the above code and run it through the debugger.
It pauses for a while at the following line then ends.
iretval = HttpSendRequest_(hHttpOpenRequest,#Null,0,0,0)
iretval returned is 0
I am sorry I can't help here.
I had an analog problem when they changed proxy/firewall settings here (MS update ?), but it resolved spontaneously (after another MS update ?).
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
didier69
User
User
Posts: 15
Joined: Wed Apr 30, 2008 11:24 am
Location: Lyon (France)

Post by didier69 »

Hi gnozal,

I would like to use your updater to follow your updates and
when I launch LibraryUpdater.exe I got this error window:

Code: Select all

Cannot load Source code!
C:\Documents and Settings\dbn\Mes documents\download\LibraryUpdater\%1
I press a lot of OK and then I have the tool open.
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

Update (hotfix)

Changes :
- updated old PB folder and PB version detection code (should fix didier69's problem)
- updated library information

Note : just a quick fix, the tool will be updated for PB4.20 final.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

Update

Changes :
- updated library information for PB4.20

[EDIT JUN 5th 2008]Updated again : fixed a stupid mistake ...
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post by ts-soft »

thx :D

you should update the "LibraryUpdater.ini" at start, i have load it twice :wink:
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

Update

Changes :
- some fixes
- updated for PB4.30
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

Update

Changes :
- updated for PB4.40
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
Post Reply