Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
S

Skymir

@Skymir
About
Posts
105
Topics
3
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Real time peak identification
    S Skymir

    Try a running average of the last X samples and subtract it from the previous average. When the sign changes positive or negative, it's a peak or trough. You can change the value of X to filter out the noise from the patient moving.

    Algorithms database algorithms help question code-review

  • I Hate Surveys
    S Skymir

    Keith Barrow wrote:

    outright gun bans would help prevent future terrorist attacks on our nation?

    What's actually humorous about that to me is that I can't remember the last terrorist attack that used a gun. They seem to prefer explosives.

    The true man wants two things: danger and play. For that reason he wants woman, as the most dangerous plaything.

    The Soapbox question help

  • SMF Forum login using webclient [modified]
    S Skymir

    I'm working on loging into an SMF based message board using a WebClient with a cookie collection. So far I've been able to use existing cookies to connect and download pages as needed, however I have to hard code the cookies to do it. Obviously not a good option. The problem I'm running in to is that in order to have the server generate credentials I have to give it a log in name and a hashed password. The forum login generates them using sha1 hashing with this code: doForm.hash_passwrd.value = hex_sha1(hex_sha1(doForm.user.value.php_to8bit().php_strtolower() + doForm.passwrd.value.php_to8bit()) + cur_session_id); I've been trying to use private void btnLogin_Click(object sender, EventArgs e) { String sName = "test"; String sPassword = "login"; String sSessionID = "3d847dffa233343cc5065a82b73d566e"; SHA1 sha = new SHA1CryptoServiceProvider(); byte[] sResult = sha.ComputeHash(StrToByteArray(sName + sPassword)); sResult = sha.ComputeHash(StrToByteArray(ByteArrayToStr(sResult) + sSessionID)); } public static byte[] StrToByteArray(string str) { return Encoding.UTF8.GetBytes(str); //encoding.GetBytes(str); } public static string ByteArrayToStr(byte[] bytes) { return BitConverter.ToString(bytes).Replace("-", "").ToLower(); } To generate the same hash as the php version...however it's obviously failing. Somewhere in there I'm missing some encoding or particular formatting that I don't know about. Can anyone point me in the right direction here? EDIT: String sName = "test"; String sPassword = "login"; String sSessionID = "8000e537c2a7a31547ffa779fab7a1e2"; String sTemp; SHA1CryptoServiceProvider sha = new SHA1CryptoServiceProvider(); sTemp = BitConverter.ToString(sha.ComputeHash(Encoding.UTF8.GetBytes(sName + sPassword))).Replace("-", "").ToLower(); textBox2.Text = BitConverter.ToString(sha.ComputeHash(Encoding.UTF8.GetBytes(sTemp + sSessionID))).Replace("-", "").ToLower(); After beating my head against a wall long enough I was able to come up with this, and it does spit out the exact same hash as the existing php code. This should allow anyone to generate a hash for logging into most SMF powered message boards (They seem to have a niche market in games and mods on a global scale

    C# php sysadmin cryptography help question

  • Your choice of words can be powerful
    S Skymir

    Now look up 'push poll' and you'll see why polling statistics get so easily (and often) manipulated.

    The true man wants two things: danger and play. For that reason he wants woman, as the most dangerous plaything.

    The Back Room com question

  • Poll finds most Americans are unhappy with government
    S Skymir

    josda1000 wrote:

    Libertarians and neoconservatives can be similar when talking about fiscal policy

    Only when talking about it. Neocons don't govern the way they speak. None of the parties that have actually gotten into power have though, so it's not like it's something new.

    The true man wants two things: danger and play. For that reason he wants woman, as the most dangerous plaything.

    The Back Room html com question announcement

  • Real Girl Power
    S Skymir

    I'd suspect the three guys attacking her dad though the same, right up until she hit dear leader with an axe...

    The true man wants two things: danger and play. For that reason he wants woman, as the most dangerous plaything.

    The Soapbox html announcement

  • Need the code for Randomization of numbers using c#
    S Skymir

    Christian Graus wrote:

    I think I should become a plumber.

    I've been thinking electrician. Plumbing was an idea, but you end up having to deal with septic tanks and pipes clogged with things no one ever wants to know about.

    The true man wants two things: danger and play. For that reason he wants woman, as the most dangerous plaything.

    C# csharp lounge

  • I've been censored 2
    S Skymir

    Dirk Higbee wrote:

    You know the above average intelligences of the world.

    Human intelligence is a constant. It's only the population that changes.

    The true man wants two things: danger and play. For that reason he wants woman, as the most dangerous plaything.

    The Lounge beta-testing question code-review

  • American Cars
    S Skymir

    How a car feels when it drives is a very simple set angle settings on the suspension. When the front wheels of a car turn left or right, they also tilt a small amount into the turn. Changing that tiny angle along with the amount of power steering assist makes for the vast majority of how a car feels when you drive it. It makes Fords always feel like Fords when you drive them, Chevy's feel like Chevy's etc. The most distinctive to me personally is the BWM.

    The true man wants two things: danger and play. For that reason he wants woman, as the most dangerous plaything.

    The Lounge business help

  • Grumble, Grumble, Grumble!!
    S Skymir

    I don't know about the tax rate you're paying, but if you're getting off for less than 12k a year then you're getting a better deal than we are, and probably better coverage on top of that, since at that rate the co-pays are still pretty high depending on what you need. Also that's a 12k a year price tag, not as percentage of wages, if you don't make enough to pay for coverage and live on, then something has to go. That's one of the reasons I asked how long it's been since you were in the US. The last ten years have seen the average cost of health insurance more than double, while the standard of care hasn't improved (I think it went down actually). Currently putting us in 37th place according to the WHO. Surprisingly enough France and Italy are in first and second on that list.

    The true man wants two things: danger and play. For that reason he wants woman, as the most dangerous plaything.

    The Lounge com tutorial question

  • Solar eclipse
    S Skymir

    Maximilien wrote:

    I can just imagine how fast the temperature would drop if the sun just shut down.

    That only happens just before it explodes, so at least you won't be cold for long :)

    The true man wants two things: danger and play. For that reason he wants woman, as the most dangerous plaything.

    The Lounge question

  • Roadside Bombs
    S Skymir

    Any problem can be solved with the proper application of explosives.

    Robert Surtees wrote:

    knows far too much about

    How can you know too much about blowing things up?

    The true man wants two things: danger and play. For that reason he wants woman, as the most dangerous plaything.

    The Lounge beta-testing question

  • Roadside Bombs
    S Skymir

    Be very glad, programmers are lazy and hate to do things twice. Roadside bombs are inefficient and have to be repeated. It's not really a process we'd like to see 'optimized' though.

    The true man wants two things: danger and play. For that reason he wants woman, as the most dangerous plaything.

    The Lounge beta-testing question

  • Grumble, Grumble, Grumble!!
    S Skymir

    You're profile says you're in France. When was the last time you were in the US? Honestly I'm kind of at a loss reading your post. It reads like a right wing talking points list, but your profile says you've been around a while.

    The true man wants two things: danger and play. For that reason he wants woman, as the most dangerous plaything.

    The Lounge com tutorial question

  • About the only killer app I want..
    S Skymir

    Actually that might be really cool. Think Rubics cube with explosives... Might have to do something with that idea.

    The true man wants two things: danger and play. For that reason he wants woman, as the most dangerous plaything.

    The Lounge question mobile com announcement

  • North Korea threatened Wednesday to wipe the United States off the map
    S Skymir

    Aw come on, an overcompensating whack job firing defective Dongs. It can't help but be funny. You're right though, if lil Kim does actually manage to blow something up, it'll stop being funny real fast. I hate to think of the innocent lives that would end rather suddenly as North Korea was eradicated, since we don't have the troops for a land invasion.

    The true man wants two things: danger and play. For that reason he wants woman, as the most dangerous plaything.

    The Soapbox com question announcement

  • What ever you may think of Bing
    S Skymir

    The vid search is nice, but it needs a volume control. They're way loud on my weven box.

    The true man wants two things: danger and play. For that reason he wants woman, as the most dangerous plaything.

    The Lounge

  • Star struck teen admits to lieing
    S Skymir

    Depends on the job. If I was hiring a bouncer, then probably. Bouncers are more effective the more dangerous they look. Now an office receptionist? Not a chance. The first face of your company that a prospective client sees isn't the appropriate place.

    The true man wants two things: danger and play. For that reason he wants woman, as the most dangerous plaything.

    The Lounge html com

  • Problems with using series of PNG files as animations
    S Skymir

    AVI could do the quality, however the transparency could be a problem. 1280x720 is a LOT of real estate to cover, if the entire area isn't being animated at the same time, you might be better off only redrawing the parts of the screen that change. Or moving a picture around the screen as the animation. Aside from that, your next step would probably be using managed DirectX to pile all those graphics into buffers.

    The true man wants two things: danger and play. For that reason he wants woman, as the most dangerous plaything.

    .NET (Core and Framework) performance tutorial help question

  • New Oldest Man In The World
    S Skymir

    And someone check me into that hospital!

    The true man wants two things: danger and play. For that reason he wants woman, as the most dangerous plaything.

    The Lounge
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups