hex

Decoding T-SQL CAST in C#/VB.net

Recently our site has been deluged with the resurgence of the ASPRox bot SQL Injection attack. Without going into details, the attack attempts to execute SQL code by encoding the T-SQL commands in an ASCII encoded BINARY string. It looks something like this: DECLARE%20@S%20NVARCHAR(4000);SET%20@S=CAST(0x44004500...06F007200%20AS%20NVARC...

What is a good Windows hex editor / viewer?

I am in need of a hex editor / viewer (viewer is more important than editing, but a plus if it can edit) for Windows. See KHexedit Requirements: Free is best View data at cursor as: byte, short, int, long, float, double (signed/unsiged where applicable) Configure the endiance for multi-byte decoding "Nice to have" features: Strin...

Off-the-Shelf C++ Hex Dump Code

I work a lot with network and serial communications software, so it is often necessary for me to have code to display or log hex dumps of data packets. Every time I do this, I write yet another hex-dump routine from scratch. I'm about to do so again, but figured I'd ask here: Is there any good free hex dump code for C++ out there some...

Where did these hex named folders come from?

First off, I am using Windows XP. I have multiple hard drives and it looks like something decided to make some folders on the second one ( which is just a data drive, no os ). These folders all have names like "e69f29f1b1f166d3d30b8c9f7156ba" and "bd92c24cc278614082cd88e7a64b". They contain folders named update, whose "access is denie...

How to convert decimal to hex in JavaScript?

How do you convert decimal values to their hex equivalent in JavaScript? ...

char[] to hex string exercise

Below is my current char* to hex string function. I wrote it as an exercise in bit manipulation. It takes ~7ms on a AMD Athlon MP 2800+ to hexify a 10 million byte array. Is there any trick or other way that I am missing? How can I make this faster? Compiled with -O3 in g++ static const char _hex2asciiU_value[256][2] = { {'0','0'...

Callstack that has has AV reported I see FunctionName() + some Hex value?

What is this offset hex value? ...

Passing timestamp parameters in SQLAnalyzer to debug stored procedures

Hi I'm trying to debug a stored procedure through SQL Analyzer and one of the parameters is a timestamp datatype. If I wanted to pass 0x00000001410039E2 through as a parameter how would i do this? When I pass 0x00000001410039E2 I get a string truncation error and when I pass just 1410039E2 I get 0x1410039E20000000? Edit: @Frans Yes this...

Can someone explain hex offsets to me?

I downloaded Hex Workshop, and I was told to read a .dbc file. It should contain 28,315 if you read offset 0x04 and 0x05 I am unsure how to do this? What does 0x04 mean? ...

vb.net - sending UDP data including hex

As a hobby i'm interesting programming a Ethernet connected LED sign to scroll messages across a screen. But I'm having trouble making a UDP sender in VB .net (using 2008 currently) Now the sign is nice enough to have a specs sheet on programming for it: http://support.favotech.com/protocol.specs.2.4.jetfile.pdf But an example of a lin...

Hex operations in C#

Hi all, Any hints on parsing / converting / operating on hex values in c# ? In particular I want to cast a decimal int to hex and then output as a string... ...

Any Generic Utilities or Libraries for Converting Hex Dumps into Human-readable Form?

I work a lot with serial communications with a variety of devices, and so I often have to analyze hex dumps in log files. Currently, I do this manually by looking at the dumps, looking at the protocol spec, and writing down the results. However, this is tedious and error-prone, especially whem messages contain hundreds of bytes and con...

Binary Database Aligned or Packed

Is there a way to see, via hex editor or otherwise, if data in a binary file is aligned or packed, specifically for an HPUX system? ...

How can I unpack binary hex formatted data in Python?

Using the PHP pack() function, I have converted a string into a binary hex representation: $string = md5(time); // 32 character length $packed = pack('H*', $string); The H* formatting means "Hex string, high nibble first". To unpack this in PHP, I would simply use the unpack() function with the H* format flag. How would I unpack thi...

Convert hex string to int in Python

How do I convert a hex string to an int in Python? I may have it as "0xffff" or just "ffff". ...

Converting hex to RGB and vice-versa

What is the most efficient way to do this? ...

Converting a String to HEX in SQL

I'm looking for a way to transform a genuine string into it's hexadecimal value in SQL. I'm looking something that is Informix-friendly but I would obviously prefer something database-neutral Here is the select I am using now: SELECT SomeStringColumn from SomeTable Here is the select I would like to use: SELECT hex( SomeStringC...

Converting a paragraph to hex notatation, then back to string

Hi, How would you convert a parapraph to hex notation, and then back again into its original string form? (C#) A side note: would putting the string into hex format shrink it the most w/o getting into hardcore shrinking algo's? ...

How can I Convert a Big decimal number to Hex in C# (Eg : 588063595292424954445828)

The number is bigger than int & long but can be accomodated in Decimal. But the normal ToString or Convert methods don't work on Decimal. ...

Why use hex?

Hey! I was looking at this code at http://www.gnu.org/software/m68hc11/examples/primes_8c-source.html I noticed that in some situations they used hex numbers, like in line 134: for (j = 1; val && j <= 0x80; j <<= 1, q++) Now why would they use the 0x80? I am not that good with hex but I found an online hex to decimal and it gave me 1...