Author Topic: AntiFake  (Read 5827 times)

0 Members and 1 Guest are viewing this topic.

Offline Mighty

  • Camper
  • ***
  • Posts: 276
AntiFake
« on: July 03, 2010, 04:15:39 pm »
Name: AntiFake

Author: Mighty (idea by Silnikos)
Script version: 2.2.0
Server version: 2.6.5
Release Date: 6th of February 2011
Compile Test: Passed
Description:
Script made to avoid faking on the servers, without any accounts.
It's based on IP and visits.

Commands:
 * /whoiz X - shows who X is (X = ID or nickname part)
 * /whoizall - shows everyone's most probable 'personality'
 * /readwhoiz X - shows more details about player X
Admin Commands:
 * /mark <who> <num> <as_who> - use this when you're sure about some1. e.g. /mark 1 100 ~Sn. Mighty
 * /octets - now you don't need to have a player ingame to check his personality. e.g. /octets 127.0

Requirements:
 * Folder "antifake" must be created in root soldatserver folder (included in .rar)

Uses:
 * Explode function by DorkeyDear, CurryWurst

---

The also attached file AntiFake.zip is just the previous version (2.1.0), if you're interested.
---
Code: {snippets}
Code: [Select]
(...)
// AntiFake file handling

Procedure UpdateFile(ID: byte);
var
needle: string;
i,j: integer;
infile, name, number, filename: string;
begin
filename := 'antifake/'+GetOctets(IdToIp(ID))+'..txt';
list := Explode(ReadFile(filename),chr(10));
needle := chr(4)+IdToName(ID)+chr(3);
for i:=0 to ArrayHigh(list)-1 do
if ContainsString(list[i],needle) then
begin
list[i] := Copy(list[i],1,Length(list[i])-1);
number := Copy(list[i],StrPos(chr(3),list[i])+1,Length(list[i]));
name := Copy(list[i],1,StrPos(chr(3),list[i])-1);
number := inttostr(1+strtoint(number));
list[i] := name+chr(3)+number;
for j:=0 to ArrayHigh(list)-1 do
infile := infile + list[j] + chr(10);
WriteFile(filename,infile);
exit;
end;
WriteFile(filename,ReadFile(filename)+chr(4)+IdToName(ID)+chr(3)+'1'+chr(10))
end;

Procedure UnCover(ID: byte);
var
needle: string;
i,number: integer;
infile, name, filename: string;
begin
if not(FileExists('antifake/'+GetOctets(IdToIp(ID))+'..txt')) then
WriteLn('File does not exist! Check your folders!')
else
begin
filename := 'antifake/'+GetOctets(IdToIp(ID))+'..txt';
list := Explode(ReadFile(filename),chr(10));
needle := chr(4)+IdToName(ID)+chr(3);
for i:=0 to ArrayHigh(list)-1 do
begin
list[i] := Copy(list[i],1,Length(list[i])-1);
number := strtoint(Copy(list[i],StrPos(chr(3),list[i])+1,Length(list[i])));
name := Copy(list[i],2,StrPos(chr(3),list[i])-2);
Player[ID].Names[i] := name;
Player[ID].Count[i] := number;
end;

i:=0;
while not(Player[ID].Names[i] = '') do
i:=i+1;

Player[ID].RealHigh := i-1;
SortArray(ID);
end;
end;

// Default Events

procedure OnJoinGame(ID, Team: byte);
begin
if not(FileExists('antifake/'+GetOctets(IdToIp(ID))+'..txt')) then
WriteFile('antifake/'+GetOctets(IdToIp(ID))+'..txt',chr(4)+IdToName(ID)+chr(3)+'1'+chr(10))
else
begin
UpdateFile(ID);
UnCover(ID);
Player[ID].RealName := Player[ID].Names[0];
if Player[ID].RealName = '' then Player[ID].RealName := '>>unknown<<'
end;
end;
(...)

Questions? Bugs? Report please --> macekmil@gmail.com
« Last Edit: March 04, 2011, 12:25:56 pm by Mighty »
xFire: macmil        e-mail: macekmil@gmail.com
My scripts: Accuracy Script       Flashbang       Punishments GUID
            CatchMe Gamemod       AntiFake
            CW System             AntiFakeGUID

Offline Stuffy

  • Soldier
  • **
  • Posts: 182
  • Very stuffy.
    • Climb-Zone Forum
Re: AntiFake
« Reply #1 on: July 03, 2010, 07:12:35 pm »
Good idea, but I think its not a big protection, because you can change your ip so easily and some people have got a dynamic ip so...
The truth is out there? Does anyone know the URL?
The URL is here

Offline Mighty

  • Camper
  • ***
  • Posts: 276
Re: AntiFake
« Reply #2 on: July 04, 2010, 03:40:02 am »
It's based on 1st 2 octets of IP. Usually dynamic IP doesnt change them. (Right? :P)
xFire: macmil        e-mail: macekmil@gmail.com
My scripts: Accuracy Script       Flashbang       Punishments GUID
            CatchMe Gamemod       AntiFake
            CW System             AntiFakeGUID

Offline Swompie

  • Camper
  • ***
  • Posts: 390
Re: AntiFake
« Reply #3 on: July 04, 2010, 03:42:23 am »
For me it doesn't, gj

Offline tk

  • Soldier
  • **
  • Posts: 235
Re: AntiFake
« Reply #4 on: July 04, 2010, 03:47:19 am »
For me it does.

Offline croat1gamer

  • Veteran
  • *****
  • Posts: 1327
  • OMG CHANGING AVATAR!!! ^ω^
Re: AntiFake
« Reply #5 on: July 04, 2010, 06:40:39 am »
2nd octet is also changing, but mostly its 2-4 different ones, shouldnt be more than that.

Also, what if there are 2 people from the same ISP?
Last year, I dreamt I was pissing at a restroom, but I missed the urinal and my penis exploded.

Offline Mighty

  • Camper
  • ***
  • Posts: 276
Re: AntiFake
« Reply #6 on: July 04, 2010, 10:53:16 am »
Also, what if there are 2 people from the same ISP?

You mean when octets are same?
Generaly it searches octets. then it gets 1st fifty nicknames under these octets. it checks their visits count. Then u get 15 highest counts of visits.
xFire: macmil        e-mail: macekmil@gmail.com
My scripts: Accuracy Script       Flashbang       Punishments GUID
            CatchMe Gamemod       AntiFake
            CW System             AntiFakeGUID

Offline Leo

  • Soldat Beta Team
  • Veteran
  • ******
  • Posts: 1008
Re: AntiFake
« Reply #7 on: July 18, 2010, 05:25:31 am »
Nice but how to make it so that it works for admins only ?

p.s Also when I tried it in an empty server it takes me to spectator even when I choose a team when I join.
« Last Edit: July 18, 2010, 05:35:36 am by Leo »

Offline Mighty

  • Camper
  • ***
  • Posts: 276
Re: AntiFake
« Reply #8 on: February 06, 2011, 04:14:06 pm »
I guess i added autospec on join then 0o didn't even know that, lol

The script doesn't work actually, or at least at my general testing it sucked ass, but at least i know what should be fixed, so someday i'll fix it.

Update! Script completely rewritten
Script seems to be working finally :) Enjoy

xFire: macmil        e-mail: macekmil@gmail.com
My scripts: Accuracy Script       Flashbang       Punishments GUID
            CatchMe Gamemod       AntiFake
            CW System             AntiFakeGUID

Offline Irlandec

  • Soldier
  • **
  • Posts: 174
Re: AntiFake
« Reply #9 on: February 08, 2011, 11:33:55 am »
Good script out of here Mighty! Hope no one will have issues with it, you coded it fully right :P

Offline Damian[Eater]

  • Major(1)
  • Posts: 6
Re: AntiFake
« Reply #10 on: February 22, 2011, 11:12:13 am »
Running on Beo's servers. Working well. Good job Mighty. :)

Offline Mighty

  • Camper
  • ***
  • Posts: 276
Re: AntiFake
« Reply #11 on: March 01, 2011, 01:38:42 pm »
UPDATE

* Added /mark and /octets commands for admin.
* Made use or WriteLn so admin can check anyone without joining game

Details in first post, download link: Click!

OFC files with players data don't have to be reset :)
Enjoy
« Last Edit: March 01, 2011, 01:45:28 pm by Mighty »
xFire: macmil        e-mail: macekmil@gmail.com
My scripts: Accuracy Script       Flashbang       Punishments GUID
            CatchMe Gamemod       AntiFake
            CW System             AntiFakeGUID