[Include] safeDialogs - Complete protection against spoofed dialog data!
#11

Quote:
Originally Posted by PrO.GameR
View Post
Ah, one of my half-way finished projects. Great to see one released as I never got around finishing mine.

Here's a suggestion for you, thats a huge array sitting somewhere unused until they use dialogs, so use PVars instead.
I didn't consider using PVars because of their slow performance and also I saw no use of having dialog-string over other scripts. I know there are bulk of data unused which is why I've considered using packed strings. I'll be running few benchmarks and switch over PVars if needed. Thanks for suggesting!

Quote:
Originally Posted by Swedky
View Post
Another amazing release! Good job over there Lordz
I'll be looking at the code and tell you if find some bug :P
I'd really be grateful if you find and report them because I haven't tested this include VERY well.

Quote:
Originally Posted by GoldenLion
View Post
The bug is still there. I think it's not possible to fix it as it's impossible to get the whole inputtext.
It'd be really helpful if you're pointing out how or what code brings in the false call of OnDialogSpoof. Because I haven't really worked with dialogs since the release of SA-MP 0.3.7. I've noticed now that false calls would be given only if a header type dialog is shown as empty. I really don't know why'd anyone show an empty header dialog but I assume in situations to show an empty inventory, that might be used. ()

A minor update has been done to this include to prevent false alarms on empty header dialog. This is the code I used right now for testing:
pawn Code:
//testing safeDialogs
#define FILTERSCRIPT

#include <a_samp>
#include <safeDialogs>
#include <zcmd>

static const dialogSpoofReasons[][] = {

    {"spoofing dialog ID"},
    {"spoofing list-item"},
    {"spoofing input-text"}
};


public OnDialogSpoof(playerid, spooftype) {

    new
        tempString[144],
        tempName[MAX_PLAYER_NAME + 1]
    ;

    GetPlayerName(playerid, tempName, sizeof(tempName));
    format(tempString, sizeof(tempString), "%s (ID:%d) has been caught for %s",
        tempName, playerid, dialogSpoofReasons[spooftype]);
       
    SendClientMessageToAll(-1, tempString);
   
    print("\a"); //Beep sound.
    print(tempString);
   
    return 0;
}

CMD:showdialog(playerid, params[]) {

    if(isnull(params))
        return SendClientMessage(playerid, 0xFF0000FF, "USAGE : /showdialog [type]");
       
    if(!strcmp(params, "list", true)) {
   
        ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "DIALOG_STYLE_LIST",
        "Item1\nItem2\nItem3\nItem4", "Select", "Close");
    }
    else if(!strcmp(params, "msgbox", true)) {
   
        ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX, "DIALOG_STYLE_MSGBOX",
        "Item1\nItem2\nItem3\nItem4", "Select", "Close");
    }
    else if(!strcmp(params, "header", true)) {
   
        ShowPlayerDialog(playerid, 1, DIALOG_STYLE_TABLIST_HEADERS,
        "DIALOG_STYLE_TABLIST_HEADERS",
        "Item\tIndex\n\
        Item\t1\n\
        Stuff\t2\n\
        Other\t3"
, "Select", "Close");
        /*ShowPlayerDialog(playerid, 1, DIALOG_STYLE_TABLIST_HEADERS,
        "DIALOG_STYLE_TABLIST_HEADERS",
        "Item\tIndex\n", "Select", "Close");*/

    }
    else if(!strcmp(params, "tablist", true)) {
   
        ShowPlayerDialog(playerid, 1, DIALOG_STYLE_TABLIST,
        "DIALOG_STYLE_TABLIST",
        "Item\t1\n\
        Stuff\t2\n\
        Other\t3"
, "Select", "Close");
    }
    else if(!strcmp(params, "input", true)) {
   
        ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "DIALOG_STYLE_INPUT",
        "Input some stuff", "Select", "Close");
    }
    return 1;
}
Please re-download the latest commit if you're facing issue with empty header dialogs.
Reply


Messages In This Thread
safeDialogs - Complete protection against spoofed dialog data! - by Lordzy - 04.02.2017, 13:13
Re: safeDialogs - Complete protection against spoofed dialog data! - by Naruto_Emilio - 04.02.2017, 14:02
Re: safeDialogs - Complete protection against spoofed dialog data! - by HydraHumza - 04.02.2017, 14:07
Re: safeDialogs - Complete protection against spoofed dialog data! - by GoldenLion - 04.02.2017, 14:51
Re: safeDialogs - Complete protection against spoofed dialog data! - by Lordzy - 04.02.2017, 14:53
Re: safeDialogs - Complete protection against spoofed dialog data! - by GoldenLion - 04.02.2017, 15:00
Re: safeDialogs - Complete protection against spoofed dialog data! - by Lordzy - 04.02.2017, 15:21
Re: safeDialogs - Complete protection against spoofed dialog data! - by PrO.GameR - 04.02.2017, 15:32
Re: safeDialogs - Complete protection against spoofed dialog data! - by Private200 - 04.02.2017, 15:37
Re: safeDialogs - Complete protection against spoofed dialog data! - by GoldenLion - 04.02.2017, 17:52
Re: safeDialogs - Complete protection against spoofed dialog data! - by Lordzy - 04.02.2017, 18:21
Re: safeDialogs - Complete protection against spoofed dialog data! - by GoldenLion - 04.02.2017, 19:07
Re: safeDialogs - Complete protection against spoofed dialog data! - by Lordzy - 05.02.2017, 03:36
Re: safeDialogs - Complete protection against spoofed dialog data! - by PrO.GameR - 05.02.2017, 12:40
Re: safeDialogs - Complete protection against spoofed dialog data! - by Lordzy - 06.02.2017, 15:35
Re: safeDialogs - Complete protection against spoofed dialog data! - by Lordzy - 08.02.2017, 17:17
Re: safeDialogs - Complete protection against spoofed dialog data! - by GoldenLion - 12.02.2017, 18:30
Re: safeDialogs - Complete protection against spoofed dialog data! - by Lordzy - 12.02.2017, 23:58
Re: safeDialogs - Complete protection against spoofed dialog data! - by GoldenLion - 13.02.2017, 10:48
Re: safeDialogs - Complete protection against spoofed dialog data! - by Lordzy - 14.02.2017, 14:50
Re: safeDialogs - Complete protection against spoofed dialog data! - by GoldenLion - 14.02.2017, 14:58
Re: safeDialogs - Complete protection against spoofed dialog data! - by Lordzy - 14.02.2017, 15:02
Re: safeDialogs - Complete protection against spoofed dialog data! - by GoldenLion - 15.02.2017, 15:24
Re: safeDialogs - Complete protection against spoofed dialog data! - by Naruto_Emilio - 20.02.2017, 20:20
Re: safeDialogs - Complete protection against spoofed dialog data! - by iKernel - 20.02.2017, 22:26
Re: safeDialogs - Complete protection against spoofed dialog data! - by Lordzy - 21.02.2017, 02:43
Re: safeDialogs - Complete protection against spoofed dialog data! - by Naruto_Emilio - 23.02.2017, 11:02
Re: safeDialogs - Complete protection against spoofed dialog data! - by TheLeech - 11.03.2017, 18:52

Forum Jump:


Users browsing this thread: 2 Guest(s)