Unban hack

maughanorama

Member
Member
Nov 27, 2014
181
10
18
50
id just like to report back the WHITELIST.py that you wrote for me.... Works perfect
thank you very much. you should release as an official plugin

sorry to be a pain in bum but is the =1 required ? could i possibly remove this ? i only ask as im using a script to add ids directly from sql and im having a small issue aattaching the =1 to the end of the line without affecting the [WhiteList] line.

thanks
 
Last edited:

DreTaX

Probably knows the answer...
Administrator
Jun 29, 2014
4,093
4,784
113
At your house.
github.com
id just like to report back the WHITELIST.py that you wrote for me.... Works perfect
thank you very much. you should release as an official plugin

sorry to be a pain in bum but is the =1 required ? could i possibly remove this ? i only ask as im using a script to add ids directly from sql and im having a small issue aattaching the =1 to the end of the line without affecting the [WhiteList] line.

thanks
Sort of. Since It's an ini file, It is required. Are you adding the IDs by registration, or?
 

maughanorama

Member
Member
Nov 27, 2014
181
10
18
50
na im using bash, i was going to use sed and append the line but i cant find a way to exclude the [WhiteList]
heres my bash script
mysql database -B --disable-column-names -e "select pf_steamid from phpbb_profile_fields_data;" > Whitelist.ini

this gives me a nice list of steamids but i need to add the =1
 
Last edited:

DreTaX

Probably knows the answer...
Administrator
Jun 29, 2014
4,093
4,784
113
At your house.
github.com
na im using bash, i was going to use sed and append the line but i cant find a way to exclude the [WhiteList]
heres my bash script
mysql database -B --disable-column-names -e "select pf_steamid from phpbb_profile_fields_data;" > Whitelist.ini
Basically you connect to mysql via bash and paste the ID in?
 

maughanorama

Member
Member
Nov 27, 2014
181
10
18
50
Uer my script logins in to the sql server pull the data I need and outputs it to a txt file. Only prob is I'm trying to add the =1 without addinig =1 to the [WHITELIST]
 

DreTaX

Probably knows the answer...
Administrator
Jun 29, 2014
4,093
4,784
113
At your house.
github.com
Yer I can execute php java python. Just don't wrap it in exe
Java Command line app. I fully tested It on windows, and It worked. I hope It will be the same on Linux.

Help:

java -jar IniParser.jar -h

Parameters:

-h Show help.
-m Specify mode: del/set/add (Delete Required Section and Key)
-i Write the given ID to the inifile
-p Direct path to the ini file
-s Specify the Section if necessary
-v Specify the Value if necessary
-f File name

Parameter Explanations:

The program always defines the default values.

-i = Must be defined.
-m = Must be defined.
-s = Section is the [Whitelist] by default. You can give something else if you want.
-v = Value is the 1 after the = mark by default. You can change this also if you want. (Not really recommending if you use my whitelist plugin though, so you shouldn't edit the -s or the -v)
-p = The directory where you are running the program by default. You are able to change this too.
-f = File's name. It's Whitelist.ini by default.

Examples:

java -jar IniParser.jar -m set -i 525525414 <---- This is what you will probably need for my plugin.
Output:

INI:
[WhiteList]
525525414=1
java -jar IniParser.jar -m set -i 525525414 -v "This shouldn't equal with 1"
Output:

INI:
[WhiteList]
525525414=This shouldn't equal with 1
java -jar IniParser.jar -m set -i 525525414 -v "This shouldn't equal with 1" -s "Another Section"
Output:

INI:
[Another Section]
525525414=This shouldn't equal with 1
java -jar IniParser.jar -m set -i 525525414 -v "This shouldn't equal with 1" -s "Another Section" -f "NotWhitelist.ini"
Output:


Well, no code changes, you just changed the file's name.

INI:
[Another Section]
525525414=This shouldn't equal with 1
java -jar IniParser.jar -m set -i 525525414 -v "This shouldn't equal with 1" -s "Another Section" -p "D:\Rust\RustServer\Save\PyPlugins\Whitelist\"
Output:


No code changes again, you just changed path of the ini file. The file will be located at the given path, and not at the location of the jar file.

INI:
[Another Section]
525525414=This shouldn't equal with 1

Basically all the parameters have a default value, except the -i. I hope It will work, I remember I had problems with PHP when I wanted to write in the Magma's inifile, and Magma couldn't read the file. Java is almost the same as C#, so I hope the C# parser is similar to Java. We will know when you give a feedback.
 

Attachments

Last edited:

maughanorama

Member
Member
Nov 27, 2014
181
10
18
50
ok somthing is broken. i keep getting errors now .......booooooooo im not sure what. i have been through the Ini files and i cant find any errors i have also removed the pluging and replaced with a fresh version but i still get
[12/31/2014 6:03:05 PM] [Debug] User Connected: kinkTR (76561197962717297 | 95.14.188.3)
[12/31/2014 6:03:05 PM] [Debug] [IronPython] An error occurred in: Whitelist plugin while calling method: On_PlayerConnected
[12/31/2014 6:03:05 PM] [Debug] [SafeTeleport] player=SPIDERPIG(76561197968073662) from=(5911.4, 390.4, -3440.1) to=(4774.4, 480.9, -3594.2) distance=1150.907 terrain=(4774.4, 471.8, -3594.2)
[12/31/2014 6:03:05 PM] [Exception] [ IPPlugin->Invoke | IPPlugin->OnPlayerConnected | Hooks->PlayerConnect | RustServerManagement->OnUserConnected | ConnectionAcceptor->uLink_OnPlayerConnected | GameObject->SendMessage | #=qSBVG6i3HoKQx$z3bwADYIgVX_kCktQP8JwBh1CI$O_8=->#=qnBC8vvHltGiAoAcoGPaaAA== | #=qSBVG6i3HoKQx$z3bwADYIgVX_kCktQP8JwBh1CI$O_8=->#=qopOwgPOjk_HOzOwWVDsWIQ== | #=qr9YotdsWVwSdbrj6D5OlmHWwwJVhBeBIJ5J461Az$DQ=->#=qM25p$Ei_tgo0VZPqr5NeJg== | #=qxj6gmeF_JmZ38rfyBJuqFoiB_sAo6WCf4j1AdQtxGgQ=->#=q2HqDTZFVDws8Yv2UHd8me8CJU2rmEhl0UENDzxjFAFA= | #=qxj6gmeF_JmZ38rfyBJuqFoiB_sAo6WCf4j1AdQtxGgQ=->#=qGm_HL$oYHQfIKbtxj_QFnQ== | NetworkPlayerApproval->Approve | <AuthorisationRoutine>c__Iterator32->MoveNext | ]
System.ArgumentException: Key duplication when adding: IniParser+SectionPair
at System.Collections.Hashtable.PutImpl (System.Object key, System.Object value, Boolean overwrite) [0x00000] in <filename unknown>:0
at System.Collections.Hashtable.Add (System.Object key, System.Object value) [0x00000] in <filename unknown>:0
at IniParser..ctor (System.String iniPath) [0x00000] in <filename unknown>:0
at IronPythonModule.IPPlugin.GetIni (System.String path) [0x00000] in <filename unknown>:0
at (wrapper delegate-invoke) System.Func`3<IronPythonModule.IPPlugin, string, IniParser>:invoke_IniParser__this___IPPlugin_string (IronPythonModule.IPPlugin,string)
at Microsoft.Scripting.Interpreter.FuncCallInstruction`3[IronPythonModule.IPPlugin,System.String,IniParser].Run (Microsoft.Scripting.Interpreter.InterpretedFrame frame) [0x00000] in <filename unknown>:0


strange because this started around the time when i installed KKMONEY so i removed the plugin and restarted the server but i still get the above error and it obviously is not working.

the only thing i have not done yet is removed all plugins and started again
 

DreTaX

Probably knows the answer...
Administrator
Jun 29, 2014
4,093
4,784
113
At your house.
github.com
ok somthing is broken. i keep getting errors now .......booooooooo im not sure what. i have been through the Ini files and i cant find any errors i have also removed the pluging and replaced with a fresh version but i still get
[12/31/2014 6:03:05 PM] [Debug] User Connected: kinkTR (76561197962717297 | 95.14.188.3)
[12/31/2014 6:03:05 PM] [Debug] [IronPython] An error occurred in: Whitelist plugin while calling method: On_PlayerConnected
[12/31/2014 6:03:05 PM] [Debug] [SafeTeleport] player=SPIDERPIG(76561197968073662) from=(5911.4, 390.4, -3440.1) to=(4774.4, 480.9, -3594.2) distance=1150.907 terrain=(4774.4, 471.8, -3594.2)
[12/31/2014 6:03:05 PM] [Exception] [ IPPlugin->Invoke | IPPlugin->OnPlayerConnected | Hooks->PlayerConnect | RustServerManagement->OnUserConnected | ConnectionAcceptor->uLink_OnPlayerConnected | GameObject->SendMessage | #=qSBVG6i3HoKQx$z3bwADYIgVX_kCktQP8JwBh1CI$O_8=->#=qnBC8vvHltGiAoAcoGPaaAA== | #=qSBVG6i3HoKQx$z3bwADYIgVX_kCktQP8JwBh1CI$O_8=->#=qopOwgPOjk_HOzOwWVDsWIQ== | #=qr9YotdsWVwSdbrj6D5OlmHWwwJVhBeBIJ5J461Az$DQ=->#=qM25p$Ei_tgo0VZPqr5NeJg== | #=qxj6gmeF_JmZ38rfyBJuqFoiB_sAo6WCf4j1AdQtxGgQ=->#=q2HqDTZFVDws8Yv2UHd8me8CJU2rmEhl0UENDzxjFAFA= | #=qxj6gmeF_JmZ38rfyBJuqFoiB_sAo6WCf4j1AdQtxGgQ=->#=qGm_HL$oYHQfIKbtxj_QFnQ== | NetworkPlayerApproval->Approve | <AuthorisationRoutine>c__Iterator32->MoveNext | ]
System.ArgumentException: Key duplication when adding: IniParser+SectionPair
at System.Collections.Hashtable.PutImpl (System.Object key, System.Object value, Boolean overwrite) [0x00000] in <filename unknown>:0
at System.Collections.Hashtable.Add (System.Object key, System.Object value) [0x00000] in <filename unknown>:0
at IniParser..ctor (System.String iniPath) [0x00000] in <filename unknown>:0
at IronPythonModule.IPPlugin.GetIni (System.String path) [0x00000] in <filename unknown>:0
at (wrapper delegate-invoke) System.Func`3<IronPythonModule.IPPlugin, string, IniParser>:invoke_IniParser__this___IPPlugin_string (IronPythonModule.IPPlugin,string)
at Microsoft.Scripting.Interpreter.FuncCallInstruction`3[IronPythonModule.IPPlugin,System.String,IniParser].Run (Microsoft.Scripting.Interpreter.InterpretedFrame frame) [0x00000] in <filename unknown>:0


strange because this started around the time when i installed KKMONEY so i removed the plugin and restarted the server but i still get the above error and it obviously is not working.

the only thing i have not done yet is removed all plugins and started again
This is what I feared. If you use some kind of other external iniparser, It breaks the one inside Fougerite.

Could you upload me your Whitelist.ini? I will do some investigation
 
  • Like
Reactions: Snake

maughanorama

Member
Member
Nov 27, 2014
181
10
18
50
i dont think its the ini file. even if i remove the ini file and restart the server it does the same...
actually it is the data in the Whitelist.ini strange though
 
Last edited:

maughanorama

Member
Member
Nov 27, 2014
181
10
18
50
here sthe whitelist.ini... i cant find any issues with it

i removd all ids from it and re-added them and now it works .... odd
 

Attachments

Last edited: