Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
att-string-transcoder
Advanced tools
Allows you to decode A Township Tale's save strings for analysing, and encode JS objects into ATT save strings for spawning.
Add this library to your project's dependencies:
$ npm install --save att-string-transcoder
import { decodeString } from 'att-string-transcoder';
/**
* You obtain an encoded save string by sending the `select tostring` console command.
* See: https://docs.google.com/document/d/150PALdbZalylhkI4_iCL7Bl0X_rgvq80gJCUHik3z4I/edit?usp=sharing
*/
const encodedString = '23644,174,23644,{...very long...},2,';
const decodedString = decodeString(encodedString);
decodedString
will contain:const decodedString = {
hash: 23644,
size: 1392,
prefab: {
prefabObject: {
hash: 23644,
position: {
x: -699.1250610351562,
y: 128.15176391601562,
z: 98.96036529541016
},
rotation: {
x: -0.00007028286927379668,
y: -0.06372569501399994,
z: -0.0011925859143957496,
w: 0.9979667663574219
},
scale: 1.0000009536743164
},
components: {
Unknown: [],
NetworkRigidbody: {
position: {
x: -699.1250610351562,
y: 128.15176391601562,
z: 98.96036529541016
},
rotation: {
x: -0.00007028286927379668,
y: -0.06372569501399994,
z: -0.0011925859143957496,
w: 0.9979667663574219
},
isKinematic: false,
isServerSleeping: true,
velocity: {
x: 0,
y: 0,
z: 0
},
angularVelocity: {
x: 0,
y: 0,
z: 0
}
},
Pickup: {
lastInteractorPlayerId: 1965324787
},
LiquidContainer: {
canAddTo: false,
canRemoveFrom: true,
contentLevel: 0,
hasContent: false,
isCustom: false,
presetHash: 0,
customData: null
},
BasicDecay: {
isDisabled: false,
timelineEntry: 37654637031400
}
},
embeddedEntities: {
Unknown: [
{
hash: 21290,
isAlive: true,
components: {
Unknown: [],
Pickup: {
lastInteractorPlayerId: 1965324787
}
}
}
]
},
childPrefabs: []
}
};
blade
prefab object:import { Prefab, PrefabHash, PhysicalMaterialPartHash } from 'att-string-transcoder';
const blade: Prefab = {
prefabObject: {
hash: PrefabHash.Large_Longsword_Blade
},
components: {
PhysicalMaterialPart: {
materialHash: PhysicalMaterialPartHash.EvinonSteelAlloy
},
DurabilityModule: {
integrity: 0.01
}
}
};
guard
prefab object:import { Prefab, PrefabHash, PhysicalMaterialPartHash } from 'att-string-transcoder';
export const guard: Prefab = {
prefabObject: {
hash: PrefabHash.Large_Guard_Rectangle
},
components: {
PhysicalMaterialPart: {
materialHash: PhysicalMaterialPartHash.Copper
},
DurabilityModule: {
integrity: 0.01
}
},
childPrefabs: [
{
parentHash: 51896,
prefab: blade
}
]
};
handle
prefab object:import { Prefab, PrefabHash } from 'att-string-transcoder';
const position = {
x: -701,
y: 128.2,
z: 100
};
export const handle: Prefab = {
prefabObject: {
hash: PrefabHash.Handle_Short,
position
},
components: {
NetworkRigidbody: {
position
}
},
childPrefabs: [
{
parentHash: 6136,
prefab: guard
}
]
};
Encode the hierarchical prefab object to obtain a string for spawning:
import { createString } from 'att-string-transcoder';
/* ... defined prefab objects ... */
/**
* You spawn an encoded save string by sending the `spawn string-raw` console command.
* See: https://docs.google.com/document/d/150PALdbZalylhkI4_iCL7Bl0X_rgvq80gJCUHik3z4I/edit?usp=sharing
*/
const encodedSword = createString(handle);
encodedSword
will contain:42230,252,42230,3291430912,1124086579,1120403456,0,0,0,1065353216,1065353216,2290978823,418,3291430912,1124086579,1120403456,0,0,0,1065353216,0,0,0,0,0,0,0,0,536871679,1163,0,0,0,0,0,0,133169152,133169152,34023564,2684354564,2523,1307670851,3758096388,126122721,1073741824,0,268438699,2147487155,3221225472,0,0,0,0,0,66584576,66584576,17011782,1342177282,1968,3875060897,4026531842,63061360,2684354560,0,0,|3,2290978823,1,272188517,1,1871432223,1,
FAQs
Trancode save strings for A Township Tale.
The npm package att-string-transcoder receives a total of 4 weekly downloads. As such, att-string-transcoder popularity was classified as not popular.
We found that att-string-transcoder demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.