Skocz do zawartości

  • Zaloguj korzystając z Facebooka Zaloguj korzystając z Twittera Zaloguj przez Steam Zaloguj poprzez Google      Logowanie »   
  • Rejestracja

Witamy w Nieoficjalnym polskim support'cie AMX Mod X

Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.

  • Rozpoczynaj nowe tematy i odpowiedaj na inne
  • Zapisz się do tematów i for, aby otrzymywać automatyczne uaktualnienia
  • Dodawaj wydarzenia do kalendarza społecznościowego
  • Stwórz swój własny profil i zdobywaj nowych znajomych
  • Zdobywaj nowe doświadczenia

Dołączona grafika Dołączona grafika

Guest Message by DevFuse


[ANY-dev] Raw Entity Dump

  • Nie możesz napisać tematu
  • Zaloguj się, aby dodać odpowiedź
Brak odpowiedzi do tego tematu

#1 Adminek AMXX.PL

    Admin :)

  • Bot

Reputacja: 156

  • Postów:7170
  • Lokalizacja:AMXX.PL

Napisano 04.06.2014 12:42

<!-- BEGIN TEMPLATE: postbit_external -->
<div><font size="7"><b>DO NOT INSTALL ON A LIVE SERVER</b></font><br /><br />There might be a million of these floating around, but I couldn't find any. So here's the million-and-first tool of this nature. ;P<br /><br />It simply registers a console command <b>red_dump</b> which allows you to dump the raw data of an entity (or the first instance of an entity with a specific classname) to a file.<br /><br />I was inspired to make this after seeing how wizards like voogru and FlaminSarge found all sorts of hidden props for various entities. Since I personally can't get a better way to do so up and running (i.e. I don't have a TF2 SDK with the sentry class) and I'm too VAC paranoid to use a program that reads memory, I figured getting a raw hex dump of entities would be the best way to go.<br /><br />This plugin is only intended for a test server and it does not even do things like safe file path checking. Misuse could possibly crash a server. So don't blame me if you failed to read the giant text at the start of this thread.<br /><br /><font size="5"><u><b>USAGE</b></u></font><br />red_dump [entityIdx OR entityClassname] [bytesToDump] [filepathRelativeToServerGameDir]<br /><br /><font size="5"><u><b>EXAMPLES</b></u></font><br />red_dump 23 8770 tfplayer.dmp<br />red_dump obj_sentrygun 2832 tfsentry.dmp<br /><br />Only tested in TF2 but I don't see why this wouldn't work on any Source game.<br />Also only tested with SM 1.5.X but it's probably good for many older versions.<br /><br /><font size="5"><u><b>HOW TO USE</b></u></font><br />So first you'll want to figure out the classname (NOT net classname) of whatever entity you want to discern state changes under normal circumstances for. I'll use obj_sentrygun of TF2 and a known net prop as an example. You need to have a current dump of all net props as well, so you can determine a good limit for reading an entity's data. (I think attempting to read beyond an entity's bounds may cause an error)<br /><br />With obj_sentrygun, I saw that the highest offset was a 4-byte integer at position 2828:<br />Member: m_hAutoAimTarget (offset 2828) (type integer) (bits 21)<br />so I set my bytesToDump to 2832, though I could easily experiment with something higher if I wanted to. (there could be hidden props beyond 2832)<br /><br />So I bound a couple keys on a server with just bots, went as engie with the Wrangler, and these are my two keybound commands:<br />red_dump obj_sentrygun 2832 tfsentry1.dmp<br />red_dump obj_sentrygun 2832 tfsentry2.dmp<br /><br />I know the prop for a wrangled sentry is m_bPlayerControlled (offset 2780). I built a sentry and once it was complete, I did my first dump. Then when I wrangled the sentry, I did my second dump. I then opened both files in HxD (my favorite hex editor) and went to offset 2780. The difference couldn't be more clear:<br /><img src="" border="0" alt="" /><br /><br />So if I wanted to find some hidden netprop, I could use HxD's diff feature, or a dedicated binary diff program, and figure out where my desired hidden prop is by dumping before and during the state change I want to emulate by code. :D<br /><br />I hope people will find this useful.</div>

<br /> <div style="padding:6px">

<fieldset class="fieldset">
<legend>Attached Files</legend>
<table cellpadding="0" cellspacing="3" border="0">
<!-- BEGIN TEMPLATE: postbit_attachment -->
<td><img class="inlineimg" src="https://forums.allie...s/attach/sp.gif" alt="File Type: sp" width="16" height="16" border="0" style="vertical-align:baseline" /></td>

<a href="http://www.sourcemod...?file_id=134112"><strong>Get Plugin</strong></a> or
<a href="https://forums.allie...38;d=1401881918">Get Source</a> (raw_entity_dump.sp - 4.1 KB)

<!-- END TEMPLATE: postbit_attachment -->


<!-- END TEMPLATE: postbit_external -->

Wyświetl pełny artykuł

Użytkownicy przeglądający ten temat: 0

0 użytkowników, 0 gości, 0 anonimowych