Results 1 to 13 of 13

Thread: How do you make a extension?

  1. #1
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default How do you make a extension?

    How do you make an extension with Simba.sex files?

    How do I make my .sex file appear I side the Simba program like the dtm editor?

  2. #2
    Join Date
    Jun 2012
    Location
    Howell, Michigan
    Posts
    1,585
    Mentioned
    34 Post(s)
    Quoted
    553 Post(s)

    Default

    @CynicRus will probably know.

  3. #3
    Join Date
    May 2012
    Location
    Moscow, Russia
    Posts
    661
    Mentioned
    35 Post(s)
    Quoted
    102 Post(s)

    Default

    Unfortunately there's nothing I can help. But then @nielsie95 can, I think.
    Per aspera ad Astra!
    ----------------------------------------
    Slow and steady wins the race.

  4. #4
    Join Date
    Sep 2012
    Location
    Here.
    Posts
    2,007
    Mentioned
    88 Post(s)
    Quoted
    1014 Post(s)

    Default

    I don't wanna tag another person for no good reason if nielsie can help... But Euphemism has definitely done this before (objdtm), so I'd bet money he knows how.

    .sex files are just .simba files with a different extension (pop one open and look ), so honestly I wouldn't be surprised if it's just a matter of creating the file and putting it in the extensions folder for Simba to detect automatically (like most plugin based programs). This automatic detection would add it to the plugin list for you to turn on or off to your own discretion. At least that's what I assume it would be like if Simba does the same thing as similar programs. So I could easily be wrong

  5. #5
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default

    Quote Originally Posted by Kevin View Post
    I don't wanna tag another person for no good reason if nielsie can help... But Euphemism has definitely done this before (objdtm), so I'd bet money he knows how.

    .sex files are just .simba files with a different extension (pop one open and look ), so honestly I wouldn't be surprised if it's just a matter of creating the file and putting it in the extensions folder for Simba to detect automatically (like most plugin based programs). This automatic detection would add it to the plugin list for you to turn on or off to your own discretion. At least that's what I assume it would be like if Simba does the same thing as similar programs. So I could easily be wrong
    Yea I have done it before, my "extension" appeared in the extensions menu but idk if theres some type of layout i'm supposed to put in it so simba knows what to do with it

  6. #6
    Join Date
    Nov 2011
    Location
    England
    Posts
    3,072
    Mentioned
    296 Post(s)
    Quoted
    1094 Post(s)

    Default

    Its a simba script with a different extension name.. you just need to make it compile as a extension which you can see via the other ones.

  7. #7
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default

    Quote Originally Posted by Ollybest View Post
    Its a simba script with a different extension name.. you just need to make it compile as a extension which you can see via the other ones.
    WellI tried that, and it's not showing up under tools I don't really understand it that much

    Simba Code:
    {$i SRL/SRL.simba}
    Var
      DsgnForm:TForm;
      ScriptEdit:TMemo;
      TitleLabel:TLabel;
      Buttons: Array[0..1] of TButton;
      CheckBoxs : Array[0..2] of TCheckBox;
      Script_text, state:string;
      pressed, HTTPscan, webScan, codeScan:boolean;
      Threats:Extended;
      Things:TStringArray;
      Simba_Menu: TMenuItem;
      Simba_MainMenu: TMainMenu;
    const
      default = 'Times New Roman';
    (*
      Auther: Brandon
      Description: Looks for a string and ignores spaces.
    *)

    Function FindStringIgnoreSpaces(TextToSearch, TextToFind: String; MinSpacesToIgnore, MaxSpacesToIgnore: Integer): Boolean;
    var
      Regex: String;
    Begin
      Regex := '[\s]{' + ToStr(MinSpacesToIgnore) + ',' + ToStr(MaxSpacesToIgnore) + '}' + TextToFind;
      Result := ExecRegExpr(Regex, TextToSearch);
    End;
    (*
      Auther: Janilabo
      Description: Counts the number of strings inside of a string.
    *)

    function CountString(s, str: string; overlap: Boolean): Integer;
    var
      p, o: Integer;
    begin
      Result := 0;
      if not overlap then
      begin
        o := Length(s);
        p := (p - (o - 1));
      end else
        o := 1;
      if (o <= Length(str)) then
      repeat
        p := PosEx(s, str, (p + o));
        if (p > 0) then
          Inc(Result);
      until (p <= 0);
    end;
    (*
      Auther: BobboHobbo
      Description: Finds a string inside a string.
    *)

    function FindTextC(word: string): boolean;
    begin
      Result := (Pos(lowercase(Word), LowerCase(Script_Text)) > 0);
    end;
    (*
      Auther: BobboHobbo
      Description: Finds muiltiple strings inside a string.
    *)

    function FindTextMultiC(Text: TStringArray): boolean;
    var
      i, n: Integer;
    begin
       n := High(Text);
      for i := 0 to n do
        if (Pos(LowerCase(Text[i]), Script_Text) <> 0) then
        begin
          Result := True;
          Exit;
        end;
    end;
    Procedure addArray(str:string;amt:Extended);
    Var
      i:Integer;
    begin
      Threats := threats + amt;
      try
        setarraylength(things, high(things));
        things[length(things)]:= str;
      except
        Writeln('Error adding array!');
      end;
    end;
    (*
      Auther: Officer Barbrady
      Description: Prints out results of scan.
    *)

    Procedure PrintReport;
    Var
      I:Integer;
    begin
      //DeleteDuplicateArrays(Things);
      Writeln('==================Scan Results===================');
      Writeln('Threats:' + ToStr(Threats));
      Writeln('Things Found:');
      for i:=0 to high(things) do
      begin
        Writeln(ToStr(Things[i]));
      end;
      case (Round(Threats)) of
        0:    Writeln('Over Script Risk:None');
        1..2: Writeln('Over Script Risk:Low');
        3:    Writeln('Over Script Risk:Meduim');
        4..25: Writeln('Over Script Risk:High');
      end;
      Writeln('Thank you for using, always visit thread for updates')
    end;
    Procedure Update_State(s:string);
    begin
      State := s;
      ClearDebug;
      Writeln('=====Script scanner Version 2.0=====');
      Writeln('Currently:' + State);
      Writeln('Threats:' + ToStr(Round(Threats)));
      Writeln('====================================');
    end;
    (*
      Auther: Officer Barbrady
      Description: Looks for bad coding practices.
    *)

    Procedure FindBadCode;
    Var
      i, k:Integer;
    begin
      wait(700);
      Update_State('Looking for bad code')
      for i := 0 to 3 do
      begin
        if FindStringIgnoreSpaces(Script_Text,LowerCase('mmouse(x, y,') + ToStr(i) + ',' + ToStr(i) + ')', 0, 2) then
        addArray('Detected in-human mouse function, "mmouse" does not have enough randomness',1);
      end;
      if not FindTextC(lowercase('random')) then
        addArray('Found no randomness in script.',1);
      for k := 0 to 2000 do
      begin
        if FindStringIgnoreSpaces(Script_Text,LowerCase('wait(' + ToStr(k) + ')'), 0, 2) then
          addArray('Script contains static waits',0.3);
      end;
    end;
    (*
      Auther: Officer Barbrady
      Description: Finds suspicious things inside of the code, such as
      User or Pass being used more then once.
    *)

    Procedure FindAbnormalCode;
    begin
      wait(700);
      Update_State('Looking for Abnormal code')
      if (CountString(LowerCase('user'), script_text,True)>1) then
        addArray('The variable "User" is used more then onc.',1);

      if (CountString(LowerCase('name'), script_text,True)>1) then
        addArray('The variable "Name" is used more then once.',1);

      if (CountString(LowerCase('pass'), script_text,True)>1) then
        addArray('The variable "Pass" is used more then once.',1);

      if (CountString(LowerCase('pin'), script_text,True)>1) then
        addArray('The variable "Pin" is used more then once.',1);
    end;
    (*
      Auther: Officer Barbrady
      Description: Looks for OpenWebPage function.
    *)

    Procedure FindWebsiteThreats;
    begin
    wait(1200);
    Update_State('Looking for Harmful Websites')
    if FindTextC(lowercase('openwebpage')) then
      begin
        addArray('Found attempt to open webpage [Risk level: Meduim]',1);
        if FindTextMultiC(['meatspin', 'porn', 'xxx', '18', 'sunny']) then
        begin
          addArray('Found adult content attempting to be opened via openpage.',3);
          exit;
        end;
      end;
    end;
    (*
      Auther: Officer Barbrady
      Description: Looks for communication with any type of HTTP client.
    *)

    procedure FindHTTPThreats;
    begin
      wait(1200);
      Update_State('Looking for HTTP threats');
      if FindTextC(lowercase('addpost')) then
        addArray('Found "addpost" [Risk level: HIGH]',4);

      if FindTextC(lowercase('GetPage')) then
        addArray('Found "GetPage" [Risk level: HIGH]',4);

      if FindTextC(lowercase('posthttppage')) then
        addArray('found "posthttppage" [Risk level: HIGH]',4);

      if FindTextC(lowercase('posthttppageex')) then
        addArray('found "posthttppageexe" [Risk level: HIGH]',4);
    end;
    (*
      Auther: Officer Barbrady
      Description: Main loop
    *)

    Procedure Scan;
    begin
      if (HTTPscan = true) then FindHTTPThreats;
      if (webScan = true) then FindWebsiteThreats;
      if (codeScan = true) then
      begin
        FindAbnormalCode;
        FindBadCode;
      end;
      PrintReport;
    end;
    (*
      Auther: Officer Barbrady
      Description: Opens thread when "Update button" is clicked.
    *)

    procedure OpenThread(Sender: TObject);
    begin
      OpenWebPage('http://villavu.com/forum/showthread.php?t=103408');
    end;
    (*
      Auther: Officer Barbrady
      Description: Saves the form information, such as the text entered
      into the feild.
    *)

    procedure SaveFormInfo(Sender: TObject);
    begin
      DsgnForm.ModalResult := mrOk;
      Script_text := ScriptEdit.TEXT;
      pressed := true;
      if (CheckBoxs[0].Checked) then HTTPscan := true;
      if (CheckBoxs[1].Checked) then webScan := true;
      if (CheckBoxs[2].Checked) then codeScan := true;
      DsgnForm.CLOSE;
    end;
    (*
      Auther: Officer Barbrady
      Description: Starts the form.
    *)

    procedure InitForm;
    Var
      i, c:Integer;
      Strings:TStringArray;
      Points:TPointArray;
    begin
      DsgnForm:=TForm.Create(nil);
      with DsgnForm do
        begin
          Caption:='Simba script scanner';
          Left:=377;
          Top:=380;
          Width:=750;
          Height:=460;
          Font.Name:=default;
          Font.Color:=clDefault;
          Font.Size:=0;
        end;
      ScriptEdit := TMemo.Create(DsgnForm);
        with ScriptEdit do
        begin
          Parent := DsgnForm;
          Left := 120;
          Top := 80;
          Width := 481;
          Height := 177;
          Font.Name := default;
          with ScriptEdit.Lines do Add('Paste script into this box, it will look for suspicious lines of code');
          ScrollBars := ssBoth;
          TabOrder := 0;
      end;
      TitleLabel:=TLabel.Create(DsgnForm);
      with TitleLabel do
        begin
          Parent:=DsgnForm;
          Caption:='Script scanner version 1.3';
          Left:=225;
          Top:=20;
          Width:=43;
          Height:=14;
          Font.Name:=default;
          Font.Color:=clDefault;
          Font.Size:=17;
      end;
      Strings := ['Scan','Update'];
      Points := [Point(175,300),Point(400,300)];
      for i:= 0 to high(Buttons) do
        begin
          Buttons[i] := TButton.Create(DsgnForm);
          Buttons[i].Parent := DsgnForm;
          Buttons[i].Caption := Strings[i];
          Buttons[i].Left := Points[i].x;
          Buttons[i].Top := Points[i].y;
          Buttons[i].Width:=150;
          Buttons[i].Height:=25;
          Buttons[i].Font.Size:=12;
          case (i) of
            0: Buttons[i].OnClick:=@SaveFormInfo;
            1: Buttons[1].OnClick:=@OpenThread;
          end;
        end;
      Strings := ['Scan for HTTP threats','Scan for Webthreats','Scan for Bad code'];
      Points := [Point(80,350),Point(300,350),Point(500,350)];
      for c := 0 to high(CheckBoxs) do
      begin
        CheckBoxs[c] := TCheckBox.Create(DsgnForm);
        CheckBoxs[c].Parent := DsgnForm;
        CheckBoxs[c].Left := Points[c].x;
        CheckBoxs[c].Top  := Points[c].y;
        CheckBoxs[c].Width := 97;
        CheckBoxs[c].Caption := Strings[c];
      end;
    end;
    procedure SafeInitForm;
    var
      v: TVariantArray;
    begin
      setarraylength(V, 0);
      ThreadSafeCall('InitForm', v);
    end;


    procedure ShowFormModal;
    begin
      DsgnForm.ShowModal;
    end;


    procedure SafeShowFormModal;
    var
      v: TVariantArray;
    begin
      SetArrayLength(V, 0);
      ThreadSafeCall('ShowFormModal', v);
    end;
    procedure OnClick(sender : TObject);
    begin;
      SafeInitForm;
      SafeShowFormModal;
    end;

    procedure Init;
    begin;
      Simba_Menu := TMenuItem.Create(Simba_MainMenu);
      Simba_Menu.Caption := 'Script Scanner';
      Simba_MainMenu.Items.Items[8].Insert(5, Simba_Menu);
      Simba_Menu.OnClick := @OnClick;
    end;
    begin
      Init;
      if (pressed=true) then Scan;
    end.

  8. #8
    Join Date
    Nov 2011
    Location
    England
    Posts
    3,072
    Mentioned
    296 Post(s)
    Quoted
    1094 Post(s)

    Default

    does it compile? it will say in the debug box somewhere.

  9. #9
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default

    Quote Originally Posted by Ollybest View Post
    does it compile? it will say in the debug box somewhere.
    Can't call the proc at this line:

    Simba Code:
    Simba_MainMenu.Items.Items[8].Insert(5, Simba_Menu);

  10. #10
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default

    Still need help with this, I don't know anybody that has written a extension for Simba with simba that can come with it except for @nielsie95

  11. #11
    Join Date
    May 2007
    Location
    knoxville
    Posts
    2,873
    Mentioned
    7 Post(s)
    Quoted
    70 Post(s)

    Default

    Look at Formating.sex file, that's a good example of what to do. Focus on the init procedure, and go from there I'm working on one too atm
    <TViYH> i had a dream about you again awkwardsaw
    Malachi 2:3

  12. #12
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default

    Quote Originally Posted by Awkwardsaw View Post
    Look at Formating.sex file, that's a good example of what to do. Focus on the init procedure, and go from there I'm working on one too atm
    Me so many lines of code I don't know we're the hidden parts are that define how it goes into Simba

  13. #13
    Join Date
    May 2007
    Location
    knoxville
    Posts
    2,873
    Mentioned
    7 Post(s)
    Quoted
    70 Post(s)

    Default

    Simba Code:
    var
      Simba_Menu: TMenuItem;
      AutoColor_MenuItem: TMenuItem;

    procedure Init;
    begin;
      Simba_Menu := TMenuItem.Create(Simba_MainMenu);
      Simba_Menu.Caption := GetName;
      Simba_Menu.Visible := True;
      Simba_MainMenu.Items.ADD(Simba_Menu);

      AutoColor_MenuItem := TMenuItem.Create(Simba_Menu);
      with AutoColor_MenuItem do
      begin
        Name := 'AutoColor_MenuItem';
        Caption := 'Auto Color Helper';
        OnClick := @OnClick;
      end;
      Simba_Menu.Add(AutoColor_MenuItem);

      Simba_MainMenu.Items.Items[4].Insert(5, Simba_Menu);
    end;

    is all you need for it to be added to the tool bar. it's just like any other form

    edit: heres some docs for extensions as well http://docs.wizzup.org/simba/simbaref/extensions.html
    Last edited by Awkwardsaw; 06-08-2013 at 08:05 PM.
    <TViYH> i had a dream about you again awkwardsaw
    Malachi 2:3

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •