- 博客(91)
- 收藏
- 关注
原创 实用工具binwalk
在刚刚结束的Ghost in shellcode 2013热身赛中,其中的第三题涉及到了有关压缩文件格式的问题。 原题在:http://ghostintheshellcode.com/2013-teaser/ 第三题,给了一个bin文件,很容易猜到应该是从文件中提取信息。 首先利用file命令检测文件的magic,得到它是xz格式的压缩包。 解压后,继续file,得到以下信息: gzip
2013-01-16 13:47:59
5766
原创 29c3ctf web100 regexdb writeup
原文让我发在了blue-lotus队伍的站点里面了: 29c3ctf web100 regexdb writeup 不过这里也做一个留念吧~~~ Problem Link: regexdb **Description** Ever played Googlewhack? Well, this is a bit [easier][2] and gives you
2012-12-30 18:28:51
913
原创 29c3ctf 赛后小结
第一次参加CTF比赛,见识了各种牛人,好多难题,各种纠结啊。 感觉自己之前实在是井底之蛙,弱爆了。 感谢blue-lotus,能够有机会和这么多充满智慧的hack们一起战斗,感觉真是太爽了。 我这次比赛,参与完成了3道题目,分别是web100的regexdb,web500的shop和Misc 200的What's this? 另外Reversing 300的Maya和Misc 30
2012-12-30 18:25:03
1121
原创 Wargames:Vortex Level 2
http://www.overthewire.org/wargames/vortex/vortex2.shtml I won't paste the origin question now. Solution: Just execute /vortex/vortex2 by passing next key file to let the program tar the file into
2012-12-01 23:11:18
822
原创 Wargames:Vortex Level 1
Level 1 Canary ValuesWe are looking for a specific value in ptr. You may need to consider how bash handles EOF..Reading MaterialSmashing the Stack for Fun and ProfitCode listing (vortex1.c) 1 #in
2012-12-01 22:47:39
1234
原创 Wargames-Vortex Level 0
Level 0 Level Goal:Your goal is to connect to port 5842 on vortex.labs.overthewire.org and read in 4 unsigned integers in host byte order. Add these integers together and send back the results to g
2012-12-01 01:04:21
860
原创 LeetCode Pow(x,n)
Pow(x, n) Implement pow(x, n). Tips: Notice negetive pows. Solution: class Solution { public: double pow(double x, int n) { // Start typing your C/C++ solution below /
2012-11-24 01:43:33
740
原创 LeetCode Populating Next Right Pointers in Each Node II
Populating Next Right Pointers in Each Node II Follow up for problem "Populating Next Right Pointers in Each Node". What if the given tree could be any binary tree? Would your previous solutio
2012-11-24 01:30:09
1441
原创 LeetCode Populating Next Right Pointers in Each Node
Populating Next Right Pointers in Each Node Given a binary tree struct TreeLinkNode { TreeLinkNode *left; TreeLinkNode *right; TreeLinkNode *next; } Populate ea
2012-11-24 01:12:02
621
原创 LeetCode Plus One
Plus One Given a number represented as an array of digits, plus one to the number. Solution: class Solution { public: vector plusOne(vector &digits) { // Start typing your C/C++
2012-11-24 00:59:58
585
原创 LeetCode Permutations II
Permutations II Given a collection of numbers that might contain duplicates, return all possible unique permutations. For example, [1,1,2] have the following unique permutations: [1,1,2],
2012-11-24 00:52:27
619
原创 LeetCode Permutation
Permutations Given a collection of numbers, return all possible permutations. For example, [1,2,3] have the following permutations: [1,2,3], [1,3,2], [2,1,3], [2,3,1], [3,1,2], and [3,2,
2012-11-24 00:08:47
641
原创 LeetCode Permutation Sequence
Permutation Sequence The set [1,2,3,…,n] contains a total of n! unique permutations. By listing and labeling all of the permutations in order, We get the following sequence (ie, for n = 3):
2012-11-24 00:05:54
543
原创 LeetCode Path Sum II
Path Sum II Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum. For example: Given the below binary tree and sum = 22, 5
2012-11-23 23:34:39
585
原创 LeetCode Path Sum
Path Sum Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum. For example: Given the below binary
2012-11-23 23:16:32
482
原创 LeetCode Pascal's Triangle II
Pascal's Triangle II Given an index k, return the kth row of the Pascal's triangle. For example, given k = 3, Return [1,3,3,1]. Note: Could you optimize your algorithm to use only O(k)
2012-11-23 22:59:22
662
原创 LeetCode Pascal's Triangle
Pascal's Triangle Given numRows, generate the first numRows of Pascal's triangle. For example, given numRows = 5, Return [ [1], [1,1], [1,2,1], [1,3,3,1], [1,4,6,4,1] ] S
2012-11-23 22:56:42
688
原创 LeetCode Partition List
Partition List Given a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x. You should preserve the original relative order o
2012-11-23 22:34:06
480
原创 LeetCode Palindrome Number
Palindrome Number Determine whether an integer is a palindrome. Do this without extra space. Some hints: Could negative integers be palindromes? (ie, -1) If you are thinking of convertin
2012-11-23 22:04:02
482
原创 LeetCode Next Permutation
Next Permutation Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers. If such arrangement is not possible, it must rearrange it
2012-11-23 19:13:08
559
原创 LeetCode Multiply Strings
Multiply Strings Given two numbers represented as strings, return multiplication of the numbers as a string. Note: The numbers can be arbitrarily large and are non-negative. Solution: cl
2012-11-23 00:29:26
497
原创 LeetCode SubSets II
Subsets II Given a collection of integers that might contain duplicates, S, return all possible subsets. Note: Elements in a subset must be in non-descending order. The solution set mu
2012-11-22 23:34:43
544
原创 LeetCode Subsets
Subsets Given a set of distinct integers, S, return all possible subsets. Note: Elements in a subset must be in non-descending order. The solution set must not contain duplicate subset
2012-11-22 23:22:16
514
原创 LeetCode String to Integer(atoi)
String to Integer (atoi) Implement atoi to convert a string to an integer. Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below and ask yourself
2012-11-22 23:16:11
541
原创 LeetCode sqrt(x)
Sqrt(x) Implement int sqrt(int x). Compute and return the square root of x. An intreasting Solution: 1+3+5+7+...+(2n-1)=n*n class Solution { public: int sqrt(int x) { // S
2012-11-22 23:00:06
531
原创 LeetCode Spiral Matrix II
Spiral Matrix II Given an integer n, generate a square matrix filled with elements from 1 to n2 in spiral order. For example, Given n = 3, You should return the following matrix: [ [ 1,
2012-11-22 22:47:15
471
原创 LeetCode Spiral Matrix
Spiral Matrix Given a matrix of m x n elements (m rows, n columns), return all elements of the matrix in spiral order. For example, Given the following matrix: [ [ 1, 2, 3 ], [ 4, 5, 6
2012-11-22 22:39:05
519
原创 LeetCode Sort Colors
Sort Colors Given an array with n objects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors in the order red, white and blue. Here, we wil
2012-11-22 18:28:16
461
原创 LeetCode Simplify Path
Simplify Path Given an absolute path for a file (Unix-style), simplify it. For example, path = "/home/", => "/home" path = "/a/./b/../../c/", => "/c" Corner Cases: Did you
2012-11-21 14:37:06
472
原创 LeetCode Set Matrix Zeroes
Set Matrix Zeroes Given a m x n matrix, if an element is 0, set its entire row and column to 0. Do it in place. Follow up: Did you use extra space? A straight forward solution using O(mn
2012-11-21 14:20:06
463
原创 LeetCode Search Insert Position
Search Insert Position Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order. You may assume
2012-11-21 13:43:44
460
原创 LeetCode Search in Rotated Sorted Array II
Search in Rotated Sorted Array II Follow up for "Search in Rotated Sorted Array": What if duplicates are allowed? Would this affect the run-time complexity? How and why? Write a function t
2012-11-21 13:36:32
762
原创 LeetCode Search in Rotated Sorted Array
Search in Rotated Sorted Array Suppose a sorted array is rotated at some pivot unknown to you beforehand. (i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2). You are given a target value
2012-11-21 13:06:59
484
原创 LeetCode Search for a Range
Search for a Range Given a sorted array of integers, find the starting and ending position of a given target value. Your algorithm's runtime complexity must be in the order of O(log n). If
2012-11-21 12:58:35
423
原创 LeetCode Search a 2D Matrix
Search a 2D Matrix Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties: Integers in each row are sorted from left to rig
2012-11-20 23:12:27
450
原创 LeetCode Same Tree
Same Tree Given two binary trees, write a function to check if they are equal or not. Two binary trees are considered equal if they are structurally identical and the nodes have the same value
2012-11-20 21:58:50
510
原创 LeetCode Rotate List
Rotate List Given a list, rotate the list to the right by k places, where k is non-negative. For example: Given 1->2->3->4->5->NULL and k = 2, return 4->5->1->2->3->NULL. Solution: /
2012-11-20 21:50:42
451
原创 LeetCode Minimum Window Substring
Minimum Window Substring Given a string S and a string T, find the minimum window in S which will contain all the characters in T in complexity O(n). For example, S = "ADOBECODEBANC" T = "AB
2012-11-20 16:45:41
563
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人