Author Topic: Oxygen Basic alpha  (Read 58653 times)

cevpegge

  • Guest
Re: Oxygen Basic alpha
« Reply #45 on: September 14, 2010, 11:04:56 PM »

You can trap runtime binding errors with this line:

Code: [Select]
  s=error() : if s then print s : goto endprog

where endprog is a label located at the end of the script

Here is the working dialog:
Code: [Select]
#basic



dim as  byte dlgtpl(104)=>(1,0,255,255,0,0,0,0,0,0,0,0,0,8,207,16,1,0,10,0,10,0,150,0,100,0,0,0,0,0,73,0,68,0,68,0,95,0,68,0,
    76,0,71,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,80,48,0,66,0,51,0,15,0,233,3,0,0,66,0,85,0,84,0,84,0,
    79,0,78,0,0,0,73,0,68,0,67,0,95,0,66,0,84,0,78,0,0,0,0,0)


type MSG
  ; 28 bytes
  hwnd    as long
  message as long
  wParam  as long
  lParam  as long
  time    as long
  pt      as point
end type

  dim kernel32,user32,GDI32 as long
  kernel32=LoadLibrary `kernel32.dll`
  user32=LoadLibrary `user32.dll`
  GDI32=LoadLibrary `GDI32.dll`

  bind kernel32
  (
    GetCommandLine  GetCommandLineA   ; @0
    GetModuleHandle GetModuleHandleA  ; @4
    ExitProcess     ExitProcess       ; @4
  )

  bind user32
  (
    LoadIcon         LoadIconA         ; @8
    LoadCursor       LoadCursorA       ; @8
    RegisterClass    RegisterClassA    ; @4
    MessageBox       MessageBoxA       ; @4
    CreateWindowEx   CreateWindowExA   ; @48
    ShowWindow       ShowWindow        ; @8
    UpdateWindow     UpdateWindow      ; @4
    GetMessage       GetMessageA       ; @16
    TranslateMessage TranslateMessage  ; @4
    DispatchMessage  DispatchMessageA  ; @4
    PostQuitMessage  PostQuitMessage   ; @4
    BeginPaint       BeginPaint        ; @8
    EndPaint         EndPaint          ; @8
    GetClientRect    GetClientRect     ; @8 
    DrawText         DrawTextA         ; @20
    PostMessage      PostMessageA      ; @16
    DefWindowProc    DefWindowProcA    ; @16
    DialogBoxParam   DialogBoxParamA ;@20   
DialogBoxIndirectParam DialogBoxIndirectParamA ;@20   
    EndDialog EndDialog ;@8   
  )


  bind GDI32
  (
    GetStockObject   GetStockObject    ; @4
  )

  s=error() : if s then print s : goto endprog


% WM_DESTROY    2
% WM_CLOSE     16
% WM_SYSCOMMAND       = 0x0112
% SC_CLOSE        = 0xF060
% WM_COMMAND          = 0x0111
  % CS_VREDRAW      1
  % CS_HREDRAW      2
  % IDI_APPLICATION 32512
  % IDC_ARROW       32512
  % WHITE_BRUSH     0
  % MB_ICONERROR    16





  declare Function WinMain(byval inst as long ,byval prevInst as long ,byval cmdline as asciiz , byval show as long) as long
  declare function WndProc(byval hWnd as long, byval wMsg as long, byval wParam as long, byval lparam as long) as long
                      '
  def SW_NORMAL 1
  def SW_SHOWDEFAULT 10



  ;=====================================
 
  dim byref cmdline as asciiz,inst as long

  &cmdline=GetCommandLine
  inst=GetModuleHandle 0
  'print cmdline `
  '` hex inst

  WinMain inst,0,cmdline,SW_NORMAL
  '
  freelibrary kernel32
  freelibrary user32
  freelibrary gdi32
  terminate

Function WinMain(byval inst as long ,byval prevInst as long,byval cmdline as asciiz , byval show as long) as long
Dim RetVal as long

RetVal = DialogBoxIndirectParam(inst,&dlgtpl,0,&WndProc,0)
     
  if RetVal == -1 then
    MessageBox 0,`No Resource` ,`Information`,MB_ICONERROR
    exit function
  end if
 
  function=RetVal


End Function
'==============================================================================
Function WndProc (byval hWnd as long,byval wMsg as long, byval wParam as long,byval lparam as long ) as long callback
select wMsg
case WM_DESTROY
PostQuitMessage 0
'case WM_CLOSE
' EndDialog(hWnd,0)
case WM_SYSCOMMAND
if (wParam AND 0xFFF0) == SC_CLOSE then
EndDialog(hWnd,0)
end if
case WM_COMMAND

end select
End Function

endprog:


Charles

JRS

  • Guest
Re: Oxygen Basic alpha
« Reply #46 on: September 14, 2010, 11:33:28 PM »
Charles,

I went to the SourceForge site to download the 03 release and Kaspersky and Virus Total complained.

John

                                                           
AntivirusVersionLast UpdateResult
AhnLab-V32010.09.15.002010.09.14-
AntiVir8.2.4.522010.09.14TR/Crypt.XPACK.Gen2
Antiy-AVL2.0.3.72010.09.15-
Authentium5.2.0.52010.09.15-
Avast4.8.1351.02010.09.14-
Avast55.0.594.02010.09.14-
AVG9.0.0.8512010.09.14-
BitDefender7.22010.09.15-
CAT-QuickHeal11.002010.09.15-
ClamAV0.96.2.0-git2010.09.15-
Comodo60812010.09.15-
DrWeb5.0.2.033002010.09.15-
Emsisoft5.0.0.372010.09.15Trojan.Crypt!IK
eSafe7.0.17.02010.09.14-
eTrust-Vet36.1.78552010.09.14-
F-Prot4.6.1.1072010.09.14-
F-Secure9.0.15370.02010.09.15-
Fortinet4.1.143.02010.09.13-
GData212010.09.15-
IkarusT3.1.1.88.02010.09.15Trojan.Crypt
Jiangmin13.0.9002010.09.15-
K7AntiVirus9.63.25122010.09.14-
Kaspersky7.0.0.1252010.09.15Email-Worm.Win32.Warezov.gxp
McAfee5.400.0.11582010.09.15-
McAfee-GW-Edition2010.1B2010.09.14-
Microsoft1.61032010.09.15-
NOD3254512010.09.14-
Norman6.06.062010.09.14-
nProtect2010-09-14.012010.09.14-
Panda10.0.2.72010.09.14-
PCTools7.0.3.52010.09.15-
Prevx3.02010.09.15-
Rising22.65.02.012010.09.15-
Sophos4.57.02010.09.15-
Sunbelt68772010.09.15-
SUPERAntiSpyware4.40.0.10062010.09.15-
Symantec20101.1.1.72010.09.15-
TheHacker6.7.0.0.0182010.09.15-
TrendMicro9.120.0.10042010.09.15-
TrendMicro-HouseCall9.120.0.10042010.09.15-
VBA323.12.14.02010.09.14-
ViRobot2010.8.25.40062010.09.15-
VirusBuster12.65.6.02010.09.14-
« Last Edit: September 15, 2010, 12:16:20 AM by admin »

cevpegge

  • Guest
Re: Oxygen Basic alpha
« Reply #47 on: September 15, 2010, 12:18:08 AM »
John,

When I make changes to Oxygen the virus profile changes :)

I found other programs give false positives too. (compiling with FreeBasic)

Eros has had the same problem with thinBasic but it is readily resolved by reporting to the antivirus software developers concerned.

Perhaps I should wait until the O2 versions change less often.

Charles

JRS

  • Guest
Re: Oxygen Basic alpha
« Reply #48 on: September 15, 2010, 12:29:09 AM »
Charles,

Please don't get the wrong impression. I trust you and that you wouldn't be careless to develop on a box ridden with viruses and worms. The problem is that these over helpful anti-virus programs disinfect the download before I get a chance to unzip it and mark it as safe.

If your releasing the source to O2 and it's self compiling, maybe distributing the code that way would make things easier. If you include an easy to use build script with the release, I can't see how that will slow anyone down.

I would like to take a peek at your work (source) just out of curiosity.

John
« Last Edit: September 15, 2010, 12:30:54 AM by JRS »

cevpegge

  • Guest
Re: Oxygen Basic alpha
« Reply #49 on: September 15, 2010, 02:16:57 AM »


One advantage of C is that you can build everything from source using the resident compiler.

But Oxygen.dll compiles with FreeBasic 0.20 (at present). The utilities compile with Oxygen. And You need at least a co2 compiler already compiled (chicken and egg).

I could include the source code in the zip. It only adds an extra 200k. What do you think?

Charles

PS: I have used Avast Antivirus for many years. Free. Automatic updates daily. No trouble with false positives.


ahadev

  • Guest
Re: Oxygen Basic alpha
« Reply #50 on: September 15, 2010, 02:32:59 AM »
John,

I have already submitted the false alarm to the team of Avira Antivirus yesterday and waiting now for a reply.

The often changing of o2basic in its alpha status is an argument to wait with further reports to antivirus software devs. But I want to test o2basic without this hassle.  ;)

I went to the SourceForge site to download the 03 release and Kaspersky and Virus Total complained.

JRS

  • Guest
Re: Oxygen Basic alpha
« Reply #51 on: September 15, 2010, 02:49:31 AM »
Quote
I could include the source code in the zip. It only adds an extra 200k. What do you think?

It sure would give the project that open source feeling. Make sure you have decided on a licensing scheme before doing so.

I don't think I'm at a skill level that I could contribute to the compiler but I will help with testing and integration with ScriptBasic.

Quote
But Oxygen.dll compiles with FreeBasic ...

That sounds like a BCX code challenge to me.  ;D
« Last Edit: September 15, 2010, 02:54:57 AM by JRS »

cevpegge

  • Guest
Re: Oxygen Basic alpha
« Reply #52 on: September 15, 2010, 03:40:59 AM »

Okay :)

I'm not at all concerned with licensing. If any one wants to nick any part of it they are welcome, though a digital signing scheme might be useful to authenticate a fully maintained version.

Its written in very plain Basic and Assembler. Some parts are easier to understand than others. I spend more time annotating the code now than making changes. You will find the Oxygenkeywords in o2keyw.bas which is mostly a database and used to generate the manual. There are also some Architectural notes in the source folder.

FreeBasic compiles my 3 years worth of source code in 2 seconds!

posted as Alpha005

Charles

ahadev

  • Guest
Re: Oxygen Basic alpha
« Reply #53 on: September 15, 2010, 03:58:11 AM »
Right now I have got the reply from AVIRA that the following files are reported as 'FALSE POSITIVE':
- cco2.exe
- co2.exe
- eo2.exe

Conclusion: 'The detection pattern will be dropped for one of the next updates of the virus definition file (VDF).'

I hope the same goes for the compiled examples.
« Last Edit: September 15, 2010, 04:00:36 AM by ahadev »

cevpegge

  • Guest
Re: Oxygen Basic alpha
« Reply #54 on: September 15, 2010, 04:48:42 AM »
Thanks Andreas,

All executables will have a similar startup signature to these programs so there is a fair chance that Avira will accept them. But I don't know how it will react if new data sections are added to the PE file.

Charles

efgee

  • Guest
Re: Oxygen Basic alpha
« Reply #55 on: September 15, 2010, 07:45:17 AM »
... If your releasing the source to O2 and it's self compiling, maybe distributing the code that way would make things easier. If you include an easy to use build script with the release, I can't see how that will slow anyone down.

I would like to take a peek at your work (source) just out of curiosity.

Having the source code handy is nice and many people (myself included) can learn a lot just from staring at it.

But, if the Antivirus Software will recognize a certain pattern as a virus, then it doesn't matter if you download it inside a zip file or compile it yourself; the Antivirus Software will delete it as soon the compiler is done writing it to disk (happened to me with tcc compiled programs).

my $0.02

« Last Edit: September 15, 2010, 08:08:40 AM by efgee »

cevpegge

  • Guest
Re: Oxygen Basic alpha
« Reply #56 on: September 15, 2010, 08:46:44 AM »

I work in notepad so the presentation is optimised for easy reading in monochrome. You will see some graffiti between various sections. This is useful as a navigational aid as well as fun to do. Generally speaking each file represents a different layer of operation in the compiler to make code maintenance as easy as possible. The interesting thing is I did not plan this structure in advance, it emerged of its own accord. This business of lexing parsing and semantics is not an artefact.

Charles

JRS

  • Guest
Re: Oxygen Basic alpha
« Reply #57 on: September 15, 2010, 09:53:27 AM »
Quote
But, if the Antivirus Software will recognize a certain pattern as a virus, then it doesn't matter if you download it inside a zip file or compile it yourself; the Antivirus Software will delete it as soon the compiler is done writing it to disk (happened to me with tcc compiled programs).

I'm having all kinds of problems with Kaspersky enabled and working with Oxygen Basic 05. Is there anything that be changed so that new compiled programs aren't flagged as infected?
« Last Edit: September 15, 2010, 10:10:56 PM by JRS »

cevpegge

  • Guest
Re: Oxygen Basic alpha
« Reply #58 on: September 16, 2010, 06:20:31 AM »
I submitted eo2.exe co2.exe and cco2.exe and got this
response from Dr Kaspersky:

Quote
Hello,

Sorry, it was a false detection. It will be fixed in the next update.
Thank you for your help.

-------------------------------------------
Regards, Ivan Kargapoltsev.
Virus analyst , Kaspersky Lab.

jcfuller

  • Guest
Re: Oxygen Basic alpha
« Reply #59 on: September 16, 2010, 09:22:13 AM »
John,
  Try this co2. You will need to add your OxygenBasic directory to your system PATH environment.
I removed the directory code in the source and recompiled.

James