- 博客(91)
- 收藏
- 关注
原创 实用工具binwalk
在刚刚结束的Ghost in shellcode 2013热身赛中,其中的第三题涉及到了有关压缩文件格式的问题。原题在:http://ghostintheshellcode.com/2013-teaser/第三题,给了一个bin文件,很容易猜到应该是从文件中提取信息。首先利用file命令检测文件的magic,得到它是xz格式的压缩包。解压后,继续file,得到以下信息:gzip
2013-01-16 13:47:59
5627
1
原创 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
865
原创 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
1041
1
原创 Wargames:Vortex Level 2
http://www.overthewire.org/wargames/vortex/vortex2.shtmlI 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
764
原创 Wargames:Vortex Level 1
Level 1Canary 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
1188
原创 Wargames-Vortex Level 0
Level 0Level 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
815
原创 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
677
原创 LeetCode Populating Next Right Pointers in Each Node II
Populating Next Right Pointers in Each Node IIFollow 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
1376
原创 LeetCode Populating Next Right Pointers in Each Node
Populating Next Right Pointers in Each NodeGiven a binary tree struct TreeLinkNode { TreeLinkNode *left; TreeLinkNode *right; TreeLinkNode *next; }Populate ea
2012-11-24 01:12:02
584
原创 LeetCode Plus One
Plus OneGiven 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
522
原创 LeetCode Permutations II
Permutations IIGiven 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
567
原创 LeetCode Permutation
PermutationsGiven 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
596
原创 LeetCode Permutation Sequence
Permutation SequenceThe 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
504
原创 LeetCode Path Sum II
Path Sum IIGiven 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
535
原创 LeetCode Path Sum
Path SumGiven 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
439
原创 LeetCode Pascal's Triangle II
Pascal's Triangle IIGiven 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
610
原创 LeetCode Pascal's Triangle
Pascal's TriangleGiven 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
648
原创 LeetCode Partition List
Partition ListGiven 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
429
原创 LeetCode Palindrome Number
Palindrome NumberDetermine 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
443
原创 LeetCode Next Permutation
Next PermutationImplement 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
506
原创 LeetCode Multiply Strings
Multiply StringsGiven 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
459
原创 LeetCode SubSets II
Subsets IIGiven 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
489
原创 LeetCode Subsets
SubsetsGiven 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
470
原创 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
506
原创 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*nclass Solution {public: int sqrt(int x) { // S
2012-11-22 23:00:06
498
原创 LeetCode Spiral Matrix II
Spiral Matrix IIGiven 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
441
原创 LeetCode Spiral Matrix
Spiral MatrixGiven 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
477
原创 LeetCode Sort Colors
Sort ColorsGiven 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
426
原创 LeetCode Simplify Path
Simplify PathGiven 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
444
原创 LeetCode Set Matrix Zeroes
Set Matrix ZeroesGiven 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
426
原创 LeetCode Search Insert Position
Search Insert PositionGiven 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
417
原创 LeetCode Search in Rotated Sorted Array II
Search in Rotated Sorted Array IIFollow 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
719
原创 LeetCode Search in Rotated Sorted Array
Search in Rotated Sorted ArraySuppose 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
446
原创 LeetCode Search for a Range
Search for a RangeGiven 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
378
原创 LeetCode Search a 2D Matrix
Search a 2D MatrixWrite 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
408
原创 LeetCode Same Tree
Same TreeGiven 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
453
原创 LeetCode Rotate List
Rotate ListGiven 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
390
原创 LeetCode Minimum Window Substring
Minimum Window SubstringGiven 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
531
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人